Thread (1 message) 1 message, 1 author, 2010-07-02
DORMANTno replies

[patch 2/2] arm: Implement l2x0 cache disable function

From: srinidhi <hidden>
Date: 2010-07-02 11:23:21

quoted hunk
---------- Forwarded message ----------
From: Thomas Gleixner <redacted>
Date: Thu, Jul 1, 2010 at 9:35 PM
Subject: [patch 2/2] arm: Implement l2x0 cache disable function
To: LAK <redacted>
Cc: Catalin Marinas <catalin.marinas@arm.com>


This function is called from kexec code before the inner caches are
disabled to prevent random crashes in the new kernel.

Signed-off-by: Thomas Gleixner <redacted>
Index: linux-2.6/arch/arm/mm/cache-l2x0.c
===================================================================
--- linux-2.6.orig/arch/arm/mm/cache-l2x0.c
+++ linux-2.6/arch/arm/mm/cache-l2x0.c
@@ -206,6 +206,12 @@ static void l2x0_flush_range(unsigned lo
       spin_unlock_irqrestore(&l2x0_lock, flags);
 }

+static void l2x0_cache_disable(void)
+{
+       l2x0_inv_all();
+       writel(0, l2x0_base + L2X0_CTRL);
+}
I think it's a problem for PL310 controller where the access to
L2X0_CTRL is secure, accessing this in non-secure mode will fault.

Srinidhi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help