Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a487c3ab authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm64: Add workaround for Cortex-A76 erratum 1286807"

parents 1501cf60 dcdf2957
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ stable kernels.
| ARM            | Cortex-A72      | #853709         | N/A                         |
| ARM            | Cortex-A73      | #858921         | ARM64_ERRATUM_858921        |
| ARM            | Cortex-A55      | #1024718        | ARM64_ERRATUM_1024718       |
| ARM            | Cortex-A76      | #1286807        | ARM64_ERRATUM_1286807       |
| ARM            | MMU-500         | #841119,#826419 | N/A                         |
|                |                 |                 |                             |
| Cavium         | ThunderX ITS    | #22375, #24313  | CAVIUM_ERRATUM_22375        |
+25 −0
Original line number Diff line number Diff line
@@ -506,6 +506,24 @@ config ARM64_ERRATUM_1024718

	  If unsure, say Y.

config ARM64_ERRATUM_1286807
	bool "Cortex-A76: Modification of the translation table for a virtual address might lead to read-after-read ordering violation"
	default y
	select ARM64_WORKAROUND_REPEAT_TLBI
	help
	  This option adds workaround for ARM Cortex-A76 erratum 1286807

	  On the affected Cortex-A76 cores (r0p0 to r3p0), if a virtual
	  address for a cacheable mapping of a location is being
	  accessed by a core while another core is remapping the virtual
	  address to a new physical page using the recommended
	  break-before-make sequence, then under very rare circumstances
	  TLBI+DSB completes before a read using the translation being
	  invalidated has been observed by other observers. The
	  workaround repeats the TLBI+DSB operation.

	  If unsure, say Y.

config CAVIUM_ERRATUM_22375
	bool "Cavium erratum 22375, 24313"
	default y
@@ -575,9 +593,16 @@ config QCOM_FALKOR_ERRATUM_1003
	  is unchanged. Work around the erratum by invalidating the walk cache
	  entries for the trampoline before entering the kernel proper.

config ARM64_WORKAROUND_REPEAT_TLBI
	bool
	help
	  Enable the repeat TLBI workaround for Falkor erratum 1009 and
	  Cortex-A76 erratum 1286807.

config QCOM_FALKOR_ERRATUM_1009
	bool "Falkor E1009: Prematurely complete a DSB after a TLBI"
	default y
	select ARM64_WORKAROUND_REPEAT_TLBI
	help
	  On Falkor v1, the CPU may prematurely complete a DSB following a
	  TLBI xxIS invalidate maintenance operation. Repeat the TLBI operation
+2 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@
#define ARM_CPU_PART_CORTEX_A53		0xD03
#define ARM_CPU_PART_CORTEX_A73		0xD09
#define ARM_CPU_PART_CORTEX_A75		0xD0A
#define ARM_CPU_PART_CORTEX_A76		0xD0B
#define ARM_CPU_PART_KRYO3S		0x803
#define ARM_CPU_PART_KRYO4S		0x803
#define ARM_CPU_PART_KRYO4G		0x804
@@ -111,6 +112,7 @@
#define MIDR_CORTEX_A72 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A72)
#define MIDR_CORTEX_A73 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A73)
#define MIDR_CORTEX_A75 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A75)
#define MIDR_CORTEX_A76 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A76)
#define MIDR_KRYO3S	MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, ARM_CPU_PART_KRYO3S)
#define MIDR_KRYO4S	MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, ARM_CPU_PART_KRYO4S)
#define MIDR_KRYO4G	MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, ARM_CPU_PART_KRYO4G)
+2 −2
Original line number Diff line number Diff line
@@ -41,14 +41,14 @@
		   ALTERNATIVE("nop\n			nop",		       \
			       "dsb ish\n		tlbi " #op,	       \
			       ARM64_WORKAROUND_REPEAT_TLBI,		       \
			       CONFIG_QCOM_FALKOR_ERRATUM_1009)		       \
			       CONFIG_ARM64_WORKAROUND_REPEAT_TLBI)	       \
			    : : )

#define __TLBI_1(op, arg) asm ("tlbi " #op ", %0\n"			       \
		   ALTERNATIVE("nop\n			nop",		       \
			       "dsb ish\n		tlbi " #op ", %0",     \
			       ARM64_WORKAROUND_REPEAT_TLBI,		       \
			       CONFIG_QCOM_FALKOR_ERRATUM_1009)		       \
			       CONFIG_ARM64_WORKAROUND_REPEAT_TLBI)	       \
			    : : "r" (arg))

#define __TLBI_N(op, arg, n, ...) __TLBI_##n(op, arg)
+9 −1
Original line number Diff line number Diff line
@@ -508,7 +508,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
		.matches = is_kryo_midr,
	},
#endif
#ifdef CONFIG_QCOM_FALKOR_ERRATUM_1009
#ifdef CONFIG_ARM64_WORKAROUND_REPEAT_TLBI
	{
		.desc = "Qualcomm Technologies Falkor erratum 1009",
		.capability = ARM64_WORKAROUND_REPEAT_TLBI,
@@ -516,6 +516,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
			   MIDR_CPU_VAR_REV(0, 0),
			   MIDR_CPU_VAR_REV(0, 0)),
	},
	{
	/* Cortex-A76 r0p0 to r3p0 */
		.desc = "ARM erratum 1286807",
		.capability = ARM64_WORKAROUND_REPEAT_TLBI,
		MIDR_RANGE(MIDR_CORTEX_A76,
			   MIDR_CPU_VAR_REV(0, 0),
			   MIDR_CPU_VAR_REV(3, 0)),
	},
#endif
#ifdef CONFIG_ARM64_ERRATUM_858921
	{