diff options
author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2013-01-07 05:28:42 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-01-07 10:04:17 -0500 |
commit | 8a3a180d21793f2e4386b3cb61c48322564fc80a (patch) | |
tree | 4ab574bb3a8531387a21f6a63be02f9d241137a7 /arch | |
parent | 8b827c60a1d984ef8c3ed175c99a33dd451348ff (diff) |
ARM: 7616/1: cache-l2x0: aurora: Use writel_relaxed instead of writel
The use of writel instead of writel_relaxed lead to deadlock in some
situation (SMP on Armada 370 for instance). The use of writel_relaxed
as it was done in the rest of this driver fixes this bug.
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 55ca637a4930..c2f37390308a 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -460,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end, | |||
460 | unsigned long flags; | 460 | unsigned long flags; |
461 | 461 | ||
462 | raw_spin_lock_irqsave(&l2x0_lock, flags); | 462 | raw_spin_lock_irqsave(&l2x0_lock, flags); |
463 | writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); | 463 | writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); |
464 | writel(end, l2x0_base + offset); | 464 | writel_relaxed(end, l2x0_base + offset); |
465 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); | 465 | raw_spin_unlock_irqrestore(&l2x0_lock, flags); |
466 | 466 | ||
467 | cache_sync(); | 467 | cache_sync(); |
@@ -675,8 +675,9 @@ static void pl310_resume(void) | |||
675 | static void aurora_resume(void) | 675 | static void aurora_resume(void) |
676 | { | 676 | { |
677 | if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { | 677 | if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { |
678 | writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL); | 678 | writel_relaxed(l2x0_saved_regs.aux_ctrl, |
679 | writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); | 679 | l2x0_base + L2X0_AUX_CTRL); |
680 | writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); | ||
680 | } | 681 | } |
681 | } | 682 | } |
682 | 683 | ||