summaryrefslogtreecommitdiff
path: root/sys/arch/socppc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/socppc')
-rw-r--r--sys/arch/socppc/dev/ipic.c10
-rw-r--r--sys/arch/socppc/socppc/autoconf.c4
-rw-r--r--sys/arch/socppc/socppc/clock.c4
-rw-r--r--sys/arch/socppc/socppc/machdep.c43
4 files changed, 19 insertions, 42 deletions
diff --git a/sys/arch/socppc/dev/ipic.c b/sys/arch/socppc/dev/ipic.c
index 5b0b59bfac6..3d51da16528 100644
--- a/sys/arch/socppc/dev/ipic.c
+++ b/sys/arch/socppc/dev/ipic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipic.c,v 1.10 2009/09/12 21:38:01 kettenis Exp $ */
+/* $OpenBSD: ipic.c,v 1.11 2009/10/01 20:19:19 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -221,7 +221,7 @@ intr_calculatemasks(void)
int level;
for (level = IPL_NONE; level < IPL_NUM; level++)
- imask[level] = SINT_MASK | (1 << level);
+ imask[level] = SINT_ALLMASK | (1 << level);
/*
* There are tty, network and disk drivers that use free() at interrupt
@@ -233,7 +233,7 @@ intr_calculatemasks(void)
imask[IPL_NET] |= imask[IPL_BIO];
imask[IPL_TTY] |= imask[IPL_NET];
imask[IPL_VM] |= imask[IPL_TTY];
- imask[IPL_CLOCK] |= imask[IPL_VM] | SPL_CLOCK;
+ imask[IPL_CLOCK] |= imask[IPL_VM] | SPL_CLOCKMASK;
/*
* These are pseudo-levels.
@@ -376,8 +376,8 @@ ipic_do_pending_int(void)
uint32_t mask;
int level;
- ci->ci_ipending &= SINT_MASK;
- level = cntlzw(31 - (ci->ci_cpl & ~(SPL_CLOCK|SINT_MASK)));
+ ci->ci_ipending &= SINT_ALLMASK;
+ level = cntlzw(31 - (ci->ci_cpl & ~(SPL_CLOCKMASK|SINT_ALLMASK)));
mask = sc->sc_simsr_h[IPL_HIGH] & ~sc->sc_simsr_h[level];
ipic_write(sc, IPIC_SIMSR_H, mask);
mask = sc->sc_simsr_l[IPL_HIGH] & ~sc->sc_simsr_l[level];
diff --git a/sys/arch/socppc/socppc/autoconf.c b/sys/arch/socppc/socppc/autoconf.c
index e1fdcc53264..bd0c90758e1 100644
--- a/sys/arch/socppc/socppc/autoconf.c
+++ b/sys/arch/socppc/socppc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.3 2008/07/21 04:35:54 todd Exp $ */
+/* $OpenBSD: autoconf.c,v 1.4 2009/10/01 20:19:19 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -36,6 +36,8 @@ cpu_configure(void)
{
splhigh();
+ softintr_init();
+
if (config_rootfound("mainbus", "mainbus") == 0)
panic("no mainbus found");
diff --git a/sys/arch/socppc/socppc/clock.c b/sys/arch/socppc/socppc/clock.c
index 4b335b7e20d..4a3d87d3fb5 100644
--- a/sys/arch/socppc/socppc/clock.c
+++ b/sys/arch/socppc/socppc/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.6 2009/09/07 21:52:17 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.7 2009/10/01 20:19:19 kettenis Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@ -202,7 +202,7 @@ decr_intr(struct clockframe *frame)
*/
ppc_mtdec(nextevent - tb);
- if (curcpu()->ci_cpl & SPL_CLOCK) {
+ if (curcpu()->ci_cpl & SPL_CLOCKMASK) {
ci->ci_statspending += nstats;
} else {
KERNEL_LOCK();
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index 6c8f7afc552..2c22254ad7a 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.22 2009/08/30 14:57:41 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.23 2009/10/01 20:19:19 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -57,8 +57,6 @@
#include <machine/powerpc.h>
#include <machine/trap.h>
-#include <net/netisr.h>
-
#include <dev/cons.h>
#include <dev/ic/comvar.h>
@@ -477,21 +475,6 @@ dumpsys(void)
int imask[IPL_NUM];
-int netisr;
-
-/*
- * Soft networking interrupts.
- */
-void
-softnet(int isr)
-{
-#define DONETISR(flag, func) \
- if (isr & (1 << flag))\
- func();
-
-#include <net/netisr_dispatch.h>
-}
-
int
lcsplx(int ipl)
{
@@ -1138,40 +1121,32 @@ do_pending_int(void)
ci->ci_cpl = SINT_CLOCK|SINT_NET|SINT_TTY;
ppc_intr_enable(1);
KERNEL_LOCK();
- softclock();
+ softintr_dispatch(SI_SOFTCLOCK);
KERNEL_UNLOCK();
ppc_intr_disable();
continue;
}
if((ci->ci_ipending & SINT_NET) & ~pcpl) {
- extern int netisr;
- int pisr;
-
ci->ci_ipending &= ~SINT_NET;
ci->ci_cpl = SINT_NET|SINT_TTY;
- while ((pisr = netisr) != 0) {
- atomic_clearbits_int(&netisr, pisr);
- ppc_intr_enable(1);
- KERNEL_LOCK();
- softnet(pisr);
- KERNEL_UNLOCK();
- ppc_intr_disable();
- }
+ ppc_intr_enable(1);
+ KERNEL_LOCK();
+ softintr_dispatch(SI_SOFTNET);
+ KERNEL_UNLOCK();
+ ppc_intr_disable();
continue;
}
-#if 0
if((ci->ci_ipending & SINT_TTY) & ~pcpl) {
ci->ci_ipending &= ~SINT_TTY;
ci->ci_cpl = SINT_TTY;
ppc_intr_enable(1);
KERNEL_LOCK();
- softtty();
+ softintr_dispatch(SI_SOFTTTY);
KERNEL_UNLOCK();
ppc_intr_disable();
continue;
}
-#endif
- } while ((ci->ci_ipending & SINT_MASK) & ~pcpl);
+ } while ((ci->ci_ipending & SINT_ALLMASK) & ~pcpl);
ci->ci_cpl = pcpl; /* Don't use splx... we are here already! */
ci->ci_iactive = 0;