diff options
author | Will Deacon <will.deacon@arm.com> | 2011-09-15 06:45:15 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-17 07:47:17 -0400 |
commit | f630c1bdfbf8fe423325beaf60027cfc7fd7c610 (patch) | |
tree | 9091179ae505fcb5aff937315c4f9c96602cba9a /arch/arm/kernel | |
parent | 279b1e0fd90ef63c7acb34a5ca573f065a6fefb4 (diff) |
ARM: 7091/1: errata: D-cache line maintenance operation by MVA may not succeed
This patch implements a workaround for erratum 764369 affecting
Cortex-A9 MPCore with two or more processors (all current revisions).
Under certain timing circumstances, a data cache line maintenance
operation by MVA targeting an Inner Shareable memory region may fail to
proceed up to either the Point of Coherency or to the Point of
Unification of the system. This workaround adds a DSB instruction before
the relevant cache maintenance functions and sets a specific bit in the
diagnostic control register of the SCU.
Cc: <stable@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/smp_scu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 79ed5e7f204a..7fcddb75c877 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/smp_scu.h> | 14 | #include <asm/smp_scu.h> |
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/cputype.h> | ||
16 | 17 | ||
17 | #define SCU_CTRL 0x00 | 18 | #define SCU_CTRL 0x00 |
18 | #define SCU_CONFIG 0x04 | 19 | #define SCU_CONFIG 0x04 |
@@ -37,6 +38,15 @@ void __init scu_enable(void __iomem *scu_base) | |||
37 | { | 38 | { |
38 | u32 scu_ctrl; | 39 | u32 scu_ctrl; |
39 | 40 | ||
41 | #ifdef CONFIG_ARM_ERRATA_764369 | ||
42 | /* Cortex-A9 only */ | ||
43 | if ((read_cpuid(CPUID_ID) & 0xff0ffff0) == 0x410fc090) { | ||
44 | scu_ctrl = __raw_readl(scu_base + 0x30); | ||
45 | if (!(scu_ctrl & 1)) | ||
46 | __raw_writel(scu_ctrl | 0x1, scu_base + 0x30); | ||
47 | } | ||
48 | #endif | ||
49 | |||
40 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); | 50 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); |
41 | /* already enabled? */ | 51 | /* already enabled? */ |
42 | if (scu_ctrl & 1) | 52 | if (scu_ctrl & 1) |