linux/arch/powerpc
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
..
boot Merge branch 'fixes' into next 2023-02-12 22:11:56 +11:00
configs powerpc/ps3: Refresh ps3_defconfig 2023-02-12 22:11:38 +11:00
crypto crypto: powerpc - Use address generation helper for asm 2023-02-10 22:17:36 +11:00
include powerpc/rtas: introduce rtas_function_token() API 2023-02-13 22:35:03 +11:00
kernel powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
kexec powerpc/pseries: Pass PLPKS password on kexec 2023-02-12 22:12:39 +11:00
kvm powerpc/kvm: Fix unannotated intra-function call warning 2023-01-30 16:01:04 +11:00
lib powerpc/kcsan: Add exclusions from instrumentation 2023-02-10 22:19:56 +11:00
math-emu powerpc/math-emu: Inhibit W=1 warnings 2022-09-08 11:11:18 +10:00
mm Merge branch 'fixes' into next 2023-02-12 22:11:56 +11:00
net powerpc/bpf/32: perform three operands ALU operations 2023-02-10 22:17:35 +11:00
perf powerpc/pseries/hv-24x7: convert to papr_sysparm API 2023-02-13 22:35:03 +11:00
platforms powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
purgatory powerpc/kcsan: Add exclusions from instrumentation 2023-02-10 22:19:56 +11:00
sysdev powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
tools powerpc/64: Add UADDR64 relocation support 2022-03-09 21:47:53 +11:00
xmon powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig powerpc/pseries: Turn PSERIES_PLPKS into a hidden option 2023-02-12 22:12:38 +11:00
Kconfig.debug powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
Makefile powerpc/64: Set default CPU in Kconfig 2023-01-30 17:41:28 +11:00
Makefile.postlink