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 12:00:16 +0000 (13:00 +0100)
commiteb2ac8c497cddd2aa73e6f0777af486a859052ec
treea26bd95e95c5fa8abd06827800d88efafaaa09d4
parent6db7f3bdc15340b51ad9d2f7f680d153c56bab52
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