powerpc/rtas: Warn if per-function lock isn't held
authorNathan Lynch <nathanl@linux.ibm.com>
Tue, 12 Dec 2023 17:01:55 +0000 (11:01 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Dec 2023 10:38:21 +0000 (21:38 +1100)
commite3681107bc9f97c5948a1c8a3a97ac64907210ce
treed1ea8fafb2b6f73f1c16bac0e44b082f29db7a66
parentdc7637c402b90a197d3f21a3d78f2b00b67ea22a
powerpc/rtas: Warn if per-function lock isn't held

If the function descriptor has a populated lock member, then callers
are required to hold it across calls. Now that the firmware activation
sequence is appropriately guarded, we can warn when the requirement
isn't satisfied.

__do_enter_rtas_trace() gets reorganized a bit as a result of
performing the function descriptor lookup unconditionally now.

Reviewed-by: "Aneesh Kumar K.V (IBM)" <aneesh.kumar@kernel.org>
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-8-e9eafd0c8c6c@linux.ibm.com
arch/powerpc/kernel/rtas.c