* wrap to 0 only in clear_page_range, __boundary may wrap to 0 throughout.
*/
+#ifndef pgd_addr_end
#define pgd_addr_end(addr, end) \
({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; \
(__boundary - 1 < (end) - 1)? __boundary: (end); \
})
+#endif
#ifndef pud_addr_end
#define pud_addr_end(addr, end) \
unsigned long offset,
unsigned long size, pgprot_t prot, int space);
+/* Override for {pgd,pmd}_addr_end() to deal with the virtual address
+ * space hole. We simply sign extend bit 43.
+ */
+#define pgd_addr_end(addr, end) \
+({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; \
+ __boundary = ((long) (__boundary << 20)) >> 20; \
+ (__boundary - 1 < (end) - 1)? __boundary: (end); \
+})
+
+#define pmd_addr_end(addr, end) \
+({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; \
+ __boundary = ((long) (__boundary << 20)) >> 20; \
+ (__boundary - 1 < (end) - 1)? __boundary: (end); \
+})
+
#include <asm-generic/pgtable.h>
/* We provide our own get_unmapped_area to cope with VA holes for userland */