diff options
author | wma <wma@FreeBSD.org> | 2016-06-30 04:58:19 +0000 |
---|---|---|
committer | wma <wma@FreeBSD.org> | 2016-06-30 04:58:19 +0000 |
commit | 2da75cc60b6cad55da71ccdd5aa00da2a015dec6 (patch) | |
tree | a594b16adde1d05fec893a2afd5677910e307177 /sys/arm64 | |
parent | c79242bce11c72a5135e2207abc92382e8d2677a (diff) | |
download | FreeBSD-src-2da75cc60b6cad55da71ccdd5aa00da2a015dec6.zip FreeBSD-src-2da75cc60b6cad55da71ccdd5aa00da2a015dec6.tar.gz |
ARM64: fix DMAP calculation
Use arithmetic operators instead of logical. This fixes
DMAP ranges calculation for ThunderX Dual Socket.
Obtained from: Semihalf
Sponsored by: Cavium
Reviewed by: zbb
Differential Revision: https://reviews.freebsd.org/D7023
Approved by: re (gjb)
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/include/vmparam.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index 6dccf51..0df07bd 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -181,7 +181,7 @@ KASSERT(PHYS_IN_DMAP(pa), \ ("%s: PA out of range, PA: 0x%lx", __func__, \ (vm_paddr_t)(pa))); \ - ((pa) - dmap_phys_base) | DMAP_MIN_ADDRESS; \ + ((pa) - dmap_phys_base) + DMAP_MIN_ADDRESS; \ }) #define DMAP_TO_PHYS(va) \ @@ -189,7 +189,7 @@ KASSERT(VIRT_IN_DMAP(va), \ ("%s: VA out of range, VA: 0x%lx", __func__, \ (vm_offset_t)(va))); \ - ((va) & ~DMAP_MIN_ADDRESS) + dmap_phys_base; \ + ((va) - DMAP_MIN_ADDRESS) + dmap_phys_base; \ }) #define VM_MIN_USER_ADDRESS (0x0000000000000000UL) |