提交 8a3a180d 编写于 作者: G Gregory CLEMENT 提交者: Russell King

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: NGregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: NJason Cooper <jason@lakedaemon.net>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 8b827c60
...@@ -460,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end, ...@@ -460,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end,
unsigned long flags; unsigned long flags;
raw_spin_lock_irqsave(&l2x0_lock, flags); raw_spin_lock_irqsave(&l2x0_lock, flags);
writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
writel(end, l2x0_base + offset); writel_relaxed(end, l2x0_base + offset);
raw_spin_unlock_irqrestore(&l2x0_lock, flags); raw_spin_unlock_irqrestore(&l2x0_lock, flags);
cache_sync(); cache_sync();
...@@ -675,8 +675,9 @@ static void pl310_resume(void) ...@@ -675,8 +675,9 @@ static void pl310_resume(void)
static void aurora_resume(void) static void aurora_resume(void)
{ {
if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL); writel_relaxed(l2x0_saved_regs.aux_ctrl,
writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); l2x0_base + L2X0_AUX_CTRL);
writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册