powerpc/64s: Add support to mask perf interrupts and replay them

Two new bit mask field "IRQ_DISABLE_MASK_PMU" is introduced to support
the masking of PMI and "IRQ_DISABLE_MASK_ALL" to aid interrupt masking
checking.

Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added
to use in the exception code to check for PMI interrupts.

In the masked_interrupt handler, for PMIs we reset the MSR[EE] and
return. In the __check_irq_replay(), replay the PMI interrupt by
calling performance_monitor_common handler.

Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Madhavan Srinivasan
2017-12-20 09:25:53 +05:30
committed by Michael Ellerman
parent f14e953b19
commit f442d00480
5 changed files with 31 additions and 11 deletions

View File

@@ -186,6 +186,11 @@ notrace unsigned int __check_irq_replay(void)
return 0x900;
}
if (happened & PACA_IRQ_PMI) {
local_paca->irq_happened &= ~PACA_IRQ_PMI;
return 0xf00;
}
if (happened & PACA_IRQ_EE) {
local_paca->irq_happened &= ~PACA_IRQ_EE;
return 0x500;
@@ -272,7 +277,7 @@ notrace void arch_local_irq_restore(unsigned long mask)
}
#endif /* CONFIG_TRACE_IRQFLAGS */
irq_soft_mask_set(IRQS_DISABLED);
irq_soft_mask_set(IRQS_ALL_DISABLED);
trace_hardirqs_off();
/*