]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: add macro to extract ESR_ELx.EC
authorMark Rutland <mark.rutland@arm.com>
Tue, 31 May 2016 11:33:01 +0000 (12:33 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 21 Jun 2016 16:07:09 +0000 (17:07 +0100)
commit32336cf5a9d374d6ceeab8915a1d3930bd3ddc9c
treeeac2a9c274c24ac8e3e8e15dca05f9ffb5c24938
parent6d89c329aa931b616d728ea70cb2e4ba27bc9422
arm64: add macro to extract ESR_ELx.EC

Several places open-code extraction of the EC field from an ESR_ELx
value, in subtly different ways. This is unfortunate duplication and
variation, and the precise logic used to extract the field is a
distraction.

This patch adds a new macro, ESR_ELx_EC(), to extract the EC field from
an ESR_ELx value in a consistent fashion.

Existing open-coded extractions in core arm64 code are moved over to the
new helper. KVM code is left as-is for the moment.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Huang Shijie <shijie.huang@arm.com>
Cc: Dave P Martin <dave.martin@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/esr.h
arch/arm64/kernel/traps.c
arch/arm64/mm/fault.c