linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: l2c: unlock ways when in non-secure mode
@ 2017-11-26 12:25 Peng Fan
  2017-11-26 13:18 ` Russell King - ARM Linux
  0 siblings, 1 reply; 9+ messages in thread
From: Peng Fan @ 2017-11-26 12:25 UTC (permalink / raw)
  To: linux-arm-kernel

To boot Linux in Non-secure mode with l2x0, the l2x0 controller
is enabled in secure mode and ways locked to make it seems L2 cache
disabled during linux boot process. So during l2x0 initialization,
need to unlock the ways to make l2x0 could cache data/inst.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Will Deacon <will.deacon@arm.com>
---
 arch/arm/mm/cache-l2x0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 808efbb89b88..de8eed0871ec 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -879,6 +879,10 @@ static int __init __l2c_init(const struct l2c_init_data *data,
 		l2x0_saved_regs.aux_ctrl = aux;
 
 		data->enable(l2x0_base, data->num_lock);
+	} else {
+		pr_info("%s: unlock cache controller\n", data->type);
+
+		data->unlock(l2x0_base, data->num_lock);
 	}
 
 	outer_cache = fns;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-12-05 16:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-26 12:25 [PATCH] arm: l2c: unlock ways when in non-secure mode Peng Fan
2017-11-26 13:18 ` Russell King - ARM Linux
2017-11-26 23:56   ` Peng Fan
2017-11-27  9:19     ` Russell King - ARM Linux
2017-11-27  9:43       ` Peng Fan
2017-11-27 10:19         ` Russell King - ARM Linux
2017-11-28  1:57           ` Peng Fan
2017-12-03 11:20             ` Peng Fan
2017-12-05 16:03               ` Etienne Carriere

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).