arm/arm64: Provide a wrapper for SMCCC 1.1 calls
authorSteven Price <steven.price@arm.com>
Mon, 21 Oct 2019 15:28:21 +0000 (16:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2022 09:13:29 +0000 (10:13 +0100)
commitd0f9db16eb4e3c0a8b5dd23c746f9faeb4b24ccb
treeabd061da14dab78a581b826319248b25974d316c
parent38c557efd4cd5e59dee1d021009278b491523fee
arm/arm64: Provide a wrapper for SMCCC 1.1 calls

commit 541625ac47ce9d0835efaee0fcbaa251b0000a37 upstream.

SMCCC 1.1 calls may use either HVC or SMC depending on the PSCI
conduit. Rather than coding this in every call site, provide a macro
which uses the correct instruction. The macro also handles the case
where no conduit is configured/available returning a not supported error
in res, along with returning the conduit used for the call.

This allow us to remove some duplicated code and will be useful later
when adding paravirtualized time hypervisor calls.

Signed-off-by: Steven Price <steven.price@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/arm-smccc.h