Skip to content

Commit

Permalink
powerpc: Change PACA from SPRG3 to SPRG1
Browse files Browse the repository at this point in the history
This change the SPRG used to store the PACA on ppc64 from
SPRG3 to SPRG1. SPRG3 is user readable on most processors
and we want to use it for other things. We change the scratch
SPRG used by exception vectors from SRPG1 to SPRG2.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Aug 20, 2009
1 parent 527b363 commit 063517b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/powerpc/include/asm/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,12 +649,12 @@
* SPRG usage:
*
* All 64-bit:
* - SPRG3 stores PACA pointer
* - SPRG1 stores PACA pointer
*
* 64-bit server:
* - SPRG0 unused (reserved for HV on Power4)
* - SPRG1 scratch for exception vectors
* - SPRG2 unused
* - SPRG2 scratch for exception vectors
* - SPRG3 unused (user visible)
*
* All 32-bit:
* - SPRG3 current thread_info pointer
Expand Down Expand Up @@ -700,13 +700,13 @@
*
*/
#ifdef CONFIG_PPC64
#define SPRN_SPRG_PACA SPRN_SPRG3
#define SPRN_SPRG_PACA SPRN_SPRG1
#else
#define SPRN_SPRG_THREAD SPRN_SPRG3
#endif

#ifdef CONFIG_PPC_BOOK3S_64
#define SPRN_SPRG_SCRATCH0 SPRN_SPRG1
#define SPRN_SPRG_SCRATCH0 SPRN_SPRG2
#endif

#ifdef CONFIG_PPC_BOOK3S_32
Expand Down

0 comments on commit 063517b

Please sign in to comment.