And lastly, redo this vital optimisation that David
had to remove earlier. Saves a few bytes.



---

 linux-2.6-npiggin/include/asm-generic/pgtable-nopmd.h |    2 ++
 linux-2.6-npiggin/include/asm-generic/pgtable-nopud.h |    2 ++
 linux-2.6-npiggin/mm/memory.c                         |    8 +++++++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff -puN include/asm-generic/pgtable-nopud.h~vm-trim-unused 
include/asm-generic/pgtable-nopud.h
--- linux-2.6/include/asm-generic/pgtable-nopud.h~vm-trim-unused        
2005-02-18 02:14:30.000000000 +1100
+++ linux-2.6-npiggin/include/asm-generic/pgtable-nopud.h       2005-02-18 
02:15:41.000000000 +1100
@@ -3,6 +3,8 @@
 
 #ifndef __ASSEMBLY__
 
+#define __PAGETABLE_PUD_FOLDED
+
 /*
  * Having the pud type consist of a pgd gets the size right, and allows
  * us to conceptually access the pgd entry that this pud is folded into
diff -puN include/asm-generic/pgtable-nopmd.h~vm-trim-unused 
include/asm-generic/pgtable-nopmd.h
--- linux-2.6/include/asm-generic/pgtable-nopmd.h~vm-trim-unused        
2005-02-18 02:14:32.000000000 +1100
+++ linux-2.6-npiggin/include/asm-generic/pgtable-nopmd.h       2005-02-18 
02:15:31.000000000 +1100
@@ -5,6 +5,8 @@
 
 #include <asm-generic/pgtable-nopud.h>
 
+#define __PAGETABLE_PMD_FOLDED
+
 /*
  * Having the pmd type consist of a pud gets the size right, and allows
  * us to conceptually access the pud entry that this pmd is folded into
diff -puN mm/memory.c~vm-trim-unused mm/memory.c
--- linux-2.6/mm/memory.c~vm-trim-unused        2005-02-18 02:14:44.000000000 
+1100
+++ linux-2.6-npiggin/mm/memory.c       2005-02-18 02:17:34.000000000 +1100
@@ -2006,6 +2006,8 @@ int handle_mm_fault(struct mm_struct *mm
 }
 
 #ifndef __ARCH_HAS_4LEVEL_HACK
+
+#ifndef __PAGETABLE_PUD_FOLDED
 /*
  * Allocate page upper directory.
  *
@@ -2037,7 +2039,9 @@ pud_t fastcall *__pud_alloc(struct mm_st
  out:
        return pud_offset(pgd, address);
 }
+#endif /* __PAGETABLE_PUD_FOLDED */
 
+#ifndef __PAGETABLE_PMD_FOLDED
 /*
  * Allocate page middle directory.
  *
@@ -2069,7 +2073,9 @@ pmd_t fastcall *__pmd_alloc(struct mm_st
  out:
        return pmd_offset(pud, address);
 }
-#else
+#endif /* __PAGETABLE_PMD_FOLDED */
+
+#else /* __ARCH_HAS_4LEVEL_HACK */
 pmd_t fastcall *__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long 
address)
 {
        pmd_t *new;

_

Reply via email to