arm64: sysreg: allow write_sysreg to use XZR
authorMark Rutland <mark.rutland@arm.com>
Thu, 8 Sep 2016 12:55:34 +0000 (13:55 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 9 Sep 2016 10:40:39 +0000 (11:40 +0100)
commit7aff4a2dd3db4e519c636f43aa863078e3b30d0f
tree04647ea7e4ff76116cdfd25cd63d83436e388cb9
parentee5e41b5f21a5438664effce1ba5bdd11e03ee24
arm64: sysreg: allow write_sysreg to use XZR

Currently write_sysreg has to allocate a temporary register to write
zero to a system register, which is unfortunate given that the MSR
instruction accepts XZR as an operand.

Allow XZR to be used when appropriate by fiddling with the assembly
constraints.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/sysreg.h