]> git.baikalelectronics.ru Git - kernel.git/commit
highmem: Make DEBUG_HIGHMEM functional
authorThomas Gleixner <tglx@linutronix.de>
Tue, 3 Nov 2020 09:27:19 +0000 (10:27 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 6 Nov 2020 22:14:55 +0000 (23:14 +0100)
commite0567043df5719853a26b56d275c1a4090c4ae9c
tree3ce03d2f790b6a77c87398c161329341ee5e8ca5
parente25cad9c42cf7964ba25424121aae8f87f31c44c
highmem: Make DEBUG_HIGHMEM functional

For some obscure reason when CONFIG_DEBUG_HIGHMEM is enabled the stack
depth is increased from 20 to 41. But the only thing DEBUG_HIGHMEM does is
to enable a few BUG_ON()'s in the mapping code.

That's a leftover from the historical mapping code which had fixed entries
for various purposes. DEBUG_HIGHMEM inserted guard mappings between the map
types. But that got all ditched when kmap_atomic() switched to a stack
based map management. Though the WITH_KM_FENCE magic survived without being
functional. All the thing does today is to increase the stack depth.

Add a working implementation to the generic kmap_local* implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linuxfoundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20201103095857.268258322@linutronix.de
mm/highmem.c