linux-stable/arch/powerpc/platforms/52xx
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
..
Kconfig powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE 2021-12-02 22:57:22 +11:00
Makefile powerpc/Makefiles: Convert ifeq to ifdef where possible 2018-08-08 00:32:36 +10:00
efika.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
lite5200.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
lite5200_pm.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
lite5200_sleep.S powerpc/32: Fix objtool unannotated intra-function call warnings 2022-11-18 19:00:06 +11:00
media5200.c powerpc/52xx: Add missing of_node_put() in media5200.c 2022-09-05 17:28:25 +10:00
mpc52xx_common.c powerpc/52xx: Remove dead code, i.e. mpc52xx_get_xtal_freq() 2022-06-22 12:51:49 +10:00
mpc52xx_gpt.c powerpc/52xx: Mark gpt driver as not removable 2022-07-18 23:35:25 +10:00
mpc52xx_lpbfifo.c powerpc/mpc52xx_lpbfifo: fix all kernel-doc warnings 2022-11-24 23:12:18 +11:00
mpc52xx_pci.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpc52xx_pic.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpc52xx_pm.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
mpc52xx_sleep.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpc5200_simple.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00