linux/arch/powerpc/platforms/chrp
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
..
chrp.h powerpc: remove unused chrp_event_scan() declaration 2022-09-15 22:55:45 +10:00
gg2.h
Kconfig powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE 2021-12-02 22:57:22 +11:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nvram.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
pci.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
pegasos_eth.c powerpc/chrp: Add __init attribute to eligible functions 2021-12-23 22:33:13 +11:00
setup.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
smp.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
time.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00