diff options
author | Avi Kivity <avi@redhat.com> | 2008-12-24 16:23:33 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-24 16:23:33 +0200 |
commit | f6cfad48e480ac3ce28ed3e4befd6d467804a77f (patch) | |
tree | 56b2054f68b419bdc91943e97836dcdc7c2e1ce1 /bios | |
parent | 846c6c575f525d4c130627d88fffebc2195e5ab3 (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-x | bios/rombios32.c | 2 |
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 } |