diff options
author | Frans Kaashoek <[email protected]> | 2017-08-09 07:43:06 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2017-08-09 07:44:51 -0400 |
commit | 4f14d8d1e594bdf45e36a035f6c3fd4ca959711e (patch) | |
tree | bef4071d263d8dc36f4a01e9342b0a697dc1dc7b /mp.c | |
parent | 70705966adb7a055582f76f2ecdb5ce9cd3c8a85 (diff) | |
download | xv6-labs-4f14d8d1e594bdf45e36a035f6c3fd4ca959711e.tar.gz xv6-labs-4f14d8d1e594bdf45e36a035f6c3fd4ca959711e.tar.bz2 xv6-labs-4f14d8d1e594bdf45e36a035f6c3fd4ca959711e.zip |
Commit to running on an SMP (perhaps with only 1 core). Remove most code
from picirq.c and remove timer.c completely. Update runoff.list.
Diffstat (limited to 'mp.c')
-rw-r--r-- | mp.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -12,7 +12,6 @@ #include "proc.h" struct cpu cpus[NCPU]; -int ismp; int ncpu; uchar ioapicid; @@ -93,13 +92,14 @@ void mpinit(void) { uchar *p, *e; + int ismp; struct mp *mp; struct mpconf *conf; struct mpproc *proc; struct mpioapic *ioapic; if((conf = mpconfig(&mp)) == 0) - return; + panic("Expect to run on an SMP"); ismp = 1; lapic = (uint*)conf->lapicaddr; for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){ @@ -127,13 +127,8 @@ mpinit(void) break; } } - if(!ismp){ - // Didn't like what we found; fall back to no MP. - ncpu = 1; - lapic = 0; - ioapicid = 0; - return; - } + if(!ismp) + panic("Didn't find a suitable machine"); if(mp->imcrp){ // Bochs doesn't support IMCR, so this doesn't run on Bochs. |