Skip to contentSkip to conversation

arm: npcm7xx: Enable Cortex-A9 errata 845369 and 794072

PATCH New Bart Van Assche 1 participant 1 message Nov 28

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: npcm7xx: Enable Cortex-A9 errata 845369 and 794072

Analysis of NPCM730 kernel crashes shows that ARM Cortex-A9 Erratum 845369 applies to the NPCM730 SoC and the rest of the Cortex-A9 r4p1 NPCM7xx family, as does Erratum 794072.

Select CONFIG_ARM_ERRATA_845369 and CONFIG_ARM_ERRATA_794072 for ARCH_NPCM7xx so cpu_init_cp15 sets bits 22 and 4 in the Cortex-A9 CP15 diagnostic control register (c15, c0, 1) on CPU 0 before enabling the D-cache and the MMU:

- Erratum 845369 (bit 22, all Cortex-A9 revisions): disable transitions into streaming (read-allocate) mode that can corrupt or lose writes under SMP cache-line migration.
- Erratum 794072 (bit 4, all Cortex-A9 revisions): prevent a tight DMB loop from starving broadcast CP15 maintenance operations on another core.

Match MX6_SMP (which also uses Cortex-A9 and selects both options) so NPCM7xx CPUs boot with both workarounds enabled on CPU 0. Note that CPU 1 boots directly from Mask ROM without executing U-Boot, so Linux must replicate the diagnostic register to CPU 1 separately.

Fixes 84335544ead8 ("arm: nuvoton: Add support for Nuvoton NPCM750 BMC")
Change-Id I59d4a90ad01c2deca9a924c1d9e6fcfbe39d8ddd
---
 arch/arm/mach-npcm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-npcm/Kconfig +2 -0
index 24bd2ad423f0..66da4a2659c6 100644
@@ -15,6 +15,8 @@ config ARCH_NPCM7xx
 	select CPU_V7A
 	select OF_CONTROL
 	select DM
+	select ARM_ERRATA_794072
+	select ARM_ERRATA_845369
 	help
 	  General support for NPCM7xx BMC (Poleg).
 	  Nuvoton NPCM7xx BMC is based on the Cortex A9.