tree 4c3f29ce21f2a69f9105581c95e07de5bc5bb7aa
parent 3bf5ee95648c694bac4d13529563c230cd4fe5f2
author Hugh Dickins <[EMAIL PROTECTED]> Wed, 20 Apr 2005 03:29:17 -0700
committer Linus Torvalds <[EMAIL PROTECTED](none)> Wed, 20 Apr 2005 03:29:17 
-0700

[PATCH] freepgt: remove arch pgd_addr_end

ia64 and sparc64 hurriedly had to introduce their own variants of
pgd_addr_end, to leapfrog over the holes in their virtual address spaces which
the final clear_page_range suddenly presented when converted from pgd_index to
pgd_addr_end.  But now that free_pgtables respects the vma list, those holes
are never presented, and the arch variants can go.

Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 asm-generic/pgtable.h |    8 +++-----
 asm-ia64/pgtable.h    |   26 --------------------------
 asm-sparc64/pgtable.h |   15 ---------------
 3 files changed, 3 insertions(+), 46 deletions(-)

Index: include/asm-generic/pgtable.h
===================================================================
--- 9430e6e4f4c3d586ecb7375cd780fd17694888c7/include/asm-generic/pgtable.h  
(mode:100644 sha1:a3b28710d56cc222e07f4b4922d4055d4f7eef9a)
+++ 4c3f29ce21f2a69f9105581c95e07de5bc5bb7aa/include/asm-generic/pgtable.h  
(mode:100644 sha1:1f4ec7b702706ed643c799e034c128595b3527a7)
@@ -140,17 +140,15 @@
 #endif
 
 /*
- * When walking page tables, get the address of the next boundary, or
- * the end address of the range if that comes earlier.  Although end might
- * wrap to 0 only in clear_page_range, __boundary may wrap to 0 throughout.
+ * When walking page tables, get the address of the next boundary,
+ * or the end address of the range if that comes earlier.  Although no
+ * vma end wraps to 0, rounded up __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)                                                
\
Index: include/asm-ia64/pgtable.h
===================================================================
--- 9430e6e4f4c3d586ecb7375cd780fd17694888c7/include/asm-ia64/pgtable.h  
(mode:100644 sha1:bbf6dd7570038e2d26f135fd52ee9f33c0c9f69d)
+++ 4c3f29ce21f2a69f9105581c95e07de5bc5bb7aa/include/asm-ia64/pgtable.h  
(mode:100644 sha1:fecfd0f68961554360d89d379cc008e886bbbb7a)
@@ -561,32 +561,6 @@
 #define __HAVE_ARCH_PGD_OFFSET_GATE
 #define __HAVE_ARCH_LAZY_MMU_PROT_UPDATE
 
-/*
- * Override for pgd_addr_end() to deal with the virtual address space holes
- * in each region.  In regions 0..4 virtual address bits are used like this:
- *      +--------+------+--------+-----+-----+--------+
- *      | pgdhi3 | rsvd | pgdlow | pmd | pte | offset |
- *      +--------+------+--------+-----+-----+--------+
- *  'pgdlow' overflows to pgdhi3 (a.k.a. region bits) leaving rsvd==0
- */
-#define IA64_PGD_OVERFLOW (PGDIR_SIZE << (PAGE_SHIFT-6))
-
-#define pgd_addr_end(addr, end)                                                
\
-({     unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK;  \
-       if (REGION_NUMBER(__boundary) < 5 &&                            \
-           __boundary & IA64_PGD_OVERFLOW)                             \
-               __boundary += (RGN_SIZE - 1) & ~(IA64_PGD_OVERFLOW - 1);\
-       (__boundary - 1 < (end) - 1)? __boundary: (end);                \
-})
-
-#define pmd_addr_end(addr, end)                                                
\
-({     unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK;      \
-       if (REGION_NUMBER(__boundary) < 5 &&                            \
-           __boundary & IA64_PGD_OVERFLOW)                             \
-               __boundary += (RGN_SIZE - 1) & ~(IA64_PGD_OVERFLOW - 1);\
-       (__boundary - 1 < (end) - 1)? __boundary: (end);                \
-})
-
 #include <asm-generic/pgtable-nopud.h>
 #include <asm-generic/pgtable.h>
 
Index: include/asm-sparc64/pgtable.h
===================================================================
--- 9430e6e4f4c3d586ecb7375cd780fd17694888c7/include/asm-sparc64/pgtable.h  
(mode:100644 sha1:ca04ac105b6947e8d395a55f003688857ead60fe)
+++ 4c3f29ce21f2a69f9105581c95e07de5bc5bb7aa/include/asm-sparc64/pgtable.h  
(mode:100644 sha1:c93011574843b49626b572b2979a4d19e2052653)
@@ -424,21 +424,6 @@
 #define GET_IOSPACE(pfn)               (pfn >> (BITS_PER_LONG - 4))
 #define GET_PFN(pfn)                   (pfn & 0x0fffffffffffffffUL)
 
-/* 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 */
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to