Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: convert __HAVE_ARCH_TLB_REMOVE_TABLE to CONFIG_HAVE_ARCH_TLB_REMOVE_TABLE config

For architectures that define __HAVE_ARCH_TLB_REMOVE_TABLE, the page
tables at the pmd/pud level are generally not of struct ptdesc type, and
do not have pt_rcu_head member, thus these architectures cannot support
PT_RECLAIM.

In preparation for enabling PT_RECLAIM on more architectures, convert
__HAVE_ARCH_TLB_REMOVE_TABLE to CONFIG_HAVE_ARCH_TLB_REMOVE_TABLE config,
so that we can make conditional judgments in Kconfig.

Link: https://lkml.kernel.org/r/5ebfa3d4b56e63c6906bda5eccaa9f7194d3a86b.1769515122.git.zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Tested-by: Andreas Larsson <andreas@gaisler.com> [sparc, UP&SMP]
Acked-by: Andreas Larsson <andreas@gaisler.com> [sparc]
Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Lance Yang <ioworker0@gmail.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Magnus Lindholm <linmag7@gmail.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Qi Zheng and committed by
Andrew Morton
086498ae 6578ab0a

+6 -3
+1
arch/powerpc/Kconfig
··· 305 305 select LOCK_MM_AND_FIND_VMA 306 306 select MMU_GATHER_PAGE_SIZE 307 307 select MMU_GATHER_RCU_TABLE_FREE 308 + select HAVE_ARCH_TLB_REMOVE_TABLE 308 309 select MMU_GATHER_MERGE_VMAS 309 310 select MMU_LAZY_TLB_SHOOTDOWN if PPC_BOOK3S_64 310 311 select MODULES_USE_ELF_RELA
-1
arch/powerpc/include/asm/tlb.h
··· 37 37 */ 38 38 #define tlb_needs_table_invalidate() radix_enabled() 39 39 40 - #define __HAVE_ARCH_TLB_REMOVE_TABLE 41 40 /* Get the generic bits... */ 42 41 #include <asm-generic/tlb.h> 43 42
+1
arch/sparc/Kconfig
··· 74 74 select HAVE_KRETPROBES 75 75 select HAVE_KPROBES 76 76 select MMU_GATHER_RCU_TABLE_FREE if SMP 77 + select HAVE_ARCH_TLB_REMOVE_TABLE if SMP 77 78 select MMU_GATHER_MERGE_VMAS 78 79 select MMU_GATHER_NO_FLUSH_CACHE 79 80 select HAVE_ARCH_TRANSPARENT_HUGEPAGE
-1
arch/sparc/include/asm/tlb_64.h
··· 33 33 #define tlb_needs_table_invalidate() (false) 34 34 #endif 35 35 36 - #define __HAVE_ARCH_TLB_REMOVE_TABLE 37 36 #include <asm-generic/tlb.h> 38 37 39 38 #endif /* _SPARC64_TLB_H */
+1 -1
include/asm-generic/tlb.h
··· 213 213 #define MAX_TABLE_BATCH \ 214 214 ((PAGE_SIZE - sizeof(struct mmu_table_batch)) / sizeof(void *)) 215 215 216 - #ifndef __HAVE_ARCH_TLB_REMOVE_TABLE 216 + #ifndef CONFIG_HAVE_ARCH_TLB_REMOVE_TABLE 217 217 static inline void __tlb_remove_table(void *table) 218 218 { 219 219 struct ptdesc *ptdesc = (struct ptdesc *)table;
+3
mm/Kconfig
··· 1448 1448 The architecture has hardware support for userspace shadow call 1449 1449 stacks (eg, x86 CET, arm64 GCS or RISC-V Zicfiss). 1450 1450 1451 + config HAVE_ARCH_TLB_REMOVE_TABLE 1452 + def_bool n 1453 + 1451 1454 config ARCH_SUPPORTS_PT_RECLAIM 1452 1455 def_bool n 1453 1456