]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: sysreg: Fix use of XZR in write_sysreg_s
authorWill Deacon <will.deacon@arm.com>
Mon, 17 Oct 2016 12:38:14 +0000 (13:38 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 17 Oct 2016 18:38:30 +0000 (19:38 +0100)
commit88d8e051b91f2dcaf63f80ee01b72a4cd5a676a5
treeb4f85befdc215470c060563371eba88fae33463e
parent3c3025df94a86cddf00c53eb15eb9a548b3f6301
arm64: sysreg: Fix use of XZR in write_sysreg_s

Commit 5db2f6ed48bb ("arm64: sysreg: replace open-coded mrs_s/msr_s with
{read,write}_sysreg_s") introduced a write_sysreg_s macro for writing
to system registers that are not supported by binutils.

Unfortunately, this was implemented with the wrong template (%0 vs %x0),
so in the case that we are writing a constant 0, we will generate
invalid instruction syntax and bail with a cryptic assembler error:

  | Error: constant expression required

This patch fixes the template.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/sysreg.h