linux/arch/powerpc/sysdev
Michael Ellerman 0834d627fb powerpc/mpic: Check if cpu_possible() in mpic_physmask()
In mpic_physmask() we loop over all CPUs up to 32, then get the hard
SMP processor id of that CPU.

Currently that's possibly walking off the end of the paca array, but
in a future patch we will change the paca array to be an array of
pointers, and in that case we will get a NULL for missing CPUs and
oops. eg:

  Unable to handle kernel paging request for data at address 0x88888888888888b8
  Faulting instruction address: 0xc00000000004e380
  Oops: Kernel access of bad area, sig: 11 [#1]
  ...
  NIP .mpic_set_affinity+0x60/0x1a0
  LR  .irq_do_set_affinity+0x48/0x100

Fix it by checking the CPU is possible, this also fixes the code if
there are gaps in the CPU numbering which probably never happens on
mpic systems but who knows.

Debugged-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-03-30 23:34:22 +11:00
..
ge License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xics powerpc: Use pr_warn instead of pr_warning 2017-12-04 11:54:34 +11:00
xive KVM changes for 4.16 2018-02-10 13:16:35 -08:00
6xx-suspend.S
cpm1.c powerpc/sysdev: change CPM GPIO to platform_device 2018-01-20 23:29:02 -06:00
cpm2.c powerpc/sysdev: change CPM GPIO to platform_device 2018-01-20 23:29:02 -06:00
cpm2_pic.c
cpm2_pic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpm_common.c powerpc/sysdev: change CPM GPIO to platform_device 2018-01-20 23:29:02 -06:00
cpm_gpio.c powerpc/sysdev: change CPM GPIO to platform_device 2018-01-20 23:29:02 -06:00
dart.h
dart_iommu.c powerpc: rename dma_direct_ to dma_nommu_ 2018-01-10 16:41:14 +01:00
dcr-low.S ppc: move exports to definitions 2016-08-07 23:50:09 -04:00
dcr.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
ehv_pic.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
fsl_85xx_cache_ctlr.h
fsl_85xx_cache_sram.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
fsl_85xx_l2ctlr.c powerpc/85xx: Don't report SRAM to L2 cache fallback as error 2016-07-08 19:55:34 -05:00
fsl_gtm.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
fsl_lbc.c powerpc/fsl-lbc: use DEFINE_SPINLOCK() 2016-12-09 23:08:40 -06:00
fsl_mpic_err.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
fsl_mpic_timer_wakeup.c powerpc/mpic_timer: avoid struct timeval 2018-01-21 15:06:16 +11:00
fsl_msi.c kernel/irq: Extend lockdep class for request mutex 2017-12-28 12:26:35 +01:00
fsl_msi.h
fsl_pci.c powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
fsl_pci.h
fsl_pmc.c powerpc/fsl_pmc: use builtin_platform_driver 2016-12-04 19:51:44 -06:00
fsl_rcpm.c powerpc/rcpm: Fix build break when SMP=n 2016-03-16 15:22:32 +11:00
fsl_rio.c rapidio: remove global irq spinlocks from the subsystem 2017-10-03 17:54:24 -07:00
fsl_rio.h rapidio: add global inbound port write interfaces 2016-03-22 15:36:02 -07:00
fsl_rmu.c rapidio: remove global irq spinlocks from the subsystem 2017-10-03 17:54:24 -07:00
fsl_soc.c powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx 2017-08-10 23:32:05 +10:00
fsl_soc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
grackle.c
i8259.c powerpc: Set I/O port resource types correctly 2017-12-18 23:07:45 -06:00
indirect_pci.c
ipic.c powerpc/ipic: Fix status get and status clear 2017-11-06 16:48:13 +11:00
ipic.h
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile powerpc/cell: Remove axonram driver 2018-01-28 17:00:36 +11:00
micropatch.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmio_nvram.c powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
mpc5xxx_clocks.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpic.c powerpc/mpic: Check if cpu_possible() in mpic_physmask() 2018-03-30 23:34:22 +11:00
mpic.h
mpic_msgr.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
mpic_msi.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
mpic_timer.c powerpc/mpic_timer: avoid struct timeval 2018-01-21 15:06:16 +11:00
mpic_u3msi.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
msi_bitmap.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
mv64x60.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mv64x60_dev.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
mv64x60_pci.c pci-v4.16-changes 2018-02-06 09:59:40 -08:00
mv64x60_pic.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
mv64x60_udbg.c
of_rtc.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
pmi.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
rtc_cmos_setup.c
scom.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
simple_gpio.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
simple_gpio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tsi108_dev.c
tsi108_pci.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
udbg_memcons.c
xilinx_intc.c powerpc/virtex: Use generic xilinx irqchip driver 2016-11-29 09:14:50 +00:00
xilinx_pci.c