Commit c59809c7 authored by Stafford Horne's avatar Stafford Horne Committed by sanglipeng
Browse files

openrisc: Properly store r31 to pt_regs on unhandled exceptions

stable inclusion
from stable-v5.10.180
commit 8f009ae90b2bca5da5dbdf818debdbf917628d49
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8f009ae90b2bca5da5dbdf818debdbf917628d49



--------------------------------

[ Upstream commit 812489ac ]

In commit 91993c8c ("openrisc: use shadow registers to save regs on
exception") the unhandled exception path was changed to do an early
store of r30 instead of r31.  The entry code was not updated and r31 is
not getting stored to pt_regs.

This patch updates the entry handler to store r31 instead of r30.  We
also remove some misleading commented out store r30 and r31
instructrions.

I noticed this while working on adding floating point exception
handling,  This issue probably would never impact anything since we kill
the process or Oops right away on unhandled exceptions.

Fixes: 91993c8c ("openrisc: use shadow registers to save regs on exception")
Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent b5817dca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment