OSDN Git Service

ANDROID: arm-smccc: fix clang build
authorGreg Hackmann <ghackmann@google.com>
Fri, 2 Mar 2018 21:22:46 +0000 (13:22 -0800)
committerGreg Hackmann <ghackmann@google.com>
Fri, 20 Apr 2018 17:07:29 +0000 (10:07 -0700)
commit13cc54013b24007b8bbcb370d854ccaf3d66e546
tree419bfdbe14a2de70a3525c7021d39dec578332de
parentb4c14c25fd3820e697b65f14885ca58e6c145686
ANDROID: arm-smccc: fix clang build

The SMCCC 1.1 helpers rely on a gcc extension to accept obsolete AArch32
register names in AArch64 mode, changing rN to xN or wN based on
context.

Unfortunately, as of April 2018, current clang releases don't support this
extension.  Support for this syntax has landed in LLVM SVN
(https://reviews.llvm.org/rL328829) and is queued up for LLVM 6.0.1.

In the meantime, to keep from breaking clang kernel builds, we'll
temporarily switch to using xN instead of rN on ARM64.  These helpers
were backported to linux-stable for two specific callers, and both cases
should use the full 64-bit register width.

Fixes: ac63fdb4a2b2 ("arm/arm64: smccc: Implement SMCCC v1.1 inline primitive")
Change-Id: I1eb14f7b6674f7dffcad9572e409f6bcdba69610
Signed-off-by: Greg Hackmann <ghackmann@google.com>
include/linux/arm-smccc.h