svn commit: r286127 - head/sys/arm64/include
Andrew Turner
andrew at FreeBSD.org
Fri Jul 31 13:32:26 UTC 2015
Author: andrew
Date: Fri Jul 31 13:32:25 2015
New Revision: 286127
URL: https://svnweb.freebsd.org/changeset/base/286127
Log:
Add VIRT_IN_DMAP to check if a virtual address is from the DMAP range.
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/arm64/include/vmparam.h
Modified: head/sys/arm64/include/vmparam.h
==============================================================================
--- head/sys/arm64/include/vmparam.h Fri Jul 31 12:37:40 2015 (r286126)
+++ head/sys/arm64/include/vmparam.h Fri Jul 31 13:32:25 2015 (r286127)
@@ -165,6 +165,9 @@
/* True if pa is in the dmap range */
#define PHYS_IN_DMAP(pa) ((pa) <= DMAP_MAX_PHYSADDR)
+/* True if va is in the dmap range */
+#define VIRT_IN_DMAP(va) ((va) >= DMAP_MIN_ADDRESS && \
+ (va) <= DMAP_MAX_ADDRESS)
#define PHYS_TO_DMAP(pa) \
({ \
@@ -176,7 +179,7 @@
#define DMAP_TO_PHYS(va) \
({ \
- KASSERT(((va) <= DMAP_MAX_ADDRESS || (va) >= DMAP_MIN_ADDRESS), \
+ KASSERT(VIRT_IN_DMAP(va), \
("%s: VA out of range, VA: 0x%lx", __func__, \
(vm_offset_t)(va))); \
(va) & ~DMAP_MIN_ADDRESS; \
More information about the svn-src-head
mailing list