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
..
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-19 16:07:59 -06:00
2022-12-21 09:37:14 -08:00
2022-12-19 07:51:30 -06:00
2022-12-13 19:29:45 -08:00
2022-12-19 08:23:27 -06:00
2022-12-13 19:29:45 -08:00
2022-12-23 10:49:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-21 18:52:15 -08:00
2022-12-13 19:29:45 -08:00
2022-12-17 14:06:53 -06:00
2022-12-13 19:29:45 -08:00
2022-12-16 13:46:41 -06:00