diff options
author | Jitendra Lanka <jlanka@nvidia.com> | 2010-05-20 16:15:43 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-05-20 11:09:33 -0700 |
commit | 0c564f91a40281658e516727b5ad4e4a30cb029b (patch) | |
tree | 1639daa23fa12fc5a1932788cf059db5ba866ab7 /arch | |
parent | b344cce5024b2742219db782aeeb38772a05325a (diff) |
tegra-l2x0: atomic cache shutdown
Sometimes during the cache shutdown process,
USB interrupts causing cache maintainance ops are leading to
system crash. To avoid this, we disable interrupts before
cache shutdown and enable them afterwards.
Bug 673802 - Warm boot stress test failed on Harmony
Tested on: Harmony
Change-Id: Ieb9d9e92bbdd441b875844d8fa659b0795a09455
Reviewed-on: http://git-master/r/1438
Tested-by: Jitendra Aditya Lanka <jlanka@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 6ccf67a57725..51eb0142af18 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -248,9 +248,14 @@ static void l2x0_flush_range(unsigned long start, unsigned long end) static void l2x0_shutdown(void) { + unsigned long flags; if (l2x0_disabled) return; + BUG_ON(num_online_cpus() > 1); + + local_irq_save(flags); + if (readl(l2x0_base + L2X0_CTRL) & 1) { int m; /* lockdown all ways, all masters to prevent new line @@ -267,6 +272,8 @@ static void l2x0_shutdown(void) writel(0, l2x0_base + L2X0_LOCKDOWN_WAY_I + (m*8)); } } + + local_irq_restore(flags); } void l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) |