]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2012 18:00:46 +0000 (11:00 -0700)
commit047ae0a8df99b3bc0dd860ed76d10c04dcb7ad16
tree800716c007575b1c316299300e3316d0d94ed243
parent2a34893940a2d755531050fc8f944bc9af05122c
sparc64: Do not clobber %g2 in xcall_fetch_glob_regs().

%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>
arch/sparc/kernel/central.c
arch/sparc/mm/ultra.S