summaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-01-04 03:26:16 +0100
committerMax Filippov <jcmvbkbc@gmail.com>2022-05-02 04:51:23 +0200
commit0b549f813387231e0053c10dd7006e69ad4c5f95 (patch)
tree3ed537d4d7b286407c9455640ee9126414511ebf /arch/xtensa
parentxtensa: use callx0 opcode in fast_coprocessor (diff)
downloadlinux-0b549f813387231e0053c10dd7006e69ad4c5f95.tar.xz
linux-0b549f813387231e0053c10dd7006e69ad4c5f95.zip
xtensa: handle coprocessor exceptions in kernel mode
In order to let drivers use xtensa coprocessors on behalf of the calling process the kernel must handle coprocessor exceptions from the kernel mode the same way as from the user mode. This is not sufficient to allow using coprocessors transparently in IRQ or softirq context. Should such users exist they must be aware of the context and do the right thing, e.g. preserve the coprocessor state and resore it after use. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index 95903f25e523..62c497605128 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -69,7 +69,7 @@ static void do_debug(struct pt_regs *regs);
#define USER 0x02
#define COPROCESSOR(x) \
-{ EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER, fast_coprocessor }
+{ EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER|KRNL, fast_coprocessor }
typedef struct {
int cause;