diff options
author | Anton Blanchard <anton@samba.org> | 2005-09-28 00:45:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-28 10:46:41 -0400 |
commit | b3ca80935100af47f226be439cb266378dab7bf7 (patch) | |
tree | 8633bb97958ccc79a5f7a96d391aaca1bab926cd | |
parent | ed90fb4a19956cece996eb1d26534f592918730e (diff) |
[PATCH] ppc64: Add missing barrier() in kexec code
Mikey and I were testing kexec and hit a lockup. It turns out gcc 4.0
optimises the kexec_prepare_cpus loop so we avoid reloading paca.hw_cpu_id.
A gcc barrier() fixes the problem.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/ppc64/kernel/machine_kexec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/machine_kexec.c b/arch/ppc64/kernel/machine_kexec.c index 4775f12a013c..bf7cc4f8210f 100644 --- a/arch/ppc64/kernel/machine_kexec.c +++ b/arch/ppc64/kernel/machine_kexec.c | |||
@@ -205,6 +205,7 @@ static void kexec_prepare_cpus(void) | |||
205 | continue; | 205 | continue; |
206 | 206 | ||
207 | while (paca[i].hw_cpu_id != -1) { | 207 | while (paca[i].hw_cpu_id != -1) { |
208 | barrier(); | ||
208 | if (!cpu_possible(i)) { | 209 | if (!cpu_possible(i)) { |
209 | printk("kexec: cpu %d hw_cpu_id %d is not" | 210 | printk("kexec: cpu %d hw_cpu_id %d is not" |
210 | " possible, ignoring\n", | 211 | " possible, ignoring\n", |