Thread (28 messages) 28 messages, 4 authors, 5d ago

Re: [PATCH v2 20/21] arm64: tracing: Advertise a mode of EL1t in synthetic kernel regs

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2026-09-22 14:00:31
Also in: lkml
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

On Fri, Sep 18, 2026 at 05:14:04PM +0100, Will Deacon wrote:
When synthesising a kernel regs structure for ftrace or perf, advertise
a mode of EL1t to reflect the mode in which the kernel runs for the vast
majority of the time.
For consistency, not that it makes any difference in practice, should we
also do:
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index 79a19be88ced..c7f954f1ddbf 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -489,7 +489,7 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
 		 * be initialized by start_thread() or start_compat_thread().
 		 */
 		memset(childregs, 0, sizeof(struct pt_regs));
-		childregs->pstate = PSR_MODE_EL1h | PSR_IL_BIT;
+		childregs->pstate = PSR_MODE_EL1t | PSR_IL_BIT;
 		childregs->stackframe.type = FRAME_META_TYPE_FINAL;

 		p->thread.cpu_context.x19 = (unsigned long)args->fn;
-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help