diff options
author | Suzuki K. Poulose <suzuki.poulose@arm.com> | 2015-07-22 11:38:14 +0100 |
---|---|---|
committer | David Brown <david.brown@linaro.org> | 2015-12-08 08:37:01 -0800 |
commit | d63c0243c5ffba7ca58b08685135b0f8d82cfdae (patch) | |
tree | d5a6cd53d51b1aea40a06346f6f1675b0773291b /arch/arm64/include/asm/alternative-asm.h | |
parent | c6b421909cc9cc0053fd38e35800caf3113b881d (diff) |
arm64: Generalise msr_s/mrs_s operations
commit 9ded63aaf83eba76e1a54ac02581c2badc497f1a upstream.
The system register encoding generated by sys_reg() works only
for MRS/MSR(Register) operations, as we hardcode Bit20 to 1 in
mrs_s/msr_s mask. This makes it unusable for generating instructions
accessing registers with Op0 < 2(e.g, PSTATE.x with Op0=0).
As per ARMv8 ARM, (Ref: ARMv8 ARM, Section: "System instruction class
encoding overview", C5.2, version:ARM DDI 0487A.f), the instruction
encoding reserves bits [20-19] for Op0.
This patch generalises the sys_reg, mrs_s and msr_s macros, so that
we could use them to access any of the supported system register.
Cc: James Morse <james.morse@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: David Brown <david.brown@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm/alternative-asm.h')
0 files changed, 0 insertions, 0 deletions