powerpc: Remove misleading DISABLE_INTS
DISABLE_INTS has a long and storied history, but for some time now it has not actually disabled interrupts. For the open-coded exception handlers, just stop using it, instead call RECONCILE_IRQ_STATE directly. This has the benefit of removing a level of indirection, and making it clear that r10 & r11 are used at that point. For the addition case we still need a macro, so rename it to clarify what it actually does. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
a1d711c53f
commit
9daf112bd4
@ -513,8 +513,11 @@ label##_relon_hv: \
|
|||||||
* runlatch, etc...
|
* runlatch, etc...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Exception addition: Hard disable interrupts */
|
/*
|
||||||
#define DISABLE_INTS RECONCILE_IRQ_STATE(r10,r11)
|
* This addition reconciles our actual IRQ state with the various software
|
||||||
|
* flags that track it. This may call C code.
|
||||||
|
*/
|
||||||
|
#define ADD_RECONCILE RECONCILE_IRQ_STATE(r10,r11)
|
||||||
|
|
||||||
#define ADD_NVGPRS \
|
#define ADD_NVGPRS \
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
@ -540,7 +543,7 @@ label##_common: \
|
|||||||
|
|
||||||
#define STD_EXCEPTION_COMMON(trap, label, hdlr) \
|
#define STD_EXCEPTION_COMMON(trap, label, hdlr) \
|
||||||
EXCEPTION_COMMON(trap, label, hdlr, ret_from_except, \
|
EXCEPTION_COMMON(trap, label, hdlr, ret_from_except, \
|
||||||
ADD_NVGPRS;DISABLE_INTS)
|
ADD_NVGPRS;ADD_RECONCILE)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Like STD_EXCEPTION_COMMON, but for exceptions that can occur
|
* Like STD_EXCEPTION_COMMON, but for exceptions that can occur
|
||||||
@ -549,7 +552,7 @@ label##_common: \
|
|||||||
*/
|
*/
|
||||||
#define STD_EXCEPTION_COMMON_ASYNC(trap, label, hdlr) \
|
#define STD_EXCEPTION_COMMON_ASYNC(trap, label, hdlr) \
|
||||||
EXCEPTION_COMMON(trap, label, hdlr, ret_from_except_lite, \
|
EXCEPTION_COMMON(trap, label, hdlr, ret_from_except_lite, \
|
||||||
FINISH_NAP;DISABLE_INTS;RUNLATCH_ON)
|
FINISH_NAP;ADD_RECONCILE;RUNLATCH_ON)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When the idle code in power4_idle puts the CPU into NAP mode,
|
* When the idle code in power4_idle puts the CPU into NAP mode,
|
||||||
|
@ -965,7 +965,7 @@ data_access_common:
|
|||||||
mfspr r10,SPRN_DSISR
|
mfspr r10,SPRN_DSISR
|
||||||
stw r10,PACA_EXGEN+EX_DSISR(r13)
|
stw r10,PACA_EXGEN+EX_DSISR(r13)
|
||||||
EXCEPTION_PROLOG_COMMON(0x300, PACA_EXGEN)
|
EXCEPTION_PROLOG_COMMON(0x300, PACA_EXGEN)
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
ld r12,_MSR(r1)
|
ld r12,_MSR(r1)
|
||||||
ld r3,PACA_EXGEN+EX_DAR(r13)
|
ld r3,PACA_EXGEN+EX_DAR(r13)
|
||||||
lwz r4,PACA_EXGEN+EX_DSISR(r13)
|
lwz r4,PACA_EXGEN+EX_DSISR(r13)
|
||||||
@ -981,7 +981,7 @@ h_data_storage_common:
|
|||||||
stw r10,PACA_EXGEN+EX_DSISR(r13)
|
stw r10,PACA_EXGEN+EX_DSISR(r13)
|
||||||
EXCEPTION_PROLOG_COMMON(0xe00, PACA_EXGEN)
|
EXCEPTION_PROLOG_COMMON(0xe00, PACA_EXGEN)
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl unknown_exception
|
bl unknown_exception
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -990,7 +990,7 @@ h_data_storage_common:
|
|||||||
.globl instruction_access_common
|
.globl instruction_access_common
|
||||||
instruction_access_common:
|
instruction_access_common:
|
||||||
EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
|
EXCEPTION_PROLOG_COMMON(0x400, PACA_EXGEN)
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
ld r12,_MSR(r1)
|
ld r12,_MSR(r1)
|
||||||
ld r3,_NIP(r1)
|
ld r3,_NIP(r1)
|
||||||
andis. r4,r12,0x5820
|
andis. r4,r12,0x5820
|
||||||
@ -1054,7 +1054,7 @@ slb_miss_fault:
|
|||||||
|
|
||||||
unrecov_user_slb:
|
unrecov_user_slb:
|
||||||
EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
|
EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
1: addi r3,r1,STACK_FRAME_OVERHEAD
|
1: addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl unrecoverable_exception
|
bl unrecoverable_exception
|
||||||
@ -1077,7 +1077,7 @@ machine_check_common:
|
|||||||
stw r10,PACA_EXGEN+EX_DSISR(r13)
|
stw r10,PACA_EXGEN+EX_DSISR(r13)
|
||||||
EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
|
EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
|
||||||
FINISH_NAP
|
FINISH_NAP
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
ld r3,PACA_EXGEN+EX_DAR(r13)
|
ld r3,PACA_EXGEN+EX_DAR(r13)
|
||||||
lwz r4,PACA_EXGEN+EX_DSISR(r13)
|
lwz r4,PACA_EXGEN+EX_DSISR(r13)
|
||||||
std r3,_DAR(r1)
|
std r3,_DAR(r1)
|
||||||
@ -1100,7 +1100,7 @@ alignment_common:
|
|||||||
std r3,_DAR(r1)
|
std r3,_DAR(r1)
|
||||||
std r4,_DSISR(r1)
|
std r4,_DSISR(r1)
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl alignment_exception
|
bl alignment_exception
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1110,7 +1110,7 @@ alignment_common:
|
|||||||
program_check_common:
|
program_check_common:
|
||||||
EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
|
EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl program_check_exception
|
bl program_check_exception
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1121,7 +1121,7 @@ fp_unavailable_common:
|
|||||||
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
|
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
|
||||||
bne 1f /* if from user, just load it up */
|
bne 1f /* if from user, just load it up */
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl kernel_fp_unavailable_exception
|
bl kernel_fp_unavailable_exception
|
||||||
BUG_OPCODE
|
BUG_OPCODE
|
||||||
@ -1140,7 +1140,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_TM)
|
|||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
2: /* User process was in a transaction */
|
2: /* User process was in a transaction */
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl fp_unavailable_tm
|
bl fp_unavailable_tm
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1166,7 +1166,7 @@ BEGIN_FTR_SECTION
|
|||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
2: /* User process was in a transaction */
|
2: /* User process was in a transaction */
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl altivec_unavailable_tm
|
bl altivec_unavailable_tm
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1175,7 +1175,7 @@ BEGIN_FTR_SECTION
|
|||||||
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
|
END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
|
||||||
#endif
|
#endif
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl altivec_unavailable_exception
|
bl altivec_unavailable_exception
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1200,7 +1200,7 @@ BEGIN_FTR_SECTION
|
|||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
||||||
2: /* User process was in a transaction */
|
2: /* User process was in a transaction */
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl vsx_unavailable_tm
|
bl vsx_unavailable_tm
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1209,7 +1209,7 @@ BEGIN_FTR_SECTION
|
|||||||
END_FTR_SECTION_IFSET(CPU_FTR_VSX)
|
END_FTR_SECTION_IFSET(CPU_FTR_VSX)
|
||||||
#endif
|
#endif
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl vsx_unavailable_exception
|
bl vsx_unavailable_exception
|
||||||
b ret_from_except
|
b ret_from_except
|
||||||
@ -1468,7 +1468,7 @@ slb_miss_realmode:
|
|||||||
|
|
||||||
unrecov_slb:
|
unrecov_slb:
|
||||||
EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
|
EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
|
||||||
DISABLE_INTS
|
RECONCILE_IRQ_STATE(r10, r11)
|
||||||
bl save_nvgprs
|
bl save_nvgprs
|
||||||
1: addi r3,r1,STACK_FRAME_OVERHEAD
|
1: addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
bl unrecoverable_exception
|
bl unrecoverable_exception
|
||||||
|
Loading…
Reference in New Issue
Block a user