OSDN Git Service

arm64: errata: add workaround for cortex-a53 erratum #845719
authorWill Deacon <will.deacon@arm.com>
Mon, 23 Mar 2015 19:07:02 +0000 (19:07 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:55 +0000 (22:03 +0200)
commitd56f1962494430ce86e221537a2116a8ff0dca7e
tree55cdab13a2747cdb46861acaf025ee17f5e5eb0c
parentf5fc6d70222ede94eb601c8f2697df1a9bcd9535
arm64: errata: add workaround for cortex-a53 erratum #845719

commit 905e8c5dcaa147163672b06fe9dcb5abaacbc711 upstream.

When running a compat (AArch32) userspace on Cortex-A53, a load at EL0
from a virtual address that matches the bottom 32 bits of the virtual
address used by a recent load at (AArch64) EL1 might return incorrect
data.

This patch works around the issue by writing to the contextidr_el1
register on the exception return path when returning to a 32-bit task.
This workaround is patched in at runtime based on the MIDR value of the
processor.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/Kconfig
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/entry.S