• Will Deacon's avatar
    arm64: sysreg: Fix use of XZR in write_sysreg_s · 91cb163e
    Will Deacon authored
    Commit 8a71f0c6 ("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: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    91cb163e
sysreg.h 8.82 KB