arm: npcm7xx: Enable Cortex-A9 errata 845369 and 794072
Subsystems (3)
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.
--- arch/arm/mach-npcm/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-npcm/Kconfig +2 -0
@@ -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.