x86: Support kmap_local() forced debugging
authorThomas Gleixner <tglx@linutronix.de>
Wed, 18 Nov 2020 19:48:41 +0000 (20:48 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 24 Nov 2020 13:42:09 +0000 (14:42 +0100)
commit14df32670291588036a498051a54cd8462d7f611
treeb3285fcdb143e581c262a49f4e021c38ac362ceb
parent0e91a0c6984c837a7c6760e3f28e8e1c532abf87
x86: Support kmap_local() forced debugging

kmap_local() and related interfaces are NOOPs on 64bit and only create
temporary fixmaps for highmem pages on 32bit. That means the test coverage
for this code is pretty small.

CONFIG_KMAP_LOCAL can be enabled independent from CONFIG_HIGHMEM, which
allows to provide support for enforced kmap_local() debugging even on
64bit.

For 32bit the support is unconditional, for 64bit it's only supported when
CONFIG_NR_CPUS <= 4096 as supporting it for 8192 CPUs would require to set
up yet another fixmap PGT.

If CONFIG_KMAP_LOCAL_FORCE_DEBUG is enabled then kmap_local()/kmap_atomic()
will use the temporary fixmap mapping path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20201118204007.169209557@linutronix.de
arch/x86/Kconfig
arch/x86/include/asm/fixmap.h
arch/x86/include/asm/pgtable_64_types.h