]> git.baikalelectronics.ru Git - kernel.git/commit
openrisc: Properly store r31 to pt_regs on unhandled exceptions
authorStafford Horne <shorne@gmail.com>
Sat, 11 Feb 2023 10:14:06 +0000 (19:14 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:53 +0000 (11:35 +0200)
commit02db167be74b41d5b1a2c88bd266cbee06a7cc1c
tree7218af2d809a7b954399439accee6c6fb9336bc6
parenta53e2248c828de8408a99659c07cf7ed134fe2b6
openrisc: Properly store r31 to pt_regs on unhandled exceptions

[ Upstream commit 812489ac4dd91144a74ce65ecf232252a2e406fb ]

In commit 5e448e6d3004 ("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: 5e448e6d3004 ("openrisc: use shadow registers to save regs on exception")
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/openrisc/kernel/entry.S