Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3ca8093 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds
Browse files

[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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ed90fb4a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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",