• Mark Rutland's avatar
    arm64: factor out GPR numbering helpers · 8ed1b498
    Mark Rutland authored
    In <asm/sysreg.h> we have macros to convert the names of general purpose
    registers (GPRs) into integer constants, which we use to manually build
    the encoding for `MRS` and `MSR` instructions where we can't rely on the
    assembler to do so for us.
    
    In subsequent patches we'll need to map the same GPR names to integer
    constants so that we can use this to build metadata for exception
    fixups.
    
    So that the we can use the mappings elsewhere, factor out the
    definitions into a new <asm/gpr-num.h> header, renaming the definitions
    to align with this "GPR num" naming for clarity.
    
    There should be no functional change as a result of this patch.
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: James Morse <james.morse@arm.com>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Link: https://lore.kernel.org/r/20211019160219.5202-6-mark.rutland@arm.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
    8ed1b498
sysreg.h 43.6 KB