The patch titled Subject: asm-generic/tlb: stub out pud_free_tlb() if __PAGETABLE_PUD_FOLDED ... has been removed from the -mm tree. Its filename was asm-generic-tlb-stub-out-pud_free_tlb-if-__pagetable_pud_folded.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx> Subject: asm-generic/tlb: stub out pud_free_tlb() if __PAGETABLE_PUD_FOLDED ... Patch series "eldie generated code for folded p4d/pud". This series elides extraneous generate code for folded p4d/pud. This came up when trying to remove __ARCH_USE_5LEVEL_HACK from ARC port. The code saving are not a while lot, but still worthwhile IMHO. bloat-o-meter2 vmlinux-A-baseline vmlinux-E-elide-p?d_clear_bad add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-146 (-146) function old new delta p4d_clear_bad 2 - -2 pud_clear_bad 20 - -20 free_pgd_range 546 422 -124 Total: Before=4137148, After=4137002, chg -1.000000% This patch (of 3): Stub out pud_free_tlb() if __PAGETABLE_PUD_FOLDED, independent of __ARCH_HAS_4LEVEL_HACK This came up when removing __ARCH_HAS_5LEVEL_HACK for ARC as code bloat from pud_free_tlb() despite pud being folded (with 2 levels on ARC) | bloat-o-meter2 vmlinux-B-elide-ARCH_USE_5LEVEL_HACK vmlinux-C-elide-pud= _free_tlb | add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-104 (-104) | function old new delta | free_pgd_range 656 552 -104 | Total: Before=3D4137276, After=3D4137172, chg -1.000000% Link: http://lkml.kernel.org/r/20191009222658.961-2-vgupta@xxxxxxxxxxxx Signed-off-by: Vineet Gupta <vgupta@xxxxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: "Aneesh Kumar K . V" <aneesh.kumar@xxxxxxxxxxxxx> Cc: Nick Piggin <npiggin@xxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/asm-generic/4level-fixup.h | 2 -- include/asm-generic/tlb.h | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/include/asm-generic/4level-fixup.h~asm-generic-tlb-stub-out-pud_free_tlb-if-__pagetable_pud_folded +++ a/include/asm-generic/4level-fixup.h @@ -27,8 +27,6 @@ #define pud_page(pud) pgd_page(pud) #define pud_page_vaddr(pud) pgd_page_vaddr(pud) -#undef pud_free_tlb -#define pud_free_tlb(tlb, x, addr) do { } while (0) #define pud_free(mm, x) do { } while (0) #define __pud_free_tlb(tlb, x, addr) do { } while (0) --- a/include/asm-generic/tlb.h~asm-generic-tlb-stub-out-pud_free_tlb-if-__pagetable_pud_folded +++ a/include/asm-generic/tlb.h @@ -584,7 +584,7 @@ static inline void tlb_end_vma(struct mm } while (0) #endif -#ifndef __ARCH_HAS_4LEVEL_HACK +#ifndef __PAGETABLE_PUD_FOLDED #ifndef pud_free_tlb #define pud_free_tlb(tlb, pudp, address) \ do { \ @@ -594,6 +594,8 @@ static inline void tlb_end_vma(struct mm __pud_free_tlb(tlb, pudp, address); \ } while (0) #endif +#else +#define pud_free_tlb(tlb, pudp, address) do { } while (0) #endif #ifndef __ARCH_HAS_5LEVEL_HACK _ Patches currently in -mm which might be from Vineet.Gupta1@xxxxxxxxxxxx are asm-generic-tlb-stub-out-p4d_free_tlb-if-__pagetable_p4d_folded.patch asm-generic-mm-stub-out-p4dd_clear_bad-if-__pagetable_p4ud_folded.patch arc-mm-remove-__arch_use_5level_hack.patch asm-generic-tlb-stub-out-pud_free_tlb-if-nopud.patch asm-generic-tlb-stub-out-p4d_free_tlb-if-nop4d.patch asm-generic-tlb-stub-out-pmd_free_tlb-if-nopmd.patch asm-generic-mm-stub-out-p4ud_clear_bad-if-__pagetable_p4ud_folded.patch