arm64: cpufeature: Change read_cpuid() to use sysreg's mrs_s macro
authorJames Morse <james.morse@arm.com>
Fri, 5 Feb 2016 14:58:46 +0000 (14:58 +0000)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 14:19:22 +0000 (22:19 +0800)
commit0b3419007e096a706ac4894a2cf28cd97b6028e1
tree42ca652517ad876b2c74f0f9901fb2ea086f5994
parent866817f9f155879d1d28f0944958a542bb70475c
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>
(cherry picked from commit 0f54b14e76f5302afe164dc911b049b5df836ff5)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/cputype.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/cpuinfo.c
arch/arm64/mm/context.c