linux/arch/powerpc/sysdev/xics
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
..
icp-hv.c powerpc/sysdev: Add __init attribute to eligible functions 2021-12-23 22:33:12 +11:00
icp-native.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
icp-opal.c powerpc/xics: fix refcount leak in icp_opal_init() 2022-05-22 15:58:30 +10:00
ics-native.c powerpc/xics: Include missing header 2022-05-24 20:44:30 +10:00
ics-opal.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
ics-rtas.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
Kconfig powerpc/xics: Add a native ICS backend for microwatt 2021-06-21 21:15:58 +10:00
Makefile powerpc/xics: Add a native ICS backend for microwatt 2021-06-21 21:15:58 +10:00
xics-common.c powerpc/kasan: Disable address sanitization in kexec paths 2022-05-22 15:58:29 +10:00