arm64: cpufeature: Change read_cpuid() to use sysreg's mrs_s macro
Older assemblers may not have support for newer feature registers. To get round this, sysreg.h provides a 'mrs_s' macro that takes a register encoding and generates the raw instruction. Change read_cpuid() to use mrs_s in all cases so that new registers don't have to be a special case. Including sysreg.h means we need to move the include and definition of read_cpuid() after the #ifndef __ASSEMBLY__ to avoid syntax errors in vmlinux.lds. Signed-off-by:James Morse <james.morse@arm.com> Acked-by:
Mark Rutland <mark.rutland@arm.com> Signed-off-by:
Catalin Marinas <catalin.marinas@arm.com>
Showing
- arch/arm64/include/asm/cpufeature.h 1 addition, 1 deletionarch/arm64/include/asm/cpufeature.h
- arch/arm64/include/asm/cputype.h 11 additions, 9 deletionsarch/arm64/include/asm/cputype.h
- arch/arm64/kernel/cpufeature.c 29 additions, 29 deletionsarch/arm64/kernel/cpufeature.c
- arch/arm64/kernel/cpuinfo.c 27 additions, 27 deletionsarch/arm64/kernel/cpuinfo.c
- arch/arm64/mm/context.c 1 addition, 1 deletionarch/arm64/mm/context.c
Loading
Please register or sign in to comment