linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: versatile: don't mark pen as __INIT
@ 2013-06-10 15:07 Mark Rutland
  2013-06-10 15:35 ` Jonathan Austin
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Mark Rutland @ 2013-06-10 15:07 UTC (permalink / raw)
  To: linux-arm-kernel

When booting fewer cores than are physically present on a versatile
platform (e.g. when passing maxcpus=N on the command line), some
secondary cores may remain in the holding pen, which is marked __INIT.
Late in the boot process, the memory comprising the holding pen will be
released to the kernel for more general use, and may be overwritten with
arbitrary data, which can cause the held secondaries to start behaving
unpredictably. This can lead to all manner of odd behaviour from the
kernel.

Instead don't mark the section as __INIT. This means we can't reuse the
pen memory, but we won't get secondaries corrupting the rest of the
kernel.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
 arch/arm/plat-versatile/headsmp.S | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S
index b178d44..2677bc3 100644
--- a/arch/arm/plat-versatile/headsmp.S
+++ b/arch/arm/plat-versatile/headsmp.S
@@ -11,8 +11,6 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 
-	__INIT
-
 /*
  * Realview/Versatile Express specific entry point for secondary CPUs.
  * This provides a "holding pen" into which all secondary cores are held
-- 
1.8.1.1

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

end of thread, other threads:[~2013-06-20 14:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-10 15:07 [PATCH] arm: versatile: don't mark pen as __INIT Mark Rutland
2013-06-10 15:35 ` Jonathan Austin
2013-06-10 18:39 ` Stephen Boyd
2013-06-10 18:52   ` Mark Rutland
2013-06-10 19:09     ` Stephen Boyd
2013-06-10 19:22       ` Stephen Boyd
2013-06-10 20:39         ` Lorenzo Pieralisi
2013-06-10 21:23           ` Stephen Boyd
2013-06-10 23:24 ` Russell King - ARM Linux
2013-06-11  9:04   ` Mark Rutland
2013-06-11 15:43     ` Nicolas Pitre
2013-06-17 10:10       ` Mark Rutland
2013-06-17 11:25         ` Nicolas Pitre
2013-06-20 14:10           ` Mark Rutland
2013-06-18 13:26 ` Jon Medhurst (Tixy)
2013-06-18 15:13   ` Russell King - ARM Linux
2013-06-18 15:28     ` Jon Medhurst (Tixy)

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).