]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ARM: 9461/1: Disable HIGHPTE on PREEMPT_RT kernels
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 11 Nov 2025 15:54:37 +0000 (16:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:12:09 +0000 (13:12 +0100)
commit8aebf58c7bb5c1bd2572887102daea1dd94c05a8
treefb40d4e3043c58c681870dbb81df6074e2eec53c
parentc4896f5fd83664a50ac4fef4131a265d15734e5a
ARM: 9461/1: Disable HIGHPTE on PREEMPT_RT kernels

[ Upstream commit fedadc4137234c3d00c4785eeed3e747fe9036ae ]

gup_pgd_range() is invoked with disabled interrupts and invokes
__kmap_local_page_prot() via pte_offset_map(), gup_p4d_range().
With HIGHPTE enabled, __kmap_local_page_prot() invokes kmap_high_get()
which uses a spinlock_t via lock_kmap_any(). This leads to an
sleeping-while-atomic error on PREEMPT_RT because spinlock_t becomes a
sleeping lock and must not be acquired in atomic context.

The loop in map_new_virtual() uses wait_queue_head_t for wake up which
also is using a spinlock_t.

Since HIGHPTE is rarely needed at all, turn it off for PREEMPT_RT
to allow the use of get_user_pages_fast().

[arnd: rework patch to turn off HIGHPTE instead of HAVE_PAST_GUP]

Co-developed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/Kconfig