ARC: show_regs: fix r12 printing and simplify
authorVineet Gupta <vgupta@synopsys.com>
Sat, 8 Aug 2020 04:29:28 +0000 (21:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:34 +0000 (13:55 +0200)
commit4422ef3886450d9a5e2a4b4a30f8f9be3639123b
tree127556c080656fd163927f72ce01dd1f38fb61b9
parent74e4b9ae64a2749bd95fed1e700d44c36e7aadeb
ARC: show_regs: fix r12 printing and simplify

[ Upstream commit e5c388b4b967037a0e00b60194b0dbcf94881a9b ]

when working on ARC64, spotted an issue in ARCv2 reg file printing.
print_reg_file() assumes contiguous reg-file whereas in ARCv2 they are
not: r12 comes before r0-r11 due to hardware auto-save. Apparently this
issue has been present since v2 port submission.

To avoid bolting hacks for this discontinuity while looping through
pt_regs, just ditching the loop and print pt_regs directly.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arc/kernel/troubleshoot.c