summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-11-04 19:14:11 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-11-04 19:14:11 +0000
commit977663b99170667667569e24c3cc3c783721c5d2 (patch)
tree074971fd3c83c1872e970f2ad03edf724c909540 /sys
parent6c3b6a695dfbbd617cb55229859fc54028fa1dc0 (diff)
Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.
ok jsing@, miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/include/_types.h3
-rw-r--r--sys/arch/amd64/include/_types.h3
-rw-r--r--sys/arch/arm/s3c2xx0/sscom.c17
-rw-r--r--sys/arch/armish/include/_types.h5
-rw-r--r--sys/arch/beagle/include/_types.h11
-rw-r--r--sys/arch/gumstix/include/_types.h4
-rw-r--r--sys/arch/hppa/include/_types.h3
-rw-r--r--sys/arch/i386/include/_types.h3
-rw-r--r--sys/arch/m68k/include/_types.h5
-rw-r--r--sys/arch/m88k/include/_types.h5
-rw-r--r--sys/arch/mips64/include/_types.h3
-rw-r--r--sys/arch/moko/include/_types.h4
-rw-r--r--sys/arch/palm/include/_types.h4
-rw-r--r--sys/arch/powerpc/include/_types.h3
-rw-r--r--sys/arch/sh/include/_types.h5
-rw-r--r--sys/arch/sparc/include/_types.h5
-rw-r--r--sys/arch/sparc64/include/_types.h3
-rw-r--r--sys/arch/vax/include/_types.h5
-rw-r--r--sys/arch/zaurus/include/_types.h4
-rw-r--r--sys/dev/ic/com.c32
-rw-r--r--sys/dev/ic/comvar.h6
-rw-r--r--sys/dev/usb/ehci.c12
-rw-r--r--sys/dev/usb/ohci.c8
-rw-r--r--sys/dev/usb/ohcivar.h4
-rw-r--r--sys/dev/usb/uhci.c8
-rw-r--r--sys/dev/usb/uhcivar.h4
-rw-r--r--sys/dev/usb/usb.c11
-rw-r--r--sys/dev/usb/usb_port.h8
-rw-r--r--sys/dev/usb/usbdi.h11
-rw-r--r--sys/dev/usb/usbdivar.h5
-rw-r--r--sys/dev/usb/usbf_subr.c10
-rw-r--r--sys/dev/usb/usbfvar.h4
-rw-r--r--sys/kern/kern_clock.c26
-rw-r--r--sys/kern/kern_sig.c9
-rw-r--r--sys/kern/kern_timeout.c5
-rw-r--r--sys/sys/systm.h4
36 files changed, 58 insertions, 204 deletions
diff --git a/sys/arch/alpha/include/_types.h b/sys/arch/alpha/include/_types.h
index e05901e0a3f..471b7c96f1a 100644
--- a/sys/arch/alpha/include/_types.h
+++ b/sys/arch/alpha/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.10 2008/07/21 20:50:54 martynas Exp $ */
+/* $OpenBSD: _types.h,v 1.11 2009/11/04 19:14:09 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -121,7 +121,6 @@ typedef void * __wctrans_t;
typedef void * __wctype_t;
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _ALPHA__TYPES_H_ */
diff --git a/sys/arch/amd64/include/_types.h b/sys/arch/amd64/include/_types.h
index 772c5291238..9d4eed417e9 100644
--- a/sys/arch/amd64/include/_types.h
+++ b/sys/arch/amd64/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.5 2008/07/21 20:50:54 martynas Exp $ */
+/* $OpenBSD: _types.h,v 1.6 2009/11/04 19:14:09 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -117,7 +117,6 @@ typedef void * __wctrans_t;
typedef void * __wctype_t;
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _AMD64__TYPES_H_ */
diff --git a/sys/arch/arm/s3c2xx0/sscom.c b/sys/arch/arm/s3c2xx0/sscom.c
index f12a54f440a..db5fec6d27a 100644
--- a/sys/arch/arm/s3c2xx0/sscom.c
+++ b/sys/arch/arm/s3c2xx0/sscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sscom.c,v 1.13 2009/11/01 20:29:00 nicm Exp $ */
+/* $OpenBSD: sscom.c,v 1.14 2009/11/04 19:14:09 kettenis Exp $ */
/* $NetBSD: sscom.c,v 1.29 2008/06/11 22:37:21 cegger Exp $ */
/*
@@ -515,14 +515,10 @@ sscom_attach_subr(struct sscom_softc *sc)
/* if there are no enable/disable functions, assume the device
is always enabled */
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
sc->sc_si = softintr_establish(IPL_TTY, sscomsoft, sc);
if (sc->sc_si == NULL)
panic("%s: can't establish soft interrupt",
sc->sc_dev.dv_xname);
-#else
- timeout_set(&sc->sc_comsoft_tmo, comsoft, sc);
-#endif
SET(sc->sc_hwflags, SSCOM_HW_DEV_OK);
@@ -963,9 +959,7 @@ sscom_schedrx(struct sscom_softc *sc)
sc->sc_rx_ready = 1;
/* Wake up the poller. */
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_schedule(sc->sc_si);
-#endif
}
void
@@ -1610,12 +1604,6 @@ sscomsoft(void *arg)
sscom_stsoft(sc, tp);
}
}
-#ifndef __HAVE_GENERIC_SOFT_INTERRUPTS
- timeout_add(&sc->sc_comsoft_tmo, 1);
-#else
- ;
-#endif
-
}
@@ -1807,10 +1795,7 @@ next:
SSCOM_UNLOCK(sc);
/* Wake up the poller. */
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_schedule(sc->sc_si);
-#endif
-
#if NRND > 0 && defined(RND_COM)
diff --git a/sys/arch/armish/include/_types.h b/sys/arch/armish/include/_types.h
index 258a89be018..e23642dacd2 100644
--- a/sys/arch/armish/include/_types.h
+++ b/sys/arch/armish/include/_types.h
@@ -1,11 +1,12 @@
-/* $OpenBSD: _types.h,v 1.4 2007/05/21 14:54:35 drahn Exp $ */
+/* $OpenBSD: _types.h,v 1.5 2009/11/04 19:14:09 kettenis Exp $ */
/* $NetBSD: types.h,v 1.4 2002/02/28 03:17:26 simonb Exp $ */
#ifndef _ARMISH__TYPES_H_
#define _ARMISH__TYPES_H_
#include <arm/_types.h>
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
+
+/* Feature test macros */
#define __HAVE_TIMECOUNTER
#endif /* _ARMISH__TYPES_H_ */
diff --git a/sys/arch/beagle/include/_types.h b/sys/arch/beagle/include/_types.h
index 85f3a260435..b3b7ac18212 100644
--- a/sys/arch/beagle/include/_types.h
+++ b/sys/arch/beagle/include/_types.h
@@ -1,11 +1,12 @@
-/* $OpenBSD: _types.h,v 1.1 2009/05/08 03:13:26 drahn Exp $ */
+/* $OpenBSD: _types.h,v 1.2 2009/11/04 19:14:09 kettenis Exp $ */
/* $NetBSD: types.h,v 1.4 2002/02/28 03:17:26 simonb Exp $ */
-#ifndef _ARMISH__TYPES_H_
-#define _ARMISH__TYPES_H_
+#ifndef _BEAGLE__TYPES_H_
+#define _BEAGLE__TYPES_H_
#include <arm/_types.h>
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
+
+/* Feature test macros */
#define __HAVE_TIMECOUNTER
-#endif /* _ARMISH__TYPES_H_ */
+#endif /* _BEAGLE__TYPES_H_ */
diff --git a/sys/arch/gumstix/include/_types.h b/sys/arch/gumstix/include/_types.h
index e227caafce8..ec5a2eabd28 100644
--- a/sys/arch/gumstix/include/_types.h
+++ b/sys/arch/gumstix/include/_types.h
@@ -1,11 +1,11 @@
-/* $OpenBSD: _types.h,v 1.2 2008/11/27 20:51:48 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.3 2009/11/04 19:14:09 kettenis Exp $ */
#ifndef _GUMSTIX__TYPES_H_
#define _GUMSTIX__TYPES_H_
#include <arm/_types.h>
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
+/* Feature test macros */
#define __HAVE_TIMECOUNTER
#endif
diff --git a/sys/arch/hppa/include/_types.h b/sys/arch/hppa/include/_types.h
index a25871e696e..a4536444daf 100644
--- a/sys/arch/hppa/include/_types.h
+++ b/sys/arch/hppa/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.10 2008/07/21 20:50:54 martynas Exp $ */
+/* $OpenBSD: _types.h,v 1.11 2009/11/04 19:14:09 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -125,7 +125,6 @@ typedef void * __wctrans_t;
typedef void * __wctype_t;
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _HPPA__TYPES_H_ */
diff --git a/sys/arch/i386/include/_types.h b/sys/arch/i386/include/_types.h
index 84998e0556d..2bfdb013b50 100644
--- a/sys/arch/i386/include/_types.h
+++ b/sys/arch/i386/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.9 2008/07/21 20:50:54 martynas Exp $ */
+/* $OpenBSD: _types.h,v 1.10 2009/11/04 19:14:09 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -117,7 +117,6 @@ typedef void * __wctrans_t;
typedef void * __wctype_t;
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _I386__TYPES_H_ */
diff --git a/sys/arch/m68k/include/_types.h b/sys/arch/m68k/include/_types.h
index 5d701a38ee4..14b717ac643 100644
--- a/sys/arch/m68k/include/_types.h
+++ b/sys/arch/m68k/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.8 2009/03/15 20:40:25 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.9 2009/11/04 19:14:09 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -116,7 +116,4 @@ typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
-/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
-
#endif /* _M68K__TYPES_H_ */
diff --git a/sys/arch/m88k/include/_types.h b/sys/arch/m88k/include/_types.h
index 896bf022cc2..af2fa55ee04 100644
--- a/sys/arch/m88k/include/_types.h
+++ b/sys/arch/m88k/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.6 2009/03/15 20:39:53 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.7 2009/11/04 19:14:09 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -117,7 +117,4 @@ typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
-/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
-
#endif /* _M88K__TYPES_H_ */
diff --git a/sys/arch/mips64/include/_types.h b/sys/arch/mips64/include/_types.h
index e0a6e038263..bd59a97e6e8 100644
--- a/sys/arch/mips64/include/_types.h
+++ b/sys/arch/mips64/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.6 2009/03/20 18:41:06 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.7 2009/11/04 19:14:10 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -134,7 +134,6 @@ typedef struct label_t {
#define __SWAP_BROKEN
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _MIPS64__TYPES_H_ */
diff --git a/sys/arch/moko/include/_types.h b/sys/arch/moko/include/_types.h
index 4c23f11f13c..5c2e8323e67 100644
--- a/sys/arch/moko/include/_types.h
+++ b/sys/arch/moko/include/_types.h
@@ -1,11 +1,11 @@
-/* $OpenBSD: _types.h,v 1.1 2008/11/26 14:47:50 drahn Exp $ */
+/* $OpenBSD: _types.h,v 1.2 2009/11/04 19:14:10 kettenis Exp $ */
#ifndef _MOKO_TYPES_H_
#define _MOKO_TYPES_H_
#include <arm/_types.h>
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
+/* Feature test macros */
#define __HAVE_TIMECOUNTER
#endif
diff --git a/sys/arch/palm/include/_types.h b/sys/arch/palm/include/_types.h
index ceb1299ed1e..fcf438af8e2 100644
--- a/sys/arch/palm/include/_types.h
+++ b/sys/arch/palm/include/_types.h
@@ -1,11 +1,11 @@
-/* $OpenBSD: _types.h,v 1.1 2009/09/05 01:22:11 marex Exp $ */
+/* $OpenBSD: _types.h,v 1.2 2009/11/04 19:14:10 kettenis Exp $ */
#ifndef _PALM__TYPES_H_
#define _PALM__TYPES_H_
#include <arm/_types.h>
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
+/* Feature test macros */
#define __HAVE_TIMECOUNTER
#endif
diff --git a/sys/arch/powerpc/include/_types.h b/sys/arch/powerpc/include/_types.h
index 9cf552e0b4f..d437465bc27 100644
--- a/sys/arch/powerpc/include/_types.h
+++ b/sys/arch/powerpc/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.9 2009/10/01 20:19:19 kettenis Exp $ */
+/* $OpenBSD: _types.h,v 1.10 2009/11/04 19:14:10 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -118,7 +118,6 @@ typedef void * __wctrans_t;
typedef void * __wctype_t;
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _POWERPC__TYPES_H_ */
diff --git a/sys/arch/sh/include/_types.h b/sys/arch/sh/include/_types.h
index b9006b473be..03d1ad69069 100644
--- a/sys/arch/sh/include/_types.h
+++ b/sys/arch/sh/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.6 2008/07/21 20:50:55 martynas Exp $ */
+/* $OpenBSD: _types.h,v 1.7 2009/11/04 19:14:10 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -117,7 +117,4 @@ typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
-/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
-
#endif /* _SH__TYPES_H_ */
diff --git a/sys/arch/sparc/include/_types.h b/sys/arch/sparc/include/_types.h
index 23331af88f9..fa41d48590d 100644
--- a/sys/arch/sparc/include/_types.h
+++ b/sys/arch/sparc/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.10 2009/04/10 20:53:54 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.11 2009/11/04 19:14:10 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -116,7 +116,4 @@ typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
-/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
-
#endif /* _SPARC__TYPES_H_ */
diff --git a/sys/arch/sparc64/include/_types.h b/sys/arch/sparc64/include/_types.h
index 38510638a6b..61711455ac4 100644
--- a/sys/arch/sparc64/include/_types.h
+++ b/sys/arch/sparc64/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.8 2008/07/21 20:50:55 martynas Exp $ */
+/* $OpenBSD: _types.h,v 1.9 2009/11/04 19:14:10 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -123,7 +123,6 @@ typedef void * __wctrans_t;
typedef void * __wctype_t;
/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
#define __HAVE_TIMECOUNTER
#endif /* _SPARC64__TYPES_H_ */
diff --git a/sys/arch/vax/include/_types.h b/sys/arch/vax/include/_types.h
index 3de226fcb3a..3c503e6927a 100644
--- a/sys/arch/vax/include/_types.h
+++ b/sys/arch/vax/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.9 2009/03/20 18:39:30 miod Exp $ */
+/* $OpenBSD: _types.h,v 1.10 2009/11/04 19:14:10 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -116,7 +116,4 @@ typedef int __rune_t;
typedef void * __wctrans_t;
typedef void * __wctype_t;
-/* Feature test macros */
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
-
#endif /* _MACHINE__TYPES_H_ */
diff --git a/sys/arch/zaurus/include/_types.h b/sys/arch/zaurus/include/_types.h
index 01cc1760991..34a18e47fd3 100644
--- a/sys/arch/zaurus/include/_types.h
+++ b/sys/arch/zaurus/include/_types.h
@@ -1,11 +1,11 @@
-/* $OpenBSD: _types.h,v 1.4 2008/01/03 17:59:32 kettenis Exp $ */
+/* $OpenBSD: _types.h,v 1.5 2009/11/04 19:14:10 kettenis Exp $ */
#ifndef _ZAURUS__TYPES_H_
#define _ZAURUS__TYPES_H_
#include <arm/_types.h>
-#define __HAVE_GENERIC_SOFT_INTERRUPTS
+/* Feature test macros */
#define __HAVE_TIMECOUNTER
#endif
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index f71a1c3316b..2af5e0306f4 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.135 2009/11/01 20:29:00 nicm Exp $ */
+/* $OpenBSD: com.c,v 1.136 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -224,11 +224,7 @@ com_detach(struct device *self, int flags)
timeout_del(&sc->sc_dtr_tmo);
timeout_del(&sc->sc_diag_tmo);
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_disestablish(sc->sc_si);
-#else
- timeout_del(&sc->sc_comsoft_tmo);
-#endif
return (0);
}
@@ -328,10 +324,6 @@ comopen(dev_t dev, int flag, int mode, struct proc *p)
comparam(tp, &tp->t_termios);
ttsetwater(tp);
-#ifndef __HAVE_GENERIC_SOFT_INTERRUPTS
- timeout_add(&sc->sc_comsoft_tmo, 1);
-#endif
-
sc->sc_ibufp = sc->sc_ibuf = sc->sc_ibufs[0];
sc->sc_ibufhigh = sc->sc_ibuf + COM_IHIGHWATER;
sc->sc_ibufend = sc->sc_ibuf + COM_IBUFSIZE;
@@ -508,9 +500,6 @@ comclose(dev_t dev, int flag, int mode, struct proc *p)
compwroff(sc);
}
CLR(tp->t_state, TS_BUSY | TS_FLUSH);
-#ifndef __HAVE_GENERIC_SOFT_INTERRUPTS
- timeout_del(&sc->sc_comsoft_tmo);
-#endif
sc->sc_cua = 0;
splx(s);
ttyclose(tp);
@@ -1010,7 +999,7 @@ comsoft(void *arg)
};
if (sc == NULL || sc->sc_ibufp == sc->sc_ibuf)
- goto out;
+ return;
tp = sc->sc_tty;
@@ -1021,7 +1010,7 @@ comsoft(void *arg)
if (ibufp == ibufend) {
splx(s);
- goto out;
+ return;
}
sc->sc_ibufp = sc->sc_ibuf = (ibufp == sc->sc_ibufs[0]) ?
@@ -1031,7 +1020,7 @@ comsoft(void *arg)
if (tp == NULL || !ISSET(tp->t_state, TS_ISOPEN)) {
splx(s);
- goto out;
+ return;
}
if (ISSET(tp->t_cflag, CRTSCTS) &&
@@ -1055,13 +1044,6 @@ comsoft(void *arg)
c |= lsrmap[(*ibufp++ & (LSR_BI|LSR_FE|LSR_PE)) >> 2];
(*linesw[tp->t_line].l_rint)(c, tp);
}
-
-out:
-#ifndef __HAVE_GENERIC_SOFT_INTERRUPTS
- timeout_add(&sc->sc_comsoft_tmo, 1);
-#else
- ;
-#endif
}
#ifdef KGDB
@@ -1142,9 +1124,7 @@ comintr(void *arg)
if (ISSET(lsr, LSR_RXRDY)) {
u_char *p = sc->sc_ibufp;
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_schedule(sc->sc_si);
-#endif
do {
data = bus_space_read_1(iot, ioh, com_data);
if (ISSET(lsr, LSR_BI)) {
@@ -1732,14 +1712,10 @@ com_attach_subr(sc)
timeout_set(&sc->sc_diag_tmo, comdiag, sc);
timeout_set(&sc->sc_dtr_tmo, com_raisedtr, sc);
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
sc->sc_si = softintr_establish(IPL_TTY, comsoft, sc);
if (sc->sc_si == NULL)
panic("%s: can't establish soft interrupt",
sc->sc_dev.dv_xname);
-#else
- timeout_set(&sc->sc_comsoft_tmo, comsoft, sc);
-#endif
/*
* If there are no enable/disable functions, assume the device
diff --git a/sys/dev/ic/comvar.h b/sys/dev/ic/comvar.h
index b8c16b67315..afbb64ea32f 100644
--- a/sys/dev/ic/comvar.h
+++ b/sys/dev/ic/comvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: comvar.h,v 1.46 2009/10/13 19:33:16 pirofti Exp $ */
+/* $OpenBSD: comvar.h,v 1.47 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: comvar.h,v 1.5 1996/05/05 19:50:47 christos Exp $ */
/*
@@ -76,11 +76,7 @@ struct com_softc {
struct tty *sc_tty;
struct timeout sc_dtr_tmo;
struct timeout sc_diag_tmo;
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *sc_si;
-#else
- struct timeout sc_comsoft_tmo;
-#endif
int sc_overflows;
int sc_floods;
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 890ef32b821..3b2274ca27d 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.103 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: ehci.c,v 1.104 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -672,12 +672,10 @@ ehci_softintr(void *v)
timeout_add_sec(&sc->sc_tmo_intrlist, 1);
}
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
if (sc->sc_softwake) {
sc->sc_softwake = 0;
wakeup(&sc->sc_softwake);
}
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
sc->sc_bus.intr_context--;
}
@@ -2795,13 +2793,9 @@ ehci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
* has run.
*/
s = splusb();
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
sc->sc_softwake = 1;
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
usb_schedsoftintr(&sc->sc_bus);
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
tsleep(&sc->sc_softwake, PZERO, "ehciab", 0);
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
/*
* Step 5: Remove any vestiges of the xfer from the hardware.
@@ -2957,13 +2951,9 @@ ehci_abort_isoc_xfer(usbd_xfer_handle xfer, usbd_status status)
splx(s);
s = splusb();
-#ifdef USB_USE_SOFTINTR
sc->sc_softwake = 1;
-#endif /* USB_USE_SOFTINTR */
usb_schedsoftintr(&sc->sc_bus);
-#ifdef USB_USE_SOFTINTR
tsleep(&sc->sc_softwake, PZERO, "ehciab", 0);
-#endif /* USB_USE_SOFTINTR */
splx(s);
#ifdef DIAGNOSTIC
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index e402cf7c9fa..5a58262dcc1 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.92 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: ohci.c,v 1.93 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -1470,12 +1470,10 @@ ohci_softintr(void *v)
}
}
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
if (sc->sc_softwake) {
sc->sc_softwake = 0;
wakeup(&sc->sc_softwake);
}
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
sc->sc_bus.intr_context--;
DPRINTFN(10,("ohci_softintr: done:\n"));
@@ -2213,13 +2211,9 @@ ohci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
*/
usb_delay_ms(opipe->pipe.device->bus, 20); /* Hardware finishes in 1ms */
s = splusb();
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
sc->sc_softwake = 1;
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
usb_schedsoftintr(&sc->sc_bus);
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
tsleep(&sc->sc_softwake, PZERO, "ohciab", 0);
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
splx(s);
/*
diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h
index f17fdf820fe..27b2a6fb596 100644
--- a/sys/dev/usb/ohcivar.h
+++ b/sys/dev/usb/ohcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohcivar.h,v 1.27 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: ohcivar.h,v 1.28 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: ohcivar.h,v 1.32 2003/02/22 05:24:17 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.13 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -100,9 +100,7 @@ typedef struct ohci_softc {
u_int8_t sc_addr; /* device address */
u_int8_t sc_conf; /* device configuration */
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
char sc_softwake;
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
ohci_soft_ed_t *sc_freeeds;
ohci_soft_td_t *sc_freetds;
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 8afa70119bf..58c24368ad3 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.72 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: uhci.c,v 1.73 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -1251,12 +1251,10 @@ uhci_softintr(void *v)
uhci_check_intr(sc, ii);
}
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
if (sc->sc_softwake) {
sc->sc_softwake = 0;
wakeup(&sc->sc_softwake);
}
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
sc->sc_bus.intr_context--;
}
@@ -1923,14 +1921,10 @@ uhci_abort_xfer(usbd_xfer_handle xfer, usbd_status status)
*/
usb_delay_ms(upipe->pipe.device->bus, 2); /* Hardware finishes in 1ms */
s = splusb();
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
sc->sc_softwake = 1;
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
usb_schedsoftintr(&sc->sc_bus);
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
DPRINTFN(1,("uhci_abort_xfer: tsleep\n"));
tsleep(&sc->sc_softwake, PZERO, "uhciab", 0);
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
splx(s);
/*
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index 86d29d34ce4..c7ea2d0059d 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhcivar.h,v 1.21 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uhcivar.h,v 1.22 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: uhcivar.h,v 1.36 2002/12/31 00:39:11 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhcivar.h,v 1.14 1999/11/17 22:33:42 n_hibma Exp $ */
@@ -155,9 +155,7 @@ typedef struct uhci_softc {
u_int8_t sc_saved_sof;
u_int16_t sc_saved_frnum;
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
char sc_softwake;
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
char sc_isreset;
char sc_suspend;
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 222aa200cd5..63b17a494f4 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.60 2009/10/31 06:40:17 deraadt Exp $ */
+/* $OpenBSD: usb.c,v 1.61 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -192,7 +192,6 @@ usb_attach(struct device *parent, struct device *self, void *aux)
ue.u.ue_ctrlr.ue_bus = sc->sc_dev.dv_unit;
usb_add_event(USB_EVENT_CTRLR_ATTACH, &ue);
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
/* XXX we should have our own level */
sc->sc_bus->soft = softintr_establish(IPL_SOFTNET,
sc->sc_bus->methods->soft_intr, sc->sc_bus);
@@ -201,7 +200,6 @@ usb_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dying = 1;
return;
}
-#endif
err = usbd_new_device(&sc->sc_dev, sc->sc_bus, 0, speed, 0,
&sc->sc_port);
@@ -780,15 +778,12 @@ void
usb_schedsoftintr(usbd_bus_handle bus)
{
DPRINTFN(10,("usb_schedsoftintr: polling=%d\n", bus->use_polling));
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
+
if (bus->use_polling) {
bus->methods->soft_intr(bus);
} else {
softintr_schedule(bus->soft);
}
-#else
- bus->methods->soft_intr(bus);
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
}
int
@@ -839,12 +834,10 @@ usb_detach(struct device *self, int flags)
usbd_finish();
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
if (sc->sc_bus->soft != NULL) {
softintr_disestablish(sc->sc_bus->soft);
sc->sc_bus->soft = NULL;
}
-#endif
ue.u.ue_ctrlr.ue_bus = sc->sc_dev.dv_unit;
usb_add_event(USB_EVENT_CTRLR_DETACH, &ue);
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index c57dfe5e0b5..a18fb4623a4 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_port.h,v 1.98 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: usb_port.h,v 1.99 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: usb_port.h,v 1.62 2003/02/15 18:33:30 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -40,12 +40,6 @@
* NetBSD or FreeBSD.
*/
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
-#define USB_USE_SOFTINTR
-#else
-#undef USB_USE_SOFTINTR
-#endif
-
#define Static
#define UMASS_ATAPISTR "atapiscsi"
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 1fcc956c560..3b6010250d8 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.h,v 1.32 2009/09/23 19:59:08 miod Exp $ */
+/* $OpenBSD: usbdi.h,v 1.33 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -240,20 +240,11 @@ struct usb_attach_arg {
#define UMATCH_NONE 0
/* XXX Perhaps USB should have its own levels? */
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
#define splusb splsoftnet
#if 0
#define SPLUSBCHECK splsoftassert(IPL_SOFTNET)
#else
#define SPLUSBCHECK do { /* nothing */ } while (0)
#endif
-#else
-#define splusb splbio
-#if 0
-#define SPLUSBCHECK splassert(IPL_BIO)
-#else
-#define SPLUSBCHECK do { /* nothing */ } while (0)
-#endif
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
#define splhardusb splbio
#define IPL_USB IPL_BIO
diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h
index 9d44ae0191a..5addcde90e1 100644
--- a/sys/dev/usb/usbdivar.h
+++ b/sys/dev/usb/usbdivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdivar.h,v 1.35 2009/08/30 19:15:40 miod Exp $ */
+/* $OpenBSD: usbdivar.h,v 1.36 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: usbdivar.h,v 1.70 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
@@ -116,10 +116,7 @@ struct usbd_bus {
#define USBREV_1_1 3
#define USBREV_2_0 4
#define USBREV_STR { "unknown", "pre 1.0", "1.0", "1.1", "2.0" }
-
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *soft; /* soft interrupt cookie */
-#endif
bus_dma_tag_t dmatag; /* DMA tag */
};
diff --git a/sys/dev/usb/usbf_subr.c b/sys/dev/usb/usbf_subr.c
index 61ee9013d87..4a0b29ed476 100644
--- a/sys/dev/usb/usbf_subr.c
+++ b/sys/dev/usb/usbf_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbf_subr.c,v 1.14 2008/12/01 16:58:48 deraadt Exp $ */
+/* $OpenBSD: usbf_subr.c,v 1.15 2009/11/04 19:14:10 kettenis Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -1066,23 +1066,19 @@ usbf_transfer_complete(usbf_xfer_handle xfer)
usbf_status
usbf_softintr_establish(struct usbf_bus *bus)
{
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
KASSERT(bus->soft == NULL);
+
/* XXX we should have our own level */
bus->soft = softintr_establish(IPL_SOFTNET,
bus->methods->soft_intr, bus);
if (bus->soft == NULL)
return USBF_INVAL;
-#endif
+
return USBF_NORMAL_COMPLETION;
}
void
usbf_schedsoftintr(struct usbf_bus *bus)
{
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_schedule(bus->soft);
-#else
- bus->methods->soft_intr(bus);
-#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
}
diff --git a/sys/dev/usb/usbfvar.h b/sys/dev/usb/usbfvar.h
index e8dfe5cb18c..f742181a2a9 100644
--- a/sys/dev/usb/usbfvar.h
+++ b/sys/dev/usb/usbfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbfvar.h,v 1.6 2007/06/15 11:41:48 mbalmer Exp $ */
+/* $OpenBSD: usbfvar.h,v 1.7 2009/11/04 19:14:10 kettenis Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -101,9 +101,7 @@ struct usbf_bus {
/* Filled by usbf driver */
struct usbf_softc *usbfctl;
int intr_context;
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *soft; /* soft interrupt cookie */
-#endif
bus_dma_tag_t dmatag; /* DMA tag */
};
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 7e8f0dd3b9c..48ee37f7de1 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.68 2009/01/21 21:02:39 miod Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.69 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -120,20 +120,7 @@ volatile struct timeval time
volatile struct timeval mono_time;
#endif
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *softclock_si;
-void generic_softclock(void *);
-
-void
-generic_softclock(void *ignore)
-{
- /*
- * XXX - don't commit, just a dummy wrapper until we learn everyone
- * deal with a changed proto for softclock().
- */
- softclock();
-}
-#endif
/*
* Initialize clock frequencies and start both clocks running.
@@ -146,11 +133,9 @@ initclocks(void)
extern void inittimecounter(void);
#endif
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
- softclock_si = softintr_establish(IPL_SOFTCLOCK, generic_softclock, NULL);
+ softclock_si = softintr_establish(IPL_SOFTCLOCK, softclock, NULL);
if (softclock_si == NULL)
panic("initclocks: unable to register softclock intr");
-#endif
/*
* Set divisors to 1 (normal case) and let the machine-specific
@@ -323,13 +308,8 @@ hardclock(struct clockframe *frame)
* Process callouts at a very low cpu priority, so we don't keep the
* relatively high clock interrupt priority any longer than necessary.
*/
- if (timeout_hardclock_update()) {
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
+ if (timeout_hardclock_update())
softintr_schedule(softclock_si);
-#else
- setsoftclock();
-#endif
- }
}
/*
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index b6967c58926..29d7d4344ba 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.105 2009/06/06 21:25:19 deraadt Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.106 2009/11/04 19:14:10 kettenis Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -1203,9 +1203,8 @@ keep:
void
proc_stop(struct proc *p, int sw)
{
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
extern void *softclock_si;
-#endif
+
#ifdef MULTIPROCESSOR
SCHED_ASSERT_LOCKED();
#endif
@@ -1219,11 +1218,7 @@ proc_stop(struct proc *p, int sw)
* We need this soft interrupt to be handled fast.
* Extra calls to softclock don't hurt.
*/
-#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
softintr_schedule(softclock_si);
-#else
- setsoftclock();
-#endif
}
if (sw)
mi_switch();
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index be87d0fc789..90b3f08e1ed 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.31 2009/06/02 22:05:54 guenther Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.32 2009/11/04 19:14:10 kettenis Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
@@ -304,11 +304,10 @@ timeout_hardclock_update(void)
}
void
-softclock(void)
+softclock(void *arg)
{
struct timeout *to;
void (*fn)(void *);
- void *arg;
mtx_enter(&timeout_mutex);
while (!CIRCQ_EMPTY(&timeout_todo)) {
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 672d9e16ba5..99aba71ac56 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: systm.h,v 1.76 2009/04/19 17:53:39 deraadt Exp $ */
+/* $OpenBSD: systm.h,v 1.77 2009/11/04 19:14:09 kettenis Exp $ */
/* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */
/*-
@@ -215,7 +215,7 @@ void realitexpire(void *);
struct clockframe;
void hardclock(struct clockframe *);
-void softclock(void);
+void softclock(void *);
void statclock(struct clockframe *);
void initclocks(void);