diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-07-16 15:36:57 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-08-19 20:12:28 -0400 |
commit | c5a8c0c99f67ae8a784faafbaaea1529825796e2 (patch) | |
tree | 731b07d0ac0414dbeac5ce940fe59a04a8d63c3f /arch/powerpc/include/asm/exception-64s.h | |
parent | ee43eb788b3a06425fffb912677e2e1c8b00dd3b (diff) |
powerpc: Remove use of a second scratch SPRG in STAB code
The STAB code used on Power3 and RS/64 uses a second scratch SPRG to
save a GPR in order to decide whether to go to do_stab_bolted_* or
to handle a normal data access exception.
This prevents our scheme of freeing SPRG3 which is user visible for
user uses since we cannot use SPRG0 which, on RS/64, seems to be
read-only for supervisor mode (like POWER4).
This reworks the STAB exception entry to use the PACA as temporary
storage instead.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/exception-64s.h')
-rw-r--r-- | arch/powerpc/include/asm/exception-64s.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index 773e380b5fe8..a98653b26231 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h | |||
@@ -66,8 +66,7 @@ | |||
66 | std r9,area+EX_R13(r13); \ | 66 | std r9,area+EX_R13(r13); \ |
67 | mfcr r9 | 67 | mfcr r9 |
68 | 68 | ||
69 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | 69 | #define EXCEPTION_PROLOG_PSERIES_1(label) \ |
70 | EXCEPTION_PROLOG_1(area); \ | ||
71 | ld r12,PACAKBASE(r13); /* get high part of &label */ \ | 70 | ld r12,PACAKBASE(r13); /* get high part of &label */ \ |
72 | ld r10,PACAKMSR(r13); /* get MSR value for kernel */ \ | 71 | ld r10,PACAKMSR(r13); /* get MSR value for kernel */ \ |
73 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | 72 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ |
@@ -78,6 +77,10 @@ | |||
78 | rfid; \ | 77 | rfid; \ |
79 | b . /* prevent speculative execution */ | 78 | b . /* prevent speculative execution */ |
80 | 79 | ||
80 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | ||
81 | EXCEPTION_PROLOG_1(area); \ | ||
82 | EXCEPTION_PROLOG_PSERIES_1(label); | ||
83 | |||
81 | /* | 84 | /* |
82 | * The common exception prolog is used for all except a few exceptions | 85 | * The common exception prolog is used for all except a few exceptions |
83 | * such as a segment miss on a kernel address. We have to be prepared | 86 | * such as a segment miss on a kernel address. We have to be prepared |