replace bogus loops with slightly less bogus loops.
This commit is contained in:
parent
3d145283a2
commit
6861140a66
1 changed files with 3 additions and 5 deletions
8
lapic.c
8
lapic.c
|
@ -201,17 +201,15 @@ lapic_startap(uchar apicid, int v)
|
||||||
lapic_write(LAPIC_ICRHI, crhi);
|
lapic_write(LAPIC_ICRHI, crhi);
|
||||||
lapic_write(LAPIC_ICRLO, LAPIC_FIELD|APIC_LEVEL|
|
lapic_write(LAPIC_ICRLO, LAPIC_FIELD|APIC_LEVEL|
|
||||||
LAPIC_ASSERT|APIC_INIT);
|
LAPIC_ASSERT|APIC_INIT);
|
||||||
|
for(j=0; j<10000; j++); // 200us
|
||||||
while(j++ < 10000) {;}
|
|
||||||
lapic_write(LAPIC_ICRLO, LAPIC_FIELD|APIC_LEVEL|
|
lapic_write(LAPIC_ICRLO, LAPIC_FIELD|APIC_LEVEL|
|
||||||
LAPIC_DEASSERT|APIC_INIT);
|
LAPIC_DEASSERT|APIC_INIT);
|
||||||
|
for(j=0; j<1000000; j++); // 10ms
|
||||||
while(j++ < 1000000) {;}
|
|
||||||
|
|
||||||
// in p9 code, this was i < 2, which is what the spec says on page B-3
|
// in p9 code, this was i < 2, which is what the spec says on page B-3
|
||||||
for(i = 0; i < 1; i++){
|
for(i = 0; i < 1; i++){
|
||||||
lapic_write(LAPIC_ICRHI, crhi);
|
lapic_write(LAPIC_ICRHI, crhi);
|
||||||
lapic_write(LAPIC_ICRLO, LAPIC_FIELD|APIC_EDGE|APIC_STARTUP|(v/4096));
|
lapic_write(LAPIC_ICRLO, LAPIC_FIELD|APIC_EDGE|APIC_STARTUP|(v/4096));
|
||||||
while(j++ < 100000) {;}
|
for(j=0; j<10000; j++); // 200us
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue