aboutsummaryrefslogtreecommitdiff
path: root/target-ppc
diff options
context:
space:
mode:
Diffstat (limited to 'target-ppc')
-rw-r--r--target-ppc/kvm.c2
-rw-r--r--target-ppc/mmu_helper.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 93c5bb75e7..5cbe98a164 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -845,7 +845,7 @@ static int read_cpuinfo(const char *field, char *value, int len)
break;
}
if (!strncmp(line, field, field_len)) {
- strncpy(value, line, len);
+ pstrcpy(value, len, line);
ret = 0;
break;
}
diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c
index d2664acef0..532b114aed 100644
--- a/target-ppc/mmu_helper.c
+++ b/target-ppc/mmu_helper.c
@@ -1032,12 +1032,10 @@ static int ppcemb_tlb_check(CPUPPCState *env, ppcemb_tlb_t *tlb,
return -1;
}
*raddrp = (tlb->RPN & mask) | (address & ~mask);
-#if (TARGET_PHYS_ADDR_BITS >= 36)
if (ext) {
/* Extend the physical address to 36 bits */
- *raddrp |= (target_phys_addr_t)(tlb->RPN & 0xF) << 32;
+ *raddrp |= (uint64_t)(tlb->RPN & 0xF) << 32;
}
-#endif
return 0;
}