summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/traps.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2022-04-15 11:59:33 +0200
committerMax Filippov <jcmvbkbc@gmail.com>2022-05-02 04:51:22 +0200
commit9fa8c59f5f82aec99a7f87095ab093b68dd492a5 (patch)
tree4440140a9065f5d6a94ace1e597bc8fc83f9389b /arch/xtensa/kernel/traps.c
parentxtensa: clean up declarations in coprocessor.h (diff)
downloadlinux-9fa8c59f5f82aec99a7f87095ab093b68dd492a5.tar.xz
linux-9fa8c59f5f82aec99a7f87095ab093b68dd492a5.zip
xtensa: clean up excsave1 initialization
Use xtensa_set_sr instead of inline assembly. Rename local variable exc_table in early_trap_init to avoid conflict with per-CPU variable of the same name. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/traps.c')
-rw-r--r--arch/xtensa/kernel/traps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index d6b1a0c3e319..95903f25e523 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -372,8 +372,7 @@ __init trap_set_handler(int cause, xtensa_exception_handler *handler)
static void trap_init_excsave(void)
{
- unsigned long excsave1 = (unsigned long)this_cpu_ptr(&exc_table);
- __asm__ __volatile__("wsr %0, excsave1\n" : : "a" (excsave1));
+ xtensa_set_sr(this_cpu_ptr(&exc_table), excsave1);
}
static void trap_init_debug(void)