diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-01-05 05:32:40 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-01-05 05:32:40 +0100 |
commit | 41383ad0120630edd42c5c897a287e2f9d9161b4 (patch) | |
tree | 8be5d54a18256d149febb8a8bbf432bacb5e28e8 /sys/src/9/alphapc | |
parent | dd8908cff003135095996d2b0b5ea250c615a0e2 (diff) |
kernel: change active.machs from bitmap to char array to support up to 64 cpus on pc64
Diffstat (limited to 'sys/src/9/alphapc')
-rw-r--r-- | sys/src/9/alphapc/dat.h | 4 | ||||
-rw-r--r-- | sys/src/9/alphapc/main.c | 2 | ||||
-rw-r--r-- | sys/src/9/alphapc/trap.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sys/src/9/alphapc/dat.h b/sys/src/9/alphapc/dat.h index 250d607e0..5af7a0fdc 100644 --- a/sys/src/9/alphapc/dat.h +++ b/sys/src/9/alphapc/dat.h @@ -184,8 +184,8 @@ struct Mach struct { Lock; - short machs; - short exiting; + char machs[MAXMACH]; + int exiting; }active; /* diff --git a/sys/src/9/alphapc/main.c b/sys/src/9/alphapc/main.c index 9175c2627..c9d10faee 100644 --- a/sys/src/9/alphapc/main.c +++ b/sys/src/9/alphapc/main.c @@ -156,7 +156,7 @@ machinit(void) m->machno = n; active.exiting = 0; - active.machs = 1; + active.machs[0] = 1; cpu = (Hwcpu*) ((ulong)hwrpb + hwrpb->cpuoff + n*hwrpb->cpulen); cpu->state &= ~Cpubootinprog; diff --git a/sys/src/9/alphapc/trap.c b/sys/src/9/alphapc/trap.c index 07d4ea3a7..5f26c5393 100644 --- a/sys/src/9/alphapc/trap.c +++ b/sys/src/9/alphapc/trap.c @@ -261,8 +261,8 @@ intr(Ureg *ur) */ iprint("cpu%d: spurious interrupt %d, last %d", m->machno, vno-VectorPIC, m->lastintr); - for(i = 0; i < 32; i++){ - if(!(active.machs & (1<<i))) + for(i = 0; i < MAXMACH; i++){ + if(active.machs[i] == 0) continue; mach = MACHP(i); if(m->machno == mach->machno) |