summaryrefslogtreecommitdiff
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorLinus Walleij <linusw@kernel.org>2026-06-30 18:05:56 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2026-08-05 16:48:11 +0100
commitbb3b2cfeb206f5b10b859e134651b54120e3f530 (patch)
tree6717fcea088ba5c5f15002a48101fa2537135bf2 /arch/arm/kernel
parent055a410f7c9f7efa2b5524ad837d6cca78dd0b81 (diff)
downloadlinux-next-bb3b2cfeb206f5b10b859e134651b54120e3f530.tar.gz
linux-next-bb3b2cfeb206f5b10b859e134651b54120e3f530.zip
ARM: 9480/1: entry: expand comment in __switch_to
As per discussion between the developers in the mail thread linked, expand the comment in __switch_to so that readers of the code understand what is going on. Suggested-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Linus Walleij <linusw@kernel.org>> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/entry-armv.S13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index ef6a657c8d13..b7faefe5bce7 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -557,9 +557,16 @@ ENTRY(__switch_to)
ldmia r4, {r4 - sl, fp, ip, lr} @ Load all regs saved previously
#ifdef CONFIG_VMAP_STACK
@
- @ Do a dummy read from the new stack while running from the old one so
- @ that we can rely on do_translation_fault() to fix up any stale PMD
- @ entries covering the vmalloc region.
+ @ For a non-lazy mm switch, check_vmalloc_seq() has ensured that
+ @ that the active mm's page tables have mappings for the prev
+ @ task's stack and the next task's stack.
+ @
+ @ For a lazy mm switch the active mm's page tables have mappings
+ @ for the prev task's stack but might not have mappings for the
+ @ new task's stack. Do a dummy read from the new stack while
+ @ running from the old stack so that we can rely on
+ @ do_translation_fault() to populate missing PMD entries covering the
+ @ new task's stack in the old task's page tables.
@
ldr r2, [ip]
#ifdef CONFIG_KASAN_VMALLOC