linux/arch/arm/plat-versatile
Mark Rutland 8121cf312a ARM: 7766/1: versatile: don't mark pen as __INIT
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,
as each CPU's gic cpumask is initialised to 0xff, and thus an IPI to any
CPU will wake up *all* secondaries. This behaviour is crucial to the GIC
cpumask self-discovery. 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.

As preventing cpus from entering the pen would require invasive changes
to the GIC driver and to existing dts used in the wild, we instead
remove the __INIT marker from the pen, keeping it around and leaving the
unused secondary CPUs dormant.

Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/175039.html

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:23:56 +01:00
..
include/plat ARM: plat-versatile: move FPGA irq driver to drivers/irqchip 2012-11-04 18:09:12 +01:00
clcd.c ARM: add versatile family consolidated CLCD support 2011-02-19 11:09:12 +00:00
clock.c
headsmp.S ARM: 7766/1: versatile: don't mark pen as __INIT 2013-06-24 15:23:56 +01:00
Kconfig ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
leds.c ARM: mach-realview and mach-versatile: retire custom LED code 2012-08-01 11:22:04 +08:00
Makefile ARM: plat-versatile: move FPGA irq driver to drivers/irqchip 2012-11-04 18:09:12 +01:00
platsmp.c irqchip: gic: Perform the gic_secondary_init() call via CPU notifier 2013-03-26 16:12:02 +00:00
sched-clock.c ARM: 7205/2: sched_clock: allow sched_clock to be selected at runtime 2011-12-18 23:00:26 +00:00