]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mm: fix inverted PAR_EL1.F check
authorMark Rutland <mark.rutland@arm.com>
Wed, 16 Oct 2019 11:03:04 +0000 (12:03 +0100)
committerWill Deacon <will@kernel.org>
Wed, 16 Oct 2019 16:58:03 +0000 (09:58 -0700)
commit919edfaf29c1f406d4bfe7928cd1c5c46b8b7cba
treeb564e9f16039b244535dbc9d2c24e930dafb4fc7
parent90ab307d9b0cd7b452b206c253bd09f0601dd79b
arm64: mm: fix inverted PAR_EL1.F check

When detecting a spurious EL1 translation fault, we have the CPU retry
the translation using an AT S1E1R instruction, and inspect PAR_EL1 to
determine if the fault was spurious.

When PAR_EL1.F == 0, the AT instruction successfully translated the
address without a fault, which implies the original fault was spurious.
However, in this case we return false and treat the original fault as if
it was not spurious.

Invert the return value so that we treat such a case as spurious.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Fixes: 508921dc4a30 ("arm64: mm: Ignore spurious translation faults taken from the kernel")
Tested-by: James Morse <james.morse@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/mm/fault.c