mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
d6a4f70909
On PowerNV platforms, when a CPU is offline, we put it into nap mode. It's possible that the CPU wakes up from nap mode while it is still offline due to a stray IPI. A misdirected device interrupt could also potentially cause it to wake up. In that circumstance, we need to clear the interrupt so that the CPU can go back to nap mode. In the past the clearing of the interrupt was accomplished by briefly enabling interrupts and allowing the normal interrupt handling code (do_IRQ() etc.) to handle the interrupt. This has the problem that this code calls irq_enter() and irq_exit(), which call functions such as account_system_vtime() which use RCU internally. Use of RCU is not permitted on offline CPUs and will trigger errors if RCU checking is enabled. To avoid calling into any generic code which might use RCU, we adopt a different method of clearing interrupts on offline CPUs. Since we are on the PowerNV platform, we know that the system interrupt controller is a XICS being driven directly (i.e. not via hcalls) by the kernel. Hence this adds a new icp_native_flush_interrupt() function to the native-mode XICS driver and arranges to call that when an offline CPU is woken from nap. This new function reads the interrupt from the XICS. If it is an IPI, it clears the IPI; if it is a device interrupt, it prints a warning and disables the source. Then it does the end-of-interrupt processing for the interrupt. The other thing that briefly enabling interrupts did was to check and clear the irq_happened flag in this CPU's PACA. Therefore, after flushing the interrupt from the XICS, we also clear all bits except the PACA_IRQ_HARD_DIS (interrupts are hard disabled) bit from the irq_happened flag. The PACA_IRQ_HARD_DIS flag is set by power7_nap() and is left set to indicate that interrupts are hard disabled. This means we then have to ignore that flag in power7_nap(), which is reasonable since it doesn't indicate that any interrupt event needs servicing. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> |
||
---|---|---|
.. | ||
ge | ||
qe_lib | ||
xics | ||
6xx-suspend.S | ||
axonram.c | ||
cpm1.c | ||
cpm2_pic.c | ||
cpm2_pic.h | ||
cpm2.c | ||
cpm_common.c | ||
dart_iommu.c | ||
dart.h | ||
dcr-low.S | ||
dcr.c | ||
ehv_pic.c | ||
fsl_85xx_cache_ctlr.h | ||
fsl_85xx_cache_sram.c | ||
fsl_85xx_l2ctlr.c | ||
fsl_gtm.c | ||
fsl_lbc.c | ||
fsl_mpic_err.c | ||
fsl_mpic_timer_wakeup.c | ||
fsl_msi.c | ||
fsl_msi.h | ||
fsl_pci.c | ||
fsl_pci.h | ||
fsl_pmc.c | ||
fsl_rio.c | ||
fsl_rio.h | ||
fsl_rmu.c | ||
fsl_soc.c | ||
fsl_soc.h | ||
grackle.c | ||
i8259.c | ||
indirect_pci.c | ||
ipic.c | ||
ipic.h | ||
Kconfig | ||
Makefile | ||
micropatch.c | ||
mmio_nvram.c | ||
mpc5xxx_clocks.c | ||
mpc8xx_pic.c | ||
mpc8xx_pic.h | ||
mpic_msgr.c | ||
mpic_msi.c | ||
mpic_pasemi_msi.c | ||
mpic_timer.c | ||
mpic_u3msi.c | ||
mpic.c | ||
mpic.h | ||
msi_bitmap.c | ||
mv64x60_dev.c | ||
mv64x60_pci.c | ||
mv64x60_pic.c | ||
mv64x60_udbg.c | ||
mv64x60.h | ||
of_rtc.c | ||
pmi.c | ||
ppc4xx_cpm.c | ||
ppc4xx_gpio.c | ||
ppc4xx_hsta_msi.c | ||
ppc4xx_msi.c | ||
ppc4xx_ocm.c | ||
ppc4xx_pci.c | ||
ppc4xx_pci.h | ||
ppc4xx_soc.c | ||
rtc_cmos_setup.c | ||
scom.c | ||
simple_gpio.c | ||
simple_gpio.h | ||
tsi108_dev.c | ||
tsi108_pci.c | ||
udbg_memcons.c | ||
uic.c | ||
xilinx_intc.c | ||
xilinx_pci.c |