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

Catalin Marinas catalin.marinas at arm.com
Tue Sep 22 07:00:25 PDT 2026


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



More information about the linux-arm-kernel mailing list