提交 9a07f27b 编写于 作者: R Russell King

ARM: l2c: only write the auxiliary control register if required

Avoid unnecessary writes to the auxiliary control register if the
register already contains the required value.  This allows us to
avoid invoking the platforms secure monitor code unnecessarily.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 17f3f99f
......@@ -92,7 +92,9 @@ static void l2c_enable(void __iomem *base, u32 aux, unsigned num_lock)
{
unsigned long flags;
writel_relaxed(aux, base + L2X0_AUX_CTRL);
/* Only write the aux register if it needs changing */
if (readl_relaxed(base + L2X0_AUX_CTRL) != aux)
writel_relaxed(aux, base + L2X0_AUX_CTRL);
l2c_unlock(base, num_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册