]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sparc64: Do not clobber %g2 in xcall_fetch_glob_regs().
authorDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2012 18:00:46 +0000 (11:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 May 2012 17:46:17 +0000 (10:46 -0700)
commit64e7fc77d3eef5a0864929a58a034d6be4a6fb1d
tree995d7d092620d2017983a7bdbb77973dbb0a6ca4
parent406c7d0dfa49cba7ee87584fec108bd422a59d5e
sparc64: Do not clobber %g2 in xcall_fetch_glob_regs().

[ Upstream commit a5a737e090e25981e99d69f01400e3a80356581c ]

%g2 is meant to hold the CPUID number throughout this routine, since
at the very beginning, and at the very end, we use %g2 to calculate
indexes into per-cpu arrays.

However we erroneously clobber it in order to hold the %cwp register
value mid-stream.

Fix this code to use %g3 for the %cwp read and related calulcations
instead.

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sparc/kernel/central.c
arch/sparc/mm/ultra.S