From: Paul Mackerras Remove the volatile from cpus_in_xmon, and put a barrier() in the loop that waits for the other cpus to come in to xmon. Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/xmon/xmon.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN arch/ppc64/xmon/xmon.c~ppc64-remove-the-volatile-from-cpus_in_xmon arch/ppc64/xmon/xmon.c --- 25/arch/ppc64/xmon/xmon.c~ppc64-remove-the-volatile-from-cpus_in_xmon Fri Nov 19 15:40:26 2004 +++ 25-akpm/arch/ppc64/xmon/xmon.c Fri Nov 19 15:40:26 2004 @@ -40,7 +40,7 @@ #define skipbl xmon_skipbl #ifdef CONFIG_SMP -volatile cpumask_t cpus_in_xmon = CPU_MASK_NONE; +cpumask_t cpus_in_xmon = CPU_MASK_NONE; static unsigned long xmon_taken = 1; static int xmon_owner; static int xmon_gate; @@ -386,9 +386,11 @@ int xmon_core(struct pt_regs *regs, int if (ncpus > 1) { smp_send_debugger_break(MSG_ALL_BUT_SELF); /* wait for other cpus to come in */ - for (timeout = 100000000; timeout != 0; --timeout) + for (timeout = 100000000; timeout != 0; --timeout) { if (cpus_weight(cpus_in_xmon) >= ncpus) break; + barrier(); + } } remove_bpts(); disable_surveillance(); _