summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-05-06 20:48:52 +0200
committerRichard Braun <rbraun@sceen.net>2014-05-06 20:48:52 +0200
commitedae23a2cd2800dff9806309854fb46f12d408d7 (patch)
treedff36ef5cbc58cb7f2ee488e39c2acd21227f7da
parent7dd4207f8052cd2516e55fd885b9198a35a65211 (diff)
x86/pmap: remove check for page-aligned addresses
Masks are already applied unconditionally, and pmap_extract must be usable with unaligned addresses.
-rw-r--r--arch/x86/machine/pmap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c
index d02dabc7..06ba9712 100644
--- a/arch/x86/machine/pmap.c
+++ b/arch/x86/machine/pmap.c
@@ -504,12 +504,10 @@ pmap_bootalloc(unsigned int nr_pages)
*
* Note that there is no addressing restriction on the kernel pmap.
*/
-#define pmap_assert_range(pmap, start, end) \
-MACRO_BEGIN \
- assert(vm_page_aligned(start) && vm_page_aligned(end)); \
- assert((start) < (end)); \
- assert(((pmap) == kernel_pmap) || ((end) <= VM_MAX_ADDRESS)); \
-MACRO_END
+#define pmap_assert_range(pmap, start, end) \
+ assert(((start) < (end)) \
+ && (((pmap) == kernel_pmap) \
+ || ((end) <= VM_MAX_ADDRESS))) \
static inline void
pmap_pte_set(pmap_pte_t *pte, phys_addr_t pa, pmap_pte_t pte_bits,