aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-07-14 16:52:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-08-19 20:12:27 -0400
commitee43eb788b3a06425fffb912677e2e1c8b00dd3b (patch)
tree7233cb47647837ab00af81270b3a16555d88a1f1 /arch/powerpc/kernel/entry_64.S
parent8aa34ab8b2dc96ca6c4feecfb87ed13f0d40ef98 (diff)
powerpc: Use names rather than numbers for SPRGs (v2)
The kernel uses SPRG registers for various purposes, typically in low level assembly code as scratch registers or to hold per-cpu global infos such as the PACA or the current thread_info pointer. We want to be able to easily shuffle the usage of those registers as some implementations have specific constraints realted to some of them, for example, some have userspace readable aliases, etc.. and the current choice isn't always the best. This patch should not change any code generation, and replaces the usage of SPRN_SPRGn everywhere in the kernel with a named replacement and adds documentation next to the definition of the names as to what those are used for on each processor family. The only parts that still use the original numbers are bits of KVM or suspend/resume code that just blindly needs to save/restore all the SPRGs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 43e073477c34..dbf0e3115611 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -762,7 +762,7 @@ _GLOBAL(enter_rtas)
762 762
763_STATIC(rtas_return_loc) 763_STATIC(rtas_return_loc)
764 /* relocation is off at this point */ 764 /* relocation is off at this point */
765 mfspr r4,SPRN_SPRG3 /* Get PACA */ 765 mfspr r4,SPRN_SPRG_PACA /* Get PACA */
766 clrldi r4,r4,2 /* convert to realmode address */ 766 clrldi r4,r4,2 /* convert to realmode address */
767 767
768 bcl 20,31,$+4 768 bcl 20,31,$+4
@@ -793,7 +793,7 @@ _STATIC(rtas_restore_regs)
793 REST_8GPRS(14, r1) /* Restore the non-volatiles */ 793 REST_8GPRS(14, r1) /* Restore the non-volatiles */
794 REST_10GPRS(22, r1) /* ditto */ 794 REST_10GPRS(22, r1) /* ditto */
795 795
796 mfspr r13,SPRN_SPRG3 796 mfspr r13,SPRN_SPRG_PACA
797 797
798 ld r4,_CCR(r1) 798 ld r4,_CCR(r1)
799 mtcr r4 799 mtcr r4