Bruce Rogers <brogers@novell.com> observed new compiler optimizing
away memory assign in smp detect. Add barrier() to code to ensure gcc
knows the SIPI can read/write memory.
}
// broadcast SIPI
+ barrier();
writel(APIC_ICR_LOW, 0x000C4500);
u32 sipi_vector = BUILD_AP_BOOT_ADDR >> 12;
writel(APIC_ICR_LOW, 0x000C4600 | sipi_vector);
} else {
u8 cmos_smp_count = inb_cmos(CMOS_BIOS_SMP_COUNT);
while (cmos_smp_count + 1 != readl(&CountCPUs))
- ;
+ yield();
}
// Restore memory.