summaryrefslogtreecommitdiff
path: root/bios
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-12-24 16:23:33 +0200
committerAvi Kivity <avi@redhat.com>2008-12-24 16:23:33 +0200
commitf6cfad48e480ac3ce28ed3e4befd6d467804a77f (patch)
tree56b2054f68b419bdc91943e97836dcdc7c2e1ce1 /bios
parent846c6c575f525d4c130627d88fffebc2195e5ab3 (diff)
kvm: bios: prevent compiler from caching cpu count while starting up smp
Other cpus are updating the count in parallel; if we get bad timing we might not notice them starting up and hang. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'bios')
-rwxr-xr-xbios/rombios32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bios/rombios32.c b/bios/rombios32.c
index cceaedef..321563da 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -633,7 +633,7 @@ void smp_probe(void)
#ifndef BX_QEMU
delay_ms(10);
#else
- while (cmos_readb(0x5f) + 1 != smp_cpus)
+ while (cmos_readb(0x5f) + 1 != readw(&smp_cpus))
;
#endif
}