mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP
CONFIG_DEBUG_KMAP_LOCAL, which is selected by CONFIG_DEBUG_HIGHMEM is only providing guard pages, but does not provide a mechanism to enforce the usage of the kmap_local() infrastructure. Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP which forces the temporary mapping even for lowmem pages. This needs to be a seperate config switch because this only works on architectures which do not have cache aliasing problems. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20201118204007.028261233@linutronix.de
This commit is contained in:
@@ -856,9 +856,23 @@ config DEBUG_KMAP_LOCAL
|
||||
This option enables additional error checking for the kmap_local
|
||||
infrastructure. Disable for production use.
|
||||
|
||||
config ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
|
||||
bool
|
||||
|
||||
config DEBUG_KMAP_LOCAL_FORCE_MAP
|
||||
bool "Enforce kmap_local temporary mappings"
|
||||
depends on DEBUG_KERNEL && ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
|
||||
select KMAP_LOCAL
|
||||
select DEBUG_KMAP_LOCAL
|
||||
help
|
||||
This option enforces temporary mappings through the kmap_local
|
||||
mechanism for non-highmem pages and on non-highmem systems.
|
||||
Disable this for production systems!
|
||||
|
||||
config DEBUG_HIGHMEM
|
||||
bool "Highmem debugging"
|
||||
depends on DEBUG_KERNEL && HIGHMEM
|
||||
select DEBUG_KMAP_LOCAL_FORCE_MAP if ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
|
||||
select DEBUG_KMAP_LOCAL
|
||||
help
|
||||
This option enables additional error checking for high memory
|
||||
|
Reference in New Issue
Block a user