summaryrefslogtreecommitdiff
path: root/arch/xtensa/kernel/asm-offsets.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2022-05-13 08:11:14 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2022-05-17 03:35:43 -0700
commit5cc5f19f884a75f0bf96b95b4292fcc81effd755 (patch)
treea751a2cec798c43780f333a1bd2d4d2583833c07 /arch/xtensa/kernel/asm-offsets.c
parentd74862007e0849fad8ba86447e6f05928f920640 (diff)
xtensa: improve call0 ABI probing
When call0 userspace ABI support by probing is enabled instructions that cause illegal instruction exception when PS.WOE is clear are retried with PS.WOE set before calling c-level exception handler. Record user pc at which PS.WOE was set in the fast exception handler and clear PS.WOE in the c-level exception handler if we get there from the same address. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/asm-offsets.c')
-rw-r--r--arch/xtensa/kernel/asm-offsets.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c
index 9a1db6ffcbf4..da38de20ae59 100644
--- a/arch/xtensa/kernel/asm-offsets.c
+++ b/arch/xtensa/kernel/asm-offsets.c
@@ -88,6 +88,9 @@ int main(void)
OFFSET(TI_STSTUS, thread_info, status);
OFFSET(TI_CPU, thread_info, cpu);
OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
+#ifdef CONFIG_USER_ABI_CALL0_PROBE
+ OFFSET(TI_PS_WOE_FIX_ADDR, thread_info, ps_woe_fix_addr);
+#endif
/* struct thread_info (offset from start_struct) */
DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra));