]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:28 +0000 (07:18 +0100)
commit64441a7b0eb792ec50f63548398182011c7e0356
tree07c93e49ff6c1e05b5c7d9f29cbd004e8d2ecd7b
parentfc55e0de8473d4c84781aea58d8668ef7ac84522
csky: Set regs->usp to kernel sp, when the exception is from kernel

[ Upstream commit f8e17c17b81070f38062dce79ca7f4541851dadd ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/csky/abiv1/inc/abi/entry.h
arch/csky/abiv2/inc/abi/entry.h
arch/csky/kernel/atomic.S