linux-stable/arch/powerpc/platforms/powernv
Alexey Kardashevskiy 4be518d838 powerpc/iommu: Do not immediately panic when failed IOMMU table allocation
Most platforms allocate IOMMU table structures (specifically it_map)
at the boot time and when this fails - it is a valid reason for panic().

However the powernv platform allocates it_map after a device is returned
to the host OS after being passed through and this happens long after
the host OS booted. It is quite possible to trigger the it_map allocation
panic() and kill the host even though it is not necessary - the host OS
can still use the DMA bypass mode (requires a tiny fraction of it_map's
memory) and even if that fails, the host OS is runnnable as it was without
the device for which allocating it_map causes the panic.

Instead of immediately crashing in a powernv/ioda2 system, this prints
an error and continues. All other platforms still call panic().

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Leonardo Bras <leobras.c@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210216033307.69863-3-aik@ozlabs.ru
2021-04-23 01:38:04 +10:00
..
copy-paste.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
eeh-powernv.c powerpc/eeh: Clean up PE addressing 2020-10-06 23:22:25 +11:00
idle.c powerpc: convert interrupt handlers to use wrappers 2021-02-09 00:02:12 +11:00
Kconfig powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations 2020-11-19 16:57:00 +11:00
Makefile powerpc/powernv/sriov: Move SR-IOV into a separate file 2020-07-26 23:34:22 +10:00
memtrace.c powerpc/powernv/memtrace: Allow mmaping trace buffers 2021-04-08 21:17:44 +10:00
npu-dma.c powerpc/powernv/npu: Do not attempt NPU2 setup on POWER8NVL NPU 2020-12-04 16:55:31 +11:00
ocxl.c ocxl: Initiate a TLB invalidate command 2020-12-04 01:01:30 +11:00
opal-async.c powerpc: Use fallthrough pseudo-keyword 2020-07-29 21:09:37 +10:00
opal-call.c powerpc/powernv: Add OPAL API interface to access secure variable 2019-11-13 00:33:22 +11:00
opal-core.c powerpc/powernv: make symbol 'mpipl_kobj' static 2021-04-14 23:04:17 +10:00
opal-dump.c powerpc/powernv/dump: Handle multiple writes to ack attribute 2020-10-19 22:58:52 +11:00
opal-elog.c powerpc/powernv: Rate limit opal-elog read failure message 2020-12-15 22:53:27 +11:00
opal-fadump.c powerpc: Replace _ALIGN_DOWN() by ALIGN_DOWN() 2020-05-11 23:15:15 +10:00
opal-fadump.h powerpc/fadump: support holes in kernel boot memory area 2019-09-14 00:04:46 +10:00
opal-flash.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-hmi.c powerpc/64s/powernv: Ratelimit harmless HMI error printing 2020-12-04 01:01:23 +11:00
opal-imc.c powerpc/powernv: Re-enable imc trace-mode in kernel 2020-04-03 00:09:58 +11:00
opal-irqchip.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-kmsg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-lpc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-memory-errors.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opal-msglog.c powerpc/powernv: Include asm/powernv.h from the local powernv.h 2020-08-25 01:31:33 +10:00
opal-nvram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-power.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-powercap.c powerpc/powernv: Make some symbols static 2019-11-13 16:58:06 +11:00
opal-prd.c powerpc/powernv: Remove unneeded variable: "rc" 2021-03-29 13:22:19 +11:00
opal-psr.c powerpc/powernv: Make some symbols static 2019-11-13 16:58:06 +11:00
opal-rtc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-secvar.c powerpc/powernv: Add OPAL API interface to access secure variable 2019-11-13 00:33:22 +11:00
opal-sensor-groups.c powerpc/powernv: Make some symbols static 2019-11-13 16:58:06 +11:00
opal-sensor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opal-sysparam.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opal-tracepoints.c jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00
opal-wrappers.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-xscom.c powerpc/powernv: Fix checkpatch warnings in opal-xscom.c 2019-08-05 18:53:03 +10:00
opal.c powerpc: introduce die_mce 2021-02-09 00:02:11 +11:00
pci-cxl.c powerpc/powernv: remove get_cxl_module 2021-02-08 12:20:17 +01:00
pci-ioda-tce.c powerpc/powernv/pci: fix a RCU-list lock 2021-01-31 22:35:49 +11:00
pci-ioda.c powerpc/iommu: Do not immediately panic when failed IOMMU table allocation 2021-04-23 01:38:04 +10:00
pci-sriov.c powerpc/powernv/sriov: fix unsigned int win compared to less than zero 2020-11-19 16:56:54 +11:00
pci.c powerpc/powernv/pci: Add pci_bus_to_pnvhb() helper 2020-07-26 23:34:21 +10:00
pci.h powerpc/powernv/pci: Drop pnv_phb->initialized 2021-01-31 22:35:51 +11:00
powernv.h powerpc/powernv: Include asm/powernv.h from the local powernv.h 2020-08-25 01:31:33 +10:00
rng.c powerpc/powernv: Staticify functions without prototypes 2020-08-25 01:31:33 +10:00
setup.c powerpc/64s: remove unneeded semicolon 2021-04-23 01:38:04 +10:00
smp.c powerpc/64s: Trim offlined CPUs from mm_cpumasks 2020-11-27 00:10:39 +11:00
subcore-asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
subcore.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
subcore.h powerpc: remove unneeded semicolons 2021-02-09 00:10:50 +11:00
ultravisor.c powerpc/powernv: Add ultravisor message log interface 2019-08-30 09:40:16 +10:00
vas-api.c powerpc/vas: Add VAS user space API 2020-04-20 16:53:14 +10:00
vas-debug.c powerpc/vas: Take reference to PID and mm for user space windows 2020-04-20 16:53:00 +10:00
vas-fault.c powerpc/vas: Report proper error code for address translation failure 2020-07-15 23:09:55 +10:00
vas-trace.h
vas-window.c powerpc/powernv: Staticify functions without prototypes 2020-08-25 01:31:33 +10:00
vas.c powerpc/vas: Fix IRQ name allocation 2021-01-30 11:39:31 +11:00
vas.h powerpc/vas: Fix IRQ name allocation 2021-01-30 11:39:31 +11:00