aboutsummaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2014-08-04 14:41:55 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-08-04 14:41:55 +0100
commitdcd82c118c891571d2d7db5b4ec84d9cf3ea49b3 (patch)
tree4e24f6d5498bb6a1382c4f4c13a2a506f417a3e4 /target-arm
parentcdcf14057d780cdbb1f89f8c5fc11a1a9184b5b1 (diff)
downloadqemu-dcd82c118c891571d2d7db5b4ec84d9cf3ea49b3.zip
qemu-dcd82c118c891571d2d7db5b4ec84d9cf3ea49b3.tar.gz
qemu-dcd82c118c891571d2d7db5b4ec84d9cf3ea49b3.tar.bz2
target-arm: don't hardcode mask values in arm_cpu_handle_mmu_fault
Otherwise we break quickly when we change TARGET_PAGE_SIZE. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1406733627-24255-2-git-send-email-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index d709285..35c11e7 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -4156,8 +4156,8 @@ int arm_cpu_handle_mmu_fault(CPUState *cs, vaddr address,
&page_size);
if (ret == 0) {
/* Map a single [sub]page. */
- phys_addr &= ~(hwaddr)0x3ff;
- address &= ~(target_ulong)0x3ff;
+ phys_addr &= TARGET_PAGE_MASK;
+ address &= TARGET_PAGE_MASK;
tlb_set_page(cs, address, phys_addr, prot, mmu_idx, page_size);
return 0;
}