===== include/asm-generic/pgtable.h 1.13 vs edited ===== --- 1.13/include/asm-generic/pgtable.h 2005-03-13 15:29:41 -08:00 +++ edited/include/asm-generic/pgtable.h 2005-03-16 00:06:51 -08:00 @@ -141,10 +141,12 @@ * 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) \ ===== include/asm-ia64/pgtable.h 1.54 vs edited ===== --- 1.54/include/asm-ia64/pgtable.h 2005-03-13 15:29:40 -08:00 +++ edited/include/asm-ia64/pgtable.h 2005-03-16 01:00:27 -08:00 @@ -550,6 +550,19 @@ #define __HAVE_ARCH_PTEP_SET_WRPROTECT #define __HAVE_ARCH_PTE_SAME #define __HAVE_ARCH_PGD_OFFSET_GATE + +/* + * Override for pgd_addr_end() to deal with the virtual address + * space holes in the middle of each region. + */ +#define IA64_REGION_HOLE (PGDIR_SIZE << (PAGE_SHIFT-6)) +#define pgd_addr_end(addr, end) \ +({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; \ + if (__boundary & IA64_REGION_HOLE) \ + __boundary |= (RGN_SIZE - 1) & ~(IA64_REGION_HOLE - 1); \ + (__boundary - 1 < (end) - 1)? __boundary: (end); \ +}) + #include #include