瀏覽代碼

[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>
Anton Blanchard 19 年之前
父節點
當前提交
b3ca809351
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      arch/ppc64/kernel/machine_kexec.c

+ 1 - 0
arch/ppc64/kernel/machine_kexec.c

@@ -205,6 +205,7 @@ static void kexec_prepare_cpus(void)
 			continue;
 
 		while (paca[i].hw_cpu_id != -1) {
+			barrier();
 			if (!cpu_possible(i)) {
 				printk("kexec: cpu %d hw_cpu_id %d is not"
 						" possible, ignoring\n",