Skip to content

Commit 0b549f8

Browse files
committed
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>
1 parent 6179ef4 commit 0b549f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/xtensa/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void do_debug(struct pt_regs *regs);
6969
#define USER 0x02
7070

7171
#define COPROCESSOR(x) \
72-
{ EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER, fast_coprocessor }
72+
{ EXCCAUSE_COPROCESSOR ## x ## _DISABLED, USER|KRNL, fast_coprocessor }
7373

7474
typedef struct {
7575
int cause;

0 commit comments

Comments
 (0)