--- linux-2.6-npiggin/include/asm-generic/pgtable-nopmd.h | 9 +++++++++ linux-2.6-npiggin/include/asm-generic/pgtable-nopud.h | 8 ++++++++ linux-2.6-npiggin/include/asm-generic/pgtable.h | 4 ++++ 3 files changed, 21 insertions(+) diff -puN include/asm-generic/pgtable.h~vm-folded-walkers include/asm-generic/pgtable.h --- linux-2.6/include/asm-generic/pgtable.h~vm-folded-walkers 2005-02-18 01:54:50.000000000 +1100 +++ linux-2.6-npiggin/include/asm-generic/pgtable.h 2005-02-18 01:54:50.000000000 +1100 @@ -175,6 +175,7 @@ static inline void ptep_mkdirty(pte_t *p * * see for_each_pgd */ +#ifndef for_each_pud #define for_each_pud(pgd, start, end, pud, pud_start, pud_end) \ for ( pud = pud_offset(pgd, start), \ pud_start = start; \ @@ -183,12 +184,14 @@ static inline void ptep_mkdirty(pte_t *p pud <= pud_offset(pgd, end-1); \ pud_start = pud_end, \ pud++ ) +#endif /* * for_each_pmd - iterate through pmd entries in a given pud * * see for_each_pgd */ +#ifndef for_each_pmd #define for_each_pmd(pud, start, end, pmd, pmd_start, pmd_end) \ for ( pmd = pmd_offset(pud, start), \ pmd_start = start; \ @@ -197,6 +200,7 @@ static inline void ptep_mkdirty(pte_t *p pmd <= pmd_offset(pud, end-1); \ pmd_start = pmd_end, \ pmd++ ) +#endif /* * for_each_pte_map - iterate through pte entries in a given pmd diff -puN include/asm-generic/pgtable-nopud.h~vm-folded-walkers include/asm-generic/pgtable-nopud.h --- linux-2.6/include/asm-generic/pgtable-nopud.h~vm-folded-walkers 2005-02-18 01:54:50.000000000 +1100 +++ linux-2.6-npiggin/include/asm-generic/pgtable-nopud.h 2005-02-18 02:22:43.000000000 +1100 @@ -52,5 +52,13 @@ static inline pud_t * pud_offset(pgd_t * #define pud_free(x) do { } while (0) #define __pud_free_tlb(tlb, x) do { } while (0) +#undef for_each_pud +#define for_each_pud(pgd, start, end, pud, pud_start, pud_end) \ + for ( pud = (pud_t *)pgd, \ + pud_start = start, \ + pud_end = end; \ + pud_start == start; \ + pud_start++ ) + #endif /* __ASSEMBLY__ */ #endif /* _PGTABLE_NOPUD_H */ diff -puN include/asm-generic/pgtable-nopmd.h~vm-folded-walkers include/asm-generic/pgtable-nopmd.h --- linux-2.6/include/asm-generic/pgtable-nopmd.h~vm-folded-walkers 2005-02-18 01:54:50.000000000 +1100 +++ linux-2.6-npiggin/include/asm-generic/pgtable-nopmd.h 2005-02-18 02:22:43.000000000 +1100 @@ -55,6 +55,15 @@ static inline pmd_t * pmd_offset(pud_t * #define pmd_free(x) do { } while (0) #define __pmd_free_tlb(tlb, x) do { } while (0) +#undef for_each_pmd +#define for_each_pmd(pud, start, end, pmd, pmd_start, pmd_end) \ + for ( pmd = (pmd_t *)pud, \ + pmd_start = start, \ + pmd_end = end; \ + pmd_start == start; \ + pmd_start++ ) + + #endif /* __ASSEMBLY__ */ #endif /* _PGTABLE_NOPMD_H */ _