kernel-ark/arch/arm/mach-s5pv310
Russell King 3705ff6da5 ARM: Fix subtle race in CPU pen_release hotplug code
There is a subtle race in the CPU hotplug code, where a CPU which has
been offlined can online itself before being requested, which results
in things going astray on the next online/offline cycle.

What happens in the normal online/offline/online cycle is:

	CPU0			CPU3
	requests boot of CPU3
	pen_release = 3
	flush cache line
				checks pen_release, reads 3
				starts boot
				pen_release = -1
	... requests CPU3 offline ...
				... dies ...
				checks pen_release, reads -1
	requests boot of CPU3
	pen_release = 3
	flush cache line
				checks pen_release, reads 3
				starts boot
				pen_release = -1

However, as the write of -1 of pen_release is not fully flushed back to
memory, and the checking of pen_release is done with caches disabled,
this allows CPU3 the opportunity to read the old value of pen_release:

	CPU0			CPU3
	requests boot of CPU3
	pen_release = 3
	flush cache line
				checks pen_release, reads 3
				starts boot
				pen_release = -1
	... requests CPU3 offline ...
				... dies ...
				checks pen_release, reads 3
				starts boot
				pen_release = -1
	requests boot of CPU3
	pen_release = 3
	flush cache line

Fix this by grouping the write of pen_release along with its cache line
flushing code to ensure that any update to pen_release is always pushed
out to physical memory.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-12-20 15:09:13 +00:00
..
include/mach ARM: SMP: remove smp_mpidr.h 2010-12-20 15:09:11 +00:00
clock.c ARM: S5PV310: Add support RTC 2010-10-21 07:52:17 +09:00
cpu.c ARM: S5PV310: Add support SROMC 2010-10-26 08:40:12 +09:00
gpiolib.c ARM: S5PV310: Add support GPIOlib 2010-10-25 16:06:33 +09:00
headsmp.S
hotplug.c ARM: CPU hotplug: remove bug checks in platform_cpu_die() 2010-12-20 15:09:10 +00:00
init.c
irq-combiner.c ARM: S5PV310: Optimize interrupt source searching code 2010-10-21 07:52:18 +09:00
irq-eint.c ARM: S5PV310: Add support External Interrupt 2010-10-25 16:11:28 +09:00
Kconfig ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support 2010-10-25 16:03:43 +09:00
localtimer.c ARM: S5PV310: Add Timer support 2010-08-05 18:32:42 +09:00
mach-smdkc210.c ARM: S5PV310: Support ethernet for SMDKV310 and SMDKC210 2010-10-26 12:51:17 +09:00
mach-smdkv310.c Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-universal_c210.c Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
Makefile ARM: S5PV310: Add support External Interrupt 2010-10-25 16:11:28 +09:00
Makefile.boot ARM: S5PV310: Add new Kconfig and Makefiles 2010-08-05 18:32:42 +09:00
platsmp.c ARM: Fix subtle race in CPU pen_release hotplug code 2010-12-20 15:09:13 +00:00
setup-i2c0.c ARM: S5PV310: Change to using s3c_gpio_cfgall_range() 2010-10-23 11:50:42 +09:00
setup-i2c1.c ARM: S5PV310: Change to using s3c_gpio_cfgall_range() 2010-10-23 11:50:42 +09:00
setup-i2c2.c ARM: S5PV310: Change to using s3c_gpio_cfgall_range() 2010-10-23 11:50:42 +09:00
setup-i2c3.c ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support 2010-10-25 16:03:43 +09:00
setup-i2c4.c ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support 2010-10-25 16:03:43 +09:00
setup-i2c5.c ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support 2010-10-25 16:03:43 +09:00
setup-i2c6.c ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support 2010-10-25 16:03:43 +09:00
setup-i2c7.c ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support 2010-10-25 16:03:43 +09:00
setup-sdhci-gpio.c ARM: S5PV310: Add support HSMMC and SDHCI configuration 2010-10-25 16:02:20 +09:00
setup-sdhci.c ARM: S5PV310: Add support HSMMC and SDHCI configuration 2010-10-25 16:02:20 +09:00
time.c ARM: S5PV310: Add Timer support 2010-08-05 18:32:42 +09:00