OSDN Git Service

csky: Set regs->usp to kernel sp, when the exception is from kernel
authorGuo Ren <guoren@linux.alibaba.com>
Tue, 17 Dec 2019 03:12:55 +0000 (11:12 +0800)
committerGuo Ren <guoren@linux.alibaba.com>
Fri, 21 Feb 2020 07:43:24 +0000 (15:43 +0800)
commitf8e17c17b81070f38062dce79ca7f4541851dadd
tree0de930c6cf557570a44beb5c167384ca0692d791
parent7f4a567332f035ab16b29010fbd04a0f10183c77
csky: Set regs->usp to kernel sp, when the exception is from kernel

In the past, we didn't care about kernel sp when saving pt_reg. But in some
cases, we still need pt_reg->usp to represent the kernel stack before enter
exception.

For cmpxhg in atomic.S, we need save and restore usp for above.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
arch/csky/abiv1/inc/abi/entry.h
arch/csky/abiv2/inc/abi/entry.h
arch/csky/kernel/atomic.S