mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
powerpc/32: Add EXCEPTION_PROLOG_0 in head_32.h
This patch creates a macro for the very first part of exception prolog, this will help when implementing CONFIG_VMAP_STACK Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/2249fe62f481121a180e9655ad2b998093f318f3.1576916812.git.christophe.leroy@c-s.fr
This commit is contained in:
parent
39bccfd164
commit
1f1c4d0122
@ -272,9 +272,7 @@ __secondary_hold_acknowledge:
|
|||||||
*/
|
*/
|
||||||
. = 0x200
|
. = 0x200
|
||||||
DO_KVM 0x200
|
DO_KVM 0x200
|
||||||
mtspr SPRN_SPRG_SCRATCH0,r10
|
EXCEPTION_PROLOG_0
|
||||||
mtspr SPRN_SPRG_SCRATCH1,r11
|
|
||||||
mfcr r10
|
|
||||||
#ifdef CONFIG_PPC_CHRP
|
#ifdef CONFIG_PPC_CHRP
|
||||||
mfspr r11, SPRN_SPRG_THREAD
|
mfspr r11, SPRN_SPRG_THREAD
|
||||||
lwz r11, RTAS_SP(r11)
|
lwz r11, RTAS_SP(r11)
|
||||||
|
@ -10,13 +10,16 @@
|
|||||||
* We assume sprg3 has the physical address of the current
|
* We assume sprg3 has the physical address of the current
|
||||||
* task's thread_struct.
|
* task's thread_struct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.macro EXCEPTION_PROLOG
|
.macro EXCEPTION_PROLOG
|
||||||
|
EXCEPTION_PROLOG_0
|
||||||
|
EXCEPTION_PROLOG_1
|
||||||
|
EXCEPTION_PROLOG_2
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro EXCEPTION_PROLOG_0
|
||||||
mtspr SPRN_SPRG_SCRATCH0,r10
|
mtspr SPRN_SPRG_SCRATCH0,r10
|
||||||
mtspr SPRN_SPRG_SCRATCH1,r11
|
mtspr SPRN_SPRG_SCRATCH1,r11
|
||||||
mfcr r10
|
mfcr r10
|
||||||
EXCEPTION_PROLOG_1
|
|
||||||
EXCEPTION_PROLOG_2
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro EXCEPTION_PROLOG_1
|
.macro EXCEPTION_PROLOG_1
|
||||||
|
@ -494,10 +494,7 @@ InstructionTLBError:
|
|||||||
*/
|
*/
|
||||||
. = 0x1400
|
. = 0x1400
|
||||||
DataTLBError:
|
DataTLBError:
|
||||||
mtspr SPRN_SPRG_SCRATCH0, r10
|
EXCEPTION_PROLOG_0
|
||||||
mtspr SPRN_SPRG_SCRATCH1, r11
|
|
||||||
mfcr r10
|
|
||||||
|
|
||||||
mfspr r11, SPRN_DAR
|
mfspr r11, SPRN_DAR
|
||||||
cmpwi cr0, r11, RPN_PATTERN
|
cmpwi cr0, r11, RPN_PATTERN
|
||||||
beq- FixupDAR /* must be a buggy dcbX, icbi insn. */
|
beq- FixupDAR /* must be a buggy dcbX, icbi insn. */
|
||||||
@ -530,9 +527,7 @@ DARFixed:/* Return from dcbx instruction bug workaround */
|
|||||||
*/
|
*/
|
||||||
. = 0x1c00
|
. = 0x1c00
|
||||||
DataBreakpoint:
|
DataBreakpoint:
|
||||||
mtspr SPRN_SPRG_SCRATCH0, r10
|
EXCEPTION_PROLOG_0
|
||||||
mtspr SPRN_SPRG_SCRATCH1, r11
|
|
||||||
mfcr r10
|
|
||||||
mfspr r11, SPRN_SRR0
|
mfspr r11, SPRN_SRR0
|
||||||
cmplwi cr0, r11, (.Ldtlbie - PAGE_OFFSET)@l
|
cmplwi cr0, r11, (.Ldtlbie - PAGE_OFFSET)@l
|
||||||
cmplwi cr7, r11, (.Litlbie - PAGE_OFFSET)@l
|
cmplwi cr7, r11, (.Litlbie - PAGE_OFFSET)@l
|
||||||
|
Loading…
Reference in New Issue
Block a user