Skip to content

Commit 7450f6f

Browse files
committed
powerpc: Use the same interrupt prolog for perfmon as other interrupts
The perfmon interrupt is the sole user of a special variant of the interrupt prolog which differs from the one used by external and timer interrupts in that it saves the non-volatile GPRs and doesn't turn the runlatch on. The former is unnecessary and the later is arguably incorrect, so let's clean that up by using the same prolog. While at it we rename that prolog to use the _ASYNC prefix. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 4f8cf36 commit 7450f6f

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

arch/powerpc/include/asm/exception-64s.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -297,21 +297,10 @@ label##_common: \
297297

298298
/*
299299
* Like STD_EXCEPTION_COMMON, but for exceptions that can occur
300-
* in the idle task and therefore need the special idle handling.
300+
* in the idle task and therefore need the special idle handling
301+
* (finish nap and runlatch)
301302
*/
302-
#define STD_EXCEPTION_COMMON_IDLE(trap, label, hdlr) \
303-
.align 7; \
304-
.globl label##_common; \
305-
label##_common: \
306-
EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \
307-
FINISH_NAP; \
308-
DISABLE_INTS; \
309-
bl .save_nvgprs; \
310-
addi r3,r1,STACK_FRAME_OVERHEAD; \
311-
bl hdlr; \
312-
b .ret_from_except
313-
314-
#define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr) \
303+
#define STD_EXCEPTION_COMMON_ASYNC(trap, label, hdlr) \
315304
.align 7; \
316305
.globl label##_common; \
317306
label##_common: \

arch/powerpc/kernel/exceptions-64s.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,15 +458,15 @@ machine_check_common:
458458
bl .machine_check_exception
459459
b .ret_from_except
460460

461-
STD_EXCEPTION_COMMON_LITE(0x500, hardware_interrupt, do_IRQ)
462-
STD_EXCEPTION_COMMON_LITE(0x900, decrementer, .timer_interrupt)
461+
STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
462+
STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
463463
STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
464464
STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
465465
STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
466466
STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
467467
STD_EXCEPTION_COMMON(0xe40, emulation_assist, .program_check_exception)
468468
STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception)
469-
STD_EXCEPTION_COMMON_IDLE(0xf00, performance_monitor, .performance_monitor_exception)
469+
STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, .performance_monitor_exception)
470470
STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)
471471
#ifdef CONFIG_ALTIVEC
472472
STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception)

0 commit comments

Comments
 (0)