diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2007-02-15 13:05:29 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-16 08:06:56 -0500 |
commit | 0e0ba76926c37f11f38670db0cb33728f502551e (patch) | |
tree | ef6c4b005b64fe9c42a2a9cd903442b1e252797d /arch/arm/mach-realview/platsmp.c | |
parent | 7770bddb27ea84519486d8bb5d35d36d580c451b (diff) |
[ARM] 4201/1: SMP barriers pair needed for the secondary boot process
In some situations, the pen_release store in platform_secondary_init()
may stay forever in the write buffer while the CPU is waiting on the
boot_lock to be released in boot_secondary(). The primary CPU could
never see the pen_release update without the barriers.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/platsmp.c')
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 709a9b1ac634..fce3596f9950 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -59,6 +59,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
59 | * pen, then head off into the C entry point | 59 | * pen, then head off into the C entry point |
60 | */ | 60 | */ |
61 | pen_release = -1; | 61 | pen_release = -1; |
62 | smp_wmb(); | ||
62 | 63 | ||
63 | /* | 64 | /* |
64 | * Synchronise with the boot thread. | 65 | * Synchronise with the boot thread. |
@@ -102,6 +103,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
102 | 103 | ||
103 | timeout = jiffies + (1 * HZ); | 104 | timeout = jiffies + (1 * HZ); |
104 | while (time_before(jiffies, timeout)) { | 105 | while (time_before(jiffies, timeout)) { |
106 | smp_rmb(); | ||
105 | if (pen_release == -1) | 107 | if (pen_release == -1) |
106 | break; | 108 | break; |
107 | 109 | ||