linux/arch/powerpc/kernel
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
..
ptrace powerpc: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:40 -08:00
syscalls powerpc/32: fix syscall wrappers with 64-bit arguments 2022-11-01 10:24:09 +11:00
trace powerpc/kcsan: Add exclusions from instrumentation 2023-02-10 22:19:56 +11:00
vdso powerpc/kcsan: Add exclusions from instrumentation 2023-02-10 22:19:56 +11:00
.gitignore
85xx_entry_mapping.S powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
align.c
asm-offsets.c powerpc: add a define for the switch frame size and regs offset 2022-12-02 17:54:08 +11:00
audit.c
btext.c powerpc: Fix all occurences of duplicate words 2022-07-25 12:05:15 +10:00
cacheinfo.c
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S powerpc/32: Fix objtool unannotated intra-function call warnings 2022-11-18 19:00:06 +11:00
cpu_setup_44x.S
cpu_setup_e500.S powerpc/32: Fix objtool unannotated intra-function call warnings 2022-11-18 19:00:06 +11:00
cpu_setup_pa6t.S
cpu_setup_power.c powerpc/cputable: Move __cpu_setup() prototypes out of cputable.h 2022-09-26 22:26:49 +10:00
cpu_setup_ppc970.S
cpu_specs.h powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc 2022-09-26 23:00:05 +10:00
cpu_specs_8xx.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_40x.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_44x.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_47x.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_85xx.h powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc 2022-09-26 23:00:05 +10:00
cpu_specs_book3s_32.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_book3s_64.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_e500mc.h powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc 2022-09-26 23:00:05 +10:00
cputable.c powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
crash_dump.c
dawr.c powerpc: Include asm/firmware.h in all users of firmware_has_feature() 2022-06-29 16:45:05 +10:00
dbell.c powerpc/64: Fix perf profiling asynchronous interrupt handlers 2023-01-30 20:07:42 +11:00
dma-iommu.c
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c powerpc: move from strlcpy with unused retval to strscpy 2022-08-26 11:02:20 +10:00
early_32.c
eeh.c
eeh_cache.c
eeh_driver.c powerpc: Fix all occurences of duplicate words 2022-07-25 12:05:15 +10:00
eeh_event.c
eeh_pe.c
eeh_sysfs.c
entry_32.S Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
entry_64.S powerpc: Curb objtool unannotated intra-function call warnings 2022-11-15 20:11:47 +11:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc/64e: Clear gprs on interrupt routine entry on Book3E 2022-12-02 20:46:08 +11:00
exceptions-64s.S Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
fadump.c
firmware.c
fpu.S
head_8xx.S Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
head_32.h powerpc: add a definition for the marker offset within the interrupt frame 2022-12-02 17:54:08 +11:00
head_40x.S Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
head_44x.S powerpc: allow minimum sized kernel stack frames 2022-12-02 17:54:09 +11:00
head_64.S powerpc/64e: Simplify address calculation in secondary hold loop 2023-02-10 22:17:36 +11:00
head_85xx.S powerpc/85xx: Fix unannotated intra-function call warning 2023-01-30 15:59:59 +11:00
head_book3s_32.S Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
head_booke.h powerpc: add a definition for the marker offset within the interrupt frame 2022-12-02 17:54:08 +11:00
hw_breakpoint.c powerpc/8xx: Fix warning in hw_breakpoint_handler() 2022-11-24 23:31:49 +11:00
hw_breakpoint_constraints.c
idle.c
idle_6xx.S
idle_64e.S powerpc: add ISA v3.0 / v3.1 wait opcode macro 2022-09-28 19:22:10 +10:00
idle_85xx.S powerpc: Cleanup idle for e500 2022-09-26 23:00:14 +10:00
idle_book3s.S
ima_arch.c
interrupt.c powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch 2023-02-07 10:13:33 +11:00
interrupt_64.S powerpc/64s: Zeroise gprs on interrupt routine entry on Book3S 2022-12-02 20:46:05 +11:00
io-workarounds.c
io.c
iomap.c
iommu.c powerpc/iommu: fix memory leak with using debugfs_lookup() 2023-02-08 21:42:12 +11:00
irq.c powerpc/64: Fix perf profiling asynchronous interrupt handlers 2023-01-30 20:07:42 +11:00
irq_64.c powerpc/kcsan: Prevent recursive instrumentation with IRQ save/restores 2023-02-10 22:19:56 +11:00
isa-bridge.c
jump_label.c
kdebugfs.c
kgdb.c powerpc: add definition for pt_regs offset within an interrupt frame 2022-12-02 17:54:08 +11:00
kprobes-ftrace.c
kprobes.c powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
kvm.c powerpc: Remove CONFIG_PPC_BOOK3E_MMU 2022-09-26 23:00:14 +10:00
kvm_emul.S
l2cr_6xx.S
legacy_serial.c powerpc/kernel: Add missing of_node_put() in legacy_serial.c 2022-09-05 17:28:26 +10:00
Makefile powerpc/kcsan: Add exclusions from instrumentation 2023-02-10 22:19:56 +11:00
mce.c powerpc/mce: log the error for all unrecoverable errors 2023-02-10 22:17:34 +11:00
mce_power.c
misc.S
misc_32.S powerpc: allow minimum sized kernel stack frames 2022-12-02 17:54:09 +11:00
misc_64.S Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
module.c
module_32.c
module_64.c powerpc/module_64: Fix "expected nop" error on module re-patching 2023-01-26 21:08:04 +11:00
msi.c
note.S
nvram_64.c
of_platform.c
optprobes.c powerpc/kprobes: Have optimized_callback() use preempt_enable() 2022-11-24 23:31:49 +11:00
optprobes_head.S powerpc: add definition for pt_regs offset within an interrupt frame 2022-12-02 17:54:08 +11:00
paca.c powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
pci-common.c powerpc/pci-common: Fix refcount bug for 'phb->dn' 2022-09-05 17:30:29 +10:00
pci-hotplug.c
pci_32.c powerpc/pci: Add option for using pci_to_OF_bus_map 2023-02-07 20:15:23 +11:00
pci_64.c powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code 2022-07-27 21:36:03 +10:00
pci_dn.c powerpc/pci_dn: Add missing of_node_put() 2022-09-05 17:30:25 +10:00
pci_of_scan.c
pmc.c
ppc_save_regs.S powerpc: add definition for pt_regs offset within an interrupt frame 2022-12-02 17:54:08 +11:00
proc_powerpc.c
process.c powerpc: Skip stack validation checking alternate stacks if they are not allocated 2023-02-10 22:19:56 +11:00
prom.c powerpc/pseries: Pass PLPKS password on kexec 2023-02-12 22:12:39 +11:00
prom_init.c powerpc/prom_init: drop PROM_BUG() 2022-09-26 20:58:18 +10:00
prom_init_check.sh powerpc/64: Remove unused prom_init_toc symbols 2022-09-26 20:58:16 +10:00
prom_parse.c
reloc_32.S
reloc_64.S powerpc/64: avoid using r13 in relocate 2022-09-28 19:22:13 +10:00
rtas-proc.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
rtas-rtc.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
rtas.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
rtas_entry.S powerpc/rtas: Fix RTAS MSR[HV] handling for Cell 2022-08-26 08:41:54 +10:00
rtas_flash.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
rtas_pci.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
rtasd.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
secure_boot.c
security.c powerpc: Remove CONFIG_PPC_FSL_BOOK3E 2022-09-26 23:00:13 +10:00
secvar-ops.c powerpc/secvar: Warn and error if multiple secvar ops are set 2023-02-12 22:12:36 +11:00
secvar-sysfs.c powerpc/secvar: Don't print error on ENOENT when reading variables 2023-02-12 22:12:37 +11:00
setup-common.c powerpc/64: Move paca allocation to early_setup() 2023-02-10 22:19:56 +11:00
setup.h powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
setup_32.c powerpc: Change CONFIG_E500 to CONFIG_PPC_E500 2022-09-26 23:00:13 +10:00
setup_64.c powerpc/64: Move paca allocation to early_setup() 2023-02-10 22:19:56 +11:00
signal.c
signal.h powerpc: Don't add __powerpc_ prefix to syscall entry points 2022-10-07 00:59:54 +11:00
signal_32.c powerpc: Include all arch-specific syscall prototypes 2022-09-28 19:22:08 +10:00
signal_64.c powerpc/signal: Update comment for clarity 2022-07-28 16:22:14 +10:00
smp-tbsync.c
smp.c powerpc: allow minimum sized kernel stack frames 2022-12-02 17:54:09 +11:00
stacktrace.c powerpc: allow minimum sized kernel stack frames 2022-12-02 17:54:09 +11:00
static_call.c
suspend.c
swsusp.c
swsusp_32.S powerpc/32: Fix objtool unannotated intra-function call warnings 2022-11-18 19:00:06 +11:00
swsusp_64.c
swsusp_85xx.S powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
swsusp_asm64.S powerpc/64: asm use consistent global variable declaration and access 2022-09-28 19:22:12 +10:00
sys_ppc32.c powerpc/32: fix syscall wrappers with 64-bit arguments 2022-11-01 10:24:09 +11:00
syscall.c powerpc: Provide syscall wrapper 2022-09-28 19:22:09 +10:00
syscalls.c powerpc: Adopt SYSCALL_DEFINE for arch-specific syscall handlers 2022-09-28 19:22:08 +10:00
sysfs.c powerpc: Remove CONFIG_PPC_FSL_BOOK3E 2022-09-26 23:00:13 +10:00
systbl.c powerpc: Don't add __powerpc_ prefix to syscall entry points 2022-10-07 00:59:54 +11:00
tau_6xx.c
time.c Merge branch 'fixes' into next 2023-02-12 22:11:56 +11:00
tm.S powerpc: add definition for pt_regs offset within an interrupt frame 2022-12-02 17:54:08 +11:00
traps.c powerpc/64s: early boot machine check handler 2022-09-28 19:22:13 +10:00
ucall.S
udbg.c powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
udbg_16550.c powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
uprobes.c
vdso.c vdso/timens: Refactor copy-pasted find_timens_vvar_page() helper into one copy 2022-12-01 11:35:40 +01:00
vdso32_wrapper.S
vdso64_wrapper.S
vecemu.c
vector.S powerpc: Fix objtool unannotated intra-function call warnings 2022-11-15 20:11:47 +11:00
vmlinux.lds.S powerpc/vmlinux.lds: Don't discard .comment 2023-01-06 00:25:12 +11:00
watchdog.c powerpc/watchdog: introduce a NMI watchdog's factor 2022-07-27 21:36:02 +10:00