OSDN Git Service

arm/arm64: smccc: Implement SMCCC v1.1 inline primitive
authorMark Rutland <mark.rutland@arm.com>
Thu, 12 Apr 2018 11:11:36 +0000 (12:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2018 06:21:06 +0000 (08:21 +0200)
commiteb90973e64c7174a4d2b584f1675e80fb8336100
treefe36102651615a4fdca2f73de54a5180e2fd2e97
parent5d667c15ee231d357d6f1ee3d8afb91ff9e3c877
arm/arm64: smccc: Implement SMCCC v1.1 inline primitive

From: Marc Zyngier <marc.zyngier@arm.com>

commit f2d3b2e8759a5833df6f022e42df2d581e6d843c upstream.

One of the major improvement of SMCCC v1.1 is that it only clobbers
the first 4 registers, both on 32 and 64bit. This means that it
becomes very easy to provide an inline version of the SMC call
primitive, and avoid performing a function call to stash the
registers that would otherwise be clobbered by SMCCC v1.0.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com> [v4.9 backport]
Tested-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/arm-smccc.h