linux-stable/arch/powerpc/sysdev
Nathan Lynch 08273c9f61 powerpc/rtas: arch-wide function token lookup conversions
With the tokens for all implemented RTAS functions now available via
rtas_function_token(), which is optimal and safe for arbitrary
contexts, there is no need to use rtas_token() or cache its result.

Most conversions are trivial, but a few are worth describing in more
detail:

* Error injection token comparisons for lockdown purposes are
  consolidated into a simple predicate: token_is_restricted_errinjct().

* A couple of special cases in block_rtas_call() do not use
  rtas_token() but perform string comparisons against names in the
  function table. These are converted to compare against token values
  instead, which is logically equivalent but less expensive.

* The lookup for the ibm,os-term token can be deferred until needed,
  instead of caching it at boot to avoid device tree traversal during
  panic.

* Since rtas_function_token() accesses a read-only data structure
  without taking any locks, xmon's lookup of set-indicator can be
  performed as needed instead of cached at startup.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230125-b4-powerpc-rtas-queue-v3-20-26929c8cce78@linux.ibm.com
2023-02-13 22:35:03 +11:00
..
ge powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
xics powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
xive powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data() 2022-11-24 23:31:49 +11:00
6xx-suspend.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig powerpc/4xx: Remove MSI support which never worked 2021-12-09 11:52:20 +01:00
Makefile powerpc/85xx: Remove FSL_85XX_CACHE_SRAM 2022-05-22 15:58:30 +10:00
cpm2.c powerpc/sysdev: Fix comment typo 2022-07-28 16:22:14 +10:00
cpm2_pic.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
cpm2_pic.h
cpm_common.c powerpc/8xx: Don't set IMMR map anymore at boot 2020-05-26 22:22:21 +10:00
cpm_gpio.c powerpc: cpm_gpio: Remove owner assignment from platform_driver 2018-06-03 20:43:35 +10:00
dart.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dart_iommu.c powerpc/iommu: Add missing of_node_put in iommu_init_early_dart 2022-05-22 15:58:31 +10:00
dcr-low.S powerpc/dcr: Use cmplwi instead of 3-argument cmpli 2021-10-28 22:29:25 +11:00
dcr.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
ehv_pic.c powerpc: Add missing linux/{of.h,irqdomain.h} include directives 2021-06-10 13:09:16 +01:00
fsl_gtm.c powerpc/sysdev: fix incorrect use to determine if list is empty 2022-03-08 00:04:56 +11:00
fsl_lbc.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
fsl_mpic_err.c powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
fsl_mpic_timer_wakeup.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_msi.c powerpc/msi: Fix deassociation of MSI descriptors 2022-12-17 10:58:48 +00:00
fsl_msi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
fsl_pci.c powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary 2022-11-30 21:46:48 +11:00
fsl_pci.h powerpc/fsl-pci: Fix Class Code of PCIe Root Port 2022-07-27 21:36:03 +10:00
fsl_pmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_rcpm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_rio.c powerpc: Change CONFIG_E500 to CONFIG_PPC_E500 2022-09-26 23:00:13 +10:00
fsl_rio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_rmu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl_soc.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
fsl_soc.h
grackle.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
i8259.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
indirect_pci.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
ipic.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
ipic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mmio_nvram.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpc5xxx_clocks.c powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode 2022-06-22 12:51:49 +10:00
mpic.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpic.h powerpc/pasemi: Add __init attribute to eligible functions 2021-12-23 22:33:14 +11:00
mpic_msgr.c powerpc/mpic_msgr: fix cast removes address space of expression warnings 2022-11-24 23:31:49 +11:00
mpic_msi.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpic_timer.c powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
mpic_u3msi.c powerpc/msi: Fix deassociation of MSI descriptors 2022-12-17 10:58:48 +00:00
msi_bitmap.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
of_rtc.c powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h 2022-07-28 16:22:12 +10:00
pmi.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
rtc_cmos_setup.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
tsi108_dev.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
tsi108_pci.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
udbg_memcons.c powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00