diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-12-29 16:02:57 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-12-29 16:02:57 +0100 |
commit | cb2103879e7e1cb869ed1eb8455c468a756e7ef0 (patch) | |
tree | c0affb57a08cecb87ef00539ddf4d7a93cc759be /sys/src/9/zynq/intr.c | |
parent | e08cc065177138fe821abb84dc6381fd0400e944 (diff) |
zymq: lilu dallas, multicore
implement multiprocessor support.
Diffstat (limited to 'sys/src/9/zynq/intr.c')
-rw-r--r-- | sys/src/9/zynq/intr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/9/zynq/intr.c b/sys/src/9/zynq/intr.c index b8bf858f4..4bfb6867f 100644 --- a/sys/src/9/zynq/intr.c +++ b/sys/src/9/zynq/intr.c @@ -44,6 +44,9 @@ intrinit(void) mpcore[ICCICR] = 7; mpcore[ICCBPR] = 3; mpcore[ICCPMR] = 255; + + if(m->machno != 0) + return; /* disable all irqs and clear any pending interrupts */ for(i = 0; i < NINTR/32; i++){ @@ -66,7 +69,7 @@ intrenable(int irq, void (*f)(Ureg *, void *), void *arg, int type, char *name) panic("intrenable: invalid irq %d", irq); if(type != LEVEL && type != EDGE) panic("intrenable: invalid type %d", type); - if(irqs[irq].f != nil) + if(irqs[irq].f != nil && irqs[irq].f != f) panic("intrenable: handler already assigned"); if(irq >= NPRIVATE){ e = &mpcore[ICDIPTR + (irq >> 2)]; |