Module Name: src
Committed By: phx
Date: Tue May 19 18:39:27 UTC 2009
Modified Files:
src/sys/arch/amiga/amiga: autoconf.c isr.h machdep.c trap.c
src/sys/arch/amiga/dev: drsc.c if_ed.c if_es.c if_le.c if_qn.c
isic_supio.c ite.c mfc.c mgnsc.c siopvar.h zssc.c
src/sys/arch/amiga/include: Makefile cpu.h intr.h
Log Message:
Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/amiga/amiga/autoconf.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amiga/amiga/isr.h
cvs rdiff -u -r1.219 -r1.220 src/sys/arch/amiga/amiga/machdep.c
cvs rdiff -u -r1.125 -r1.126 src/sys/arch/amiga/amiga/trap.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amiga/dev/drsc.c
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/amiga/dev/if_ed.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/amiga/dev/if_es.c
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amiga/dev/if_le.c \
src/sys/arch/amiga/dev/mgnsc.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/dev/if_qn.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amiga/dev/isic_supio.c
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/amiga/dev/ite.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/amiga/dev/mfc.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amiga/dev/siopvar.h
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/amiga/dev/zssc.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amiga/include/Makefile
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/amiga/include/cpu.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amiga/include/intr.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amiga/amiga/autoconf.c
diff -u src/sys/arch/amiga/amiga/autoconf.c:1.103 src/sys/arch/amiga/amiga/autoconf.c:1.104
--- src/sys/arch/amiga/amiga/autoconf.c:1.103 Wed Mar 18 15:14:29 2009
+++ src/sys/arch/amiga/amiga/autoconf.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.103 2009/03/18 15:14:29 cegger Exp $ */
+/* $NetBSD: autoconf.c,v 1.104 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.103 2009/03/18 15:14:29 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.104 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,6 +46,9 @@
#include <amiga/amiga/cfdev.h>
#include <amiga/amiga/device.h>
#include <amiga/amiga/custom.h>
+#ifdef DRACO
+#include <amiga/amiga/drcustom.h>
+#endif
static void findroot(void);
void mbattach(struct device *, struct device *, void *);
Index: src/sys/arch/amiga/amiga/isr.h
diff -u src/sys/arch/amiga/amiga/isr.h:1.12 src/sys/arch/amiga/amiga/isr.h:1.13
--- src/sys/arch/amiga/amiga/isr.h:1.12 Sun Dec 11 12:16:26 2005
+++ src/sys/arch/amiga/amiga/isr.h Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: isr.h,v 1.12 2005/12/11 12:16:26 christos Exp $ */
+/* $NetBSD: isr.h,v 1.13 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1982 Regents of the University of California.
@@ -48,10 +48,6 @@
#ifdef _KERNEL
void add_isr(struct isr *);
void remove_isr(struct isr *);
-typedef void (*sifunc_t)(void *, void *);
-void alloc_sicallback(void);
-void add_sicallback(sifunc_t, void *, void *);
-void rem_sicallback(sifunc_t);
#endif
#endif /* _AMIGA_ISR_H_ */
Index: src/sys/arch/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.219 src/sys/arch/amiga/amiga/machdep.c:1.220
--- src/sys/arch/amiga/amiga/machdep.c:1.219 Wed Mar 18 16:00:09 2009
+++ src/sys/arch/amiga/amiga/machdep.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.219 2009/03/18 16:00:09 cegger Exp $ */
+/* $NetBSD: machdep.c,v 1.220 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -86,7 +86,7 @@
#include "opt_panicbutton.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.219 2009/03/18 16:00:09 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.220 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -154,7 +154,6 @@
void dumpsys(void);
void initcpu(void);
void straytrap(int, u_short);
-static void call_sicallbacks(void);
void intrhand(int);
#if NSER > 0
void ser_outintr(void);
@@ -174,12 +173,7 @@
int machineid;
int maxmem; /* max memory per process */
int physmem = MAXMEM; /* max supported memory, changes to actual */
-/*
- * extender "register" for software interrupts. Moved here
- * from locore.s, since softints are no longer dealt with
- * in locore.s.
- */
-unsigned char ssir;
+
/*
* safepri is a safe priority for sleep to set for a spin-wait
* during autoconfiguration or after a panic.
@@ -928,161 +922,6 @@
return(0);
}
-/*
- * this is a handy package to have asynchronously executed
- * function calls executed at very low interrupt priority.
- * Example for use is keyboard repeat, where the repeat
- * handler running at splclock() triggers such a (hardware
- * aided) software interrupt.
- * Note: the installed functions are currently called in a
- * LIFO fashion, might want to change this to FIFO
- * later.
- */
-struct si_callback {
- struct si_callback *next;
- void (*function)(void *rock1, void *rock2);
- void *rock1, *rock2;
-};
-
-struct softintr {
- int pending;
- void (*function)(void *);
- void *arg;
-};
-
-static struct si_callback *si_callbacks;
-static struct si_callback *si_free;
-#ifdef DIAGNOSTIC
-static int ncb; /* number of callback blocks allocated */
-static int ncbd; /* number of callback blocks dynamically allocated */
-#endif
-
-void
-alloc_sicallback(void)
-{
- struct si_callback *si;
- int s;
-
- si = (struct si_callback *)malloc(sizeof(*si), M_TEMP, M_NOWAIT);
- if (si == NULL)
- return;
- s = splhigh();
- si->next = si_free;
- si_free = si;
- splx(s);
-#ifdef DIAGNOSTIC
- ++ncb;
-#endif
-}
-
-void
-add_sicallback (void (*function)(void *rock1, void *rock2), void *rock1, void *rock2)
-{
- struct si_callback *si;
- int s;
-
- /*
- * this function may be called from high-priority interrupt handlers.
- * We may NOT block for memory-allocation in here!.
- */
- s = splhigh();
- si = si_free;
- if (si != NULL)
- si_free = si->next;
- splx(s);
-
- if (si == NULL) {
- si = (struct si_callback *)malloc(sizeof(*si), M_TEMP, M_NOWAIT);
-#ifdef DIAGNOSTIC
- if (si)
- ++ncbd; /* count # dynamically allocated */
-#endif
-
- if (!si)
- return;
- }
-
- si->function = function;
- si->rock1 = rock1;
- si->rock2 = rock2;
-
- s = splhigh();
- si->next = si_callbacks;
- si_callbacks = si;
- splx(s);
-
- /*
- * Cause a software interrupt (spl1). This interrupt might
- * happen immediately, or after returning to a safe enough level.
- */
- setsoftcback();
-}
-
-
-void
-rem_sicallback(void (*function)(void *rock1, void *rock2))
-{
- struct si_callback *si, *psi, *nsi;
- int s;
-
- s = splhigh();
- for (psi = 0, si = si_callbacks; si; ) {
- nsi = si->next;
-
- if (si->function != function)
- psi = si;
- else {
-/* free(si, M_TEMP); */
- si->next = si_free;
- si_free = si;
- if (psi)
- psi->next = nsi;
- else
- si_callbacks = nsi;
- }
- si = nsi;
- }
- splx(s);
-}
-
-/* purge the list */
-static void
-call_sicallbacks(void)
-{
- struct si_callback *si;
- int s;
- void *rock1, *rock2;
- void (*function)(void *, void *);
-
- do {
- s = splhigh ();
- if ((si = si_callbacks) != 0)
- si_callbacks = si->next;
- splx(s);
-
- if (si) {
- function = si->function;
- rock1 = si->rock1;
- rock2 = si->rock2;
-/* si->function(si->rock1, si->rock2); */
-/* free(si, M_TEMP); */
- s = splhigh ();
- si->next = si_free;
- si_free = si;
- splx(s);
- function (rock1, rock2);
- }
- } while (si);
-#ifdef DIAGNOSTIC
- if (ncbd) {
- ncb += ncbd;
- printf("call_sicallback: %d more dynamic structures %d total\n",
- ncbd, ncb);
- ncbd = 0;
- }
-#endif
-}
-
struct isr *isr_ports;
#ifdef DRACO
struct isr *isr_slot3;
@@ -1251,30 +1090,11 @@
custom.intreq = INTF_DSKBLK;
}
if (ireq & INTF_SOFTINT) {
- unsigned char ssir_active;
- int s;
-
- /*
- * first clear the softint-bit
- * then process all classes of softints.
- * this order is dicated by the nature of
- * software interrupts. The other order
- * allows software interrupts to be missed.
- * Also copy and clear ssir to prevent
- * interrupt loss.
- */
- clrsoftint();
- s = splhigh();
- ssir_active = ssir;
- siroff(SIR_NET | SIR_CBACK);
- splx(s);
- if (ssir_active & SIR_CBACK) {
-#ifdef REALLYDEBUG
- printf("calling softcallbacks\n");
+ /* sicallback handling removed */
+#ifdef DEBUG
+ printf("intrhand: SOFTINT ignored\n");
#endif
- uvmexp.softs++;
- call_sicallbacks();
- }
+ custom.intreq = INTF_SOFTINT;
}
break;
Index: src/sys/arch/amiga/amiga/trap.c
diff -u src/sys/arch/amiga/amiga/trap.c:1.125 src/sys/arch/amiga/amiga/trap.c:1.126
--- src/sys/arch/amiga/amiga/trap.c:1.125 Wed Mar 18 10:22:23 2009
+++ src/sys/arch/amiga/amiga/trap.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.125 2009/03/18 10:22:23 cegger Exp $ */
+/* $NetBSD: trap.c,v 1.126 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
#include "opt_fpu_emulate.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.125 2009/03/18 10:22:23 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.126 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -106,7 +106,6 @@
#include <machine/trap.h>
#include <machine/cpu.h>
#include <machine/reg.h>
-#include <machine/mtpr.h>
#include <machine/pte.h>
#include <m68k/fpe/fpu_emulate.h>
Index: src/sys/arch/amiga/dev/drsc.c
diff -u src/sys/arch/amiga/dev/drsc.c:1.29 src/sys/arch/amiga/dev/drsc.c:1.30
--- src/sys/arch/amiga/dev/drsc.c:1.29 Fri Jun 13 08:13:37 2008
+++ src/sys/arch/amiga/dev/drsc.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: drsc.c,v 1.29 2008/06/13 08:13:37 cegger Exp $ */
+/* $NetBSD: drsc.c,v 1.30 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1996 Ignatios Souvatzis
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drsc.c,v 1.29 2008/06/13 08:13:37 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drsc.c,v 1.30 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,6 +78,7 @@
#include <amiga/dev/siopreg.h>
#include <amiga/dev/siopvar.h>
#include <amiga/amiga/drcustom.h>
+#include <m68k/include/asm_single.h>
#include <machine/cpu.h> /* is_xxx(), */
@@ -133,7 +134,8 @@
sc->sc_clock_freq = 50; /* Clock = 50MHz */
sc->sc_ctest7 = 0x02;
- alloc_sicallback();
+ sc->sc_siop_si = softint_establish(SOFTINT_BIO,
+ (void (*)(void *))siopintr, sc);
/*
* Fill in the scsipi_adapter.
@@ -178,9 +180,9 @@
/*
* Level 4 interrupt processing for the MacroSystem DraCo mainboard
* SCSI. Because the level 4 interrupt is above splbio, the
- * interrupt status is saved and an sicallback to the level 2 interrupt
- * handler scheduled. This way, the actual processing of the interrupt
- * can be deferred until splbio is unblocked.
+ * interrupt status is saved and a softint scheduled. This way,
+ * the actual processing of the interrupt can be deferred until
+ * splbio is unblocked.
*/
void
@@ -224,7 +226,7 @@
printf("%s: intpen still 0x%x\n", sc->sc_dev.dv_xname,
*draco_intpen);
#endif
- add_sicallback((sifunc_t)siopintr, sc, NULL);
+ softint_schedule(sc->sc_siop_si);
#endif
return;
}
Index: src/sys/arch/amiga/dev/if_ed.c
diff -u src/sys/arch/amiga/dev/if_ed.c:1.58 src/sys/arch/amiga/dev/if_ed.c:1.59
--- src/sys/arch/amiga/dev/if_ed.c:1.58 Wed Mar 18 17:06:42 2009
+++ src/sys/arch/amiga/dev/if_ed.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ed.c,v 1.58 2009/03/18 17:06:42 cegger Exp $ */
+/* $NetBSD: if_ed.c,v 1.59 2009/05/19 18:39:26 phx Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -19,7 +19,7 @@
#include "opt_ns.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ed.c,v 1.58 2009/03/18 17:06:42 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ed.c,v 1.59 2009/05/19 18:39:26 phx Exp $");
#include "bpfilter.h"
@@ -56,7 +56,6 @@
#endif
#include <machine/cpu.h>
-#include <machine/mtpr.h>
#include <amiga/amiga/device.h>
#include <amiga/amiga/isr.h>
Index: src/sys/arch/amiga/dev/if_es.c
diff -u src/sys/arch/amiga/dev/if_es.c:1.45 src/sys/arch/amiga/dev/if_es.c:1.46
--- src/sys/arch/amiga/dev/if_es.c:1.45 Thu Mar 19 23:09:13 2009
+++ src/sys/arch/amiga/dev/if_es.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_es.c,v 1.45 2009/03/19 23:09:13 he Exp $ */
+/* $NetBSD: if_es.c,v 1.46 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1995 Michael L. Hitch
@@ -38,7 +38,7 @@
#include "opt_ns.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.45 2009/03/19 23:09:13 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.46 2009/05/19 18:39:26 phx Exp $");
#include "bpfilter.h"
@@ -72,7 +72,6 @@
#endif
#include <machine/cpu.h>
-#include <machine/mtpr.h>
#include <amiga/amiga/device.h>
#include <amiga/amiga/isr.h>
#include <amiga/dev/zbusvar.h>
Index: src/sys/arch/amiga/dev/if_le.c
diff -u src/sys/arch/amiga/dev/if_le.c:1.43 src/sys/arch/amiga/dev/if_le.c:1.44
--- src/sys/arch/amiga/dev/if_le.c:1.43 Mon Apr 28 20:23:12 2008
+++ src/sys/arch/amiga/dev/if_le.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le.c,v 1.43 2008/04/28 20:23:12 martin Exp $ */
+/* $NetBSD: if_le.c,v 1.44 2009/05/19 18:39:26 phx Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
#include "opt_inet.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.43 2008/04/28 20:23:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.44 2009/05/19 18:39:26 phx Exp $");
#include "bpfilter.h"
@@ -95,7 +95,6 @@
#endif
#include <machine/cpu.h>
-#include <machine/mtpr.h>
#include <amiga/amiga/device.h>
#include <amiga/amiga/isr.h>
Index: src/sys/arch/amiga/dev/mgnsc.c
diff -u src/sys/arch/amiga/dev/mgnsc.c:1.43 src/sys/arch/amiga/dev/mgnsc.c:1.44
--- src/sys/arch/amiga/dev/mgnsc.c:1.43 Fri Jun 13 08:13:37 2008
+++ src/sys/arch/amiga/dev/mgnsc.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mgnsc.c,v 1.43 2008/06/13 08:13:37 cegger Exp $ */
+/* $NetBSD: mgnsc.c,v 1.44 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mgnsc.c,v 1.43 2008/06/13 08:13:37 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mgnsc.c,v 1.44 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -127,7 +127,8 @@
sc->sc_ctest7 = SIOP_CTEST7_TT1;
sc->sc_dcntl = 0x00;
- alloc_sicallback();
+ sc->sc_siop_si = softint_establish(SOFTINT_BIO,
+ (void (*)(void *))siopintr, sc);
/*
* Fill in the scsipi_adapter.
@@ -167,9 +168,8 @@
/*
* Level 6 interrupt processing for the Magnum/40 SCSI. Because the
* level 6 interrupt is above splbio, the interrupt status is saved
- * and an sicallback to the level 2 interrupt handler scheduled.
- * This way, the actual processing of the interrupt can be deferred
- * until splbio is unblocked.
+ * and a softint scheduled. This way, the actual processing of the
+ * interrupt can be deferred until splbio is unblocked.
*/
int
@@ -199,7 +199,7 @@
rp->siop_sien = 0;
rp->siop_dien = 0;
sc->sc_flags |= SIOP_INTDEFER | SIOP_INTSOFF;
- add_sicallback((sifunc_t)siopintr, sc, NULL);
+ softint_schedule(sc->sc_siop_si);
return (1);
}
Index: src/sys/arch/amiga/dev/if_qn.c
diff -u src/sys/arch/amiga/dev/if_qn.c:1.33 src/sys/arch/amiga/dev/if_qn.c:1.34
--- src/sys/arch/amiga/dev/if_qn.c:1.33 Wed Mar 18 17:06:42 2009
+++ src/sys/arch/amiga/dev/if_qn.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_qn.c,v 1.33 2009/03/18 17:06:42 cegger Exp $ */
+/* $NetBSD: if_qn.c,v 1.34 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1995 Mika Kortelainen
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.33 2009/03/18 17:06:42 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.34 2009/05/19 18:39:26 phx Exp $");
#include "qn.h"
#if NQN > 0
@@ -114,7 +114,6 @@
#endif
#include <machine/cpu.h>
-#include <machine/mtpr.h>
#include <amiga/amiga/device.h>
#include <amiga/amiga/isr.h>
#include <amiga/dev/zbusvar.h>
Index: src/sys/arch/amiga/dev/isic_supio.c
diff -u src/sys/arch/amiga/dev/isic_supio.c:1.16 src/sys/arch/amiga/dev/isic_supio.c:1.17
--- src/sys/arch/amiga/dev/isic_supio.c:1.16 Sun Dec 11 12:16:28 2005
+++ src/sys/arch/amiga/dev/isic_supio.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: isic_supio.c,v 1.16 2005/12/11 12:16:28 christos Exp $ */
+/* $NetBSD: isic_supio.c,v 1.17 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1998,2001 Ignatios Souvatzis. All rights reserved.
@@ -47,7 +47,7 @@
*---------------------------------------------------------------------------*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_supio.c,v 1.16 2005/12/11 12:16:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_supio.c,v 1.17 2009/05/19 18:39:26 phx Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -191,16 +191,6 @@
add_isr(&ssc->sc_isr);
}
-#if 0
-int
-isic_supiointr(void *p)
-{
- /* XXX should test whether it is our interrupt at all */
- add_sicallback((sifunc_t)isicintr, p, NULL);
- return 1;
-}
-#endif
-
/*static*/ void
aster_read_fifo(struct isic_softc *sc, int what, void *buf, size_t size)
{
Index: src/sys/arch/amiga/dev/ite.c
diff -u src/sys/arch/amiga/dev/ite.c:1.87 src/sys/arch/amiga/dev/ite.c:1.88
--- src/sys/arch/amiga/dev/ite.c:1.87 Wed Mar 18 17:06:42 2009
+++ src/sys/arch/amiga/dev/ite.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ite.c,v 1.87 2009/03/18 17:06:42 cegger Exp $ */
+/* $NetBSD: ite.c,v 1.88 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.87 2009/03/18 17:06:42 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.88 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -248,7 +248,6 @@
ip->grf = gp;
splx(s);
- alloc_sicallback();
iteinit(gp->g_itedev);
printf(": rows %d cols %d", ip->rows, ip->cols);
printf(" repeat at (%d/100)s next at (%d/100)s",
@@ -878,14 +877,6 @@
/* have to make sure we're at spltty in here */
s = spltty();
- /*
- * keyboard interrupts come at priority 2, while softint
- * generated keyboard-repeat interrupts come at level 1. So,
- * to not allow a key-up event to get thru before a repeat for
- * the key-down, we remove any outstanding callout requests..
- rem_sicallback(ite_sifilter);
- */
-
up = c & 0x80 ? 1 : 0;
c &= 0x7f;
code = 0;
Index: src/sys/arch/amiga/dev/mfc.c
diff -u src/sys/arch/amiga/dev/mfc.c:1.51 src/sys/arch/amiga/dev/mfc.c:1.52
--- src/sys/arch/amiga/dev/mfc.c:1.51 Wed Mar 18 17:06:42 2009
+++ src/sys/arch/amiga/dev/mfc.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mfc.c,v 1.51 2009/03/18 17:06:42 cegger Exp $ */
+/* $NetBSD: mfc.c,v 1.52 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -55,7 +55,7 @@
#include "opt_kgdb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.51 2009/03/18 17:06:42 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfc.c,v 1.52 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -185,7 +185,8 @@
u_short inbuf[SERIBUF_SIZE];
char *ptr, *end;
char outbuf[SEROBUF_SIZE];
- struct vbl_node vbl_node;
+ struct vbl_node vbl_node;
+ void *mfcs_si;
};
#endif
@@ -214,6 +215,7 @@
void mfcsxintr(int);
void mfcseint(int, int);
void mfcsmint(register int);
+void mfcs_intr_soft(void *);
#endif
#if NMFCP > 0
@@ -441,11 +443,8 @@
scc = device_private(pdp);
ma = auxp;
- if (dp) {
- printf (": input fifo %d output fifo %d\n", SERIBUF_SIZE,
- SEROBUF_SIZE);
- alloc_sicallback();
- }
+ printf (": input fifo %d output fifo %d\n", SERIBUF_SIZE,
+ SEROBUF_SIZE);
unit = ma->unit;
mfcs_active |= 1 << unit;
@@ -454,6 +453,7 @@
sc->sc_regs = rp = scc->sc_regs;
sc->sc_duart = (struct duart_regs *) ((unit & 1) ?
__UNVOLATILE(&rp->du_mr1b) : __UNVOLATILE(&rp->du_mr1a));
+ sc->mfcs_si = softint_establish(SOFTINT_SERIAL, mfcs_intr_soft, sc);
/*
* should have only one vbl routine to handle all ports?
*/
@@ -1001,10 +1001,7 @@
tp->t_state &= ~(TS_BUSY | TS_FLUSH);
scc->imask &= ~0x01;
regs->du_imr = scc->imask;
- add_sicallback (tp->t_linesw ?
- (sifunc_t)tp->t_linesw->l_start
- : (sifunc_t)mfcsstart, tp, NULL);
-
+ softint_schedule(sc->mfcs_si);
}
else
regs->du_tba = *sc->ptr++;
@@ -1016,9 +1013,7 @@
tp->t_state &= ~(TS_BUSY | TS_FLUSH);
scc->imask &= ~0x10;
regs->du_imr = scc->imask;
- add_sicallback (tp->t_linesw ?
- (sifunc_t)tp->t_linesw->l_start
- : (sifunc_t)mfcsstart, tp, NULL);
+ softint_schedule(sc->mfcs_si);
}
else
regs->du_tbb = *sc->ptr++;
@@ -1159,3 +1154,15 @@
}
}
}
+
+void
+mfcs_intr_soft(void *arg)
+{
+ struct mfcs_softc *sc = (struct mfcs_softc *)arg;
+ struct tty *tp = sc->sc_tty;
+
+ if (tp->t_linesw)
+ tp->t_linesw->l_start(tp);
+ else
+ mfcsstart(tp);
+}
Index: src/sys/arch/amiga/dev/siopvar.h
diff -u src/sys/arch/amiga/dev/siopvar.h:1.25 src/sys/arch/amiga/dev/siopvar.h:1.26
--- src/sys/arch/amiga/dev/siopvar.h:1.25 Sun Dec 11 12:16:28 2005
+++ src/sys/arch/amiga/dev/siopvar.h Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: siopvar.h,v 1.25 2005/12/11 12:16:28 christos Exp $ */
+/* $NetBSD: siopvar.h,v 1.26 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -118,6 +118,7 @@
struct siop_softc {
struct device sc_dev;
struct isr sc_isr;
+ void *sc_siop_si;
u_char sc_istat;
u_char sc_dstat;
Index: src/sys/arch/amiga/dev/zssc.c
diff -u src/sys/arch/amiga/dev/zssc.c:1.41 src/sys/arch/amiga/dev/zssc.c:1.42
--- src/sys/arch/amiga/dev/zssc.c:1.41 Fri Jun 13 08:13:37 2008
+++ src/sys/arch/amiga/dev/zssc.c Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: zssc.c,v 1.41 2008/06/13 08:13:37 cegger Exp $ */
+/* $NetBSD: zssc.c,v 1.42 2009/05/19 18:39:26 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zssc.c,v 1.41 2008/06/13 08:13:37 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zssc.c,v 1.42 2009/05/19 18:39:26 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,7 +123,8 @@
sc->sc_ctest7 = 0x00;
sc->sc_dcntl = 0x00;
- alloc_sicallback();
+ sc->sc_siop_si = softint_establish(SOFTINT_BIO,
+ (void (*)(void *))siopintr, sc);
sc->sc_adapter.adapt_dev = &sc->sc_dev;
sc->sc_adapter.adapt_nchannels = 1;
@@ -156,9 +157,9 @@
/*
* Level 6 interrupt processing for the Progressive Peripherals Inc
* Zeus SCSI. Because the level 6 interrupt is above splbio, the
- * interrupt status is saved and an sicallback to the level 2 interrupt
- * handler scheduled. This way, the actual processing of the interrupt
- * can be deferred until splbio is unblocked.
+ * interrupt status is saved and a softint scheduled. This way,
+ * the actual processing of the interrupt can be deferred until
+ * splbio is unblocked.
*/
int
@@ -188,7 +189,7 @@
rp->siop_sien = 0;
rp->siop_dien = 0;
sc->sc_flags |= SIOP_INTDEFER | SIOP_INTSOFF;
- add_sicallback((sifunc_t)siopintr, sc, NULL);
+ softint_schedule(sc->sc_siop_si);
return(1);
}
Index: src/sys/arch/amiga/include/Makefile
diff -u src/sys/arch/amiga/include/Makefile:1.23 src/sys/arch/amiga/include/Makefile:1.24
--- src/sys/arch/amiga/include/Makefile:1.23 Fri Feb 9 21:55:01 2007
+++ src/sys/arch/amiga/include/Makefile Tue May 19 18:39:26 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2007/02/09 21:55:01 ad Exp $
+# $NetBSD: Makefile,v 1.24 2009/05/19 18:39:26 phx Exp $
INCSDIR= /usr/include/amiga
@@ -13,7 +13,7 @@
intr.h \
kcore.h \
limits.h lock.h \
- math.h mcontext.h mtpr.h mutex.h \
+ math.h mcontext.h mutex.h \
param.h pcb.h pmap.h pmc.h proc.h profile.h psl.h pte.h ptrace.h \
reg.h rwlock.h \
setjmp.h signal.h stdarg.h \
Index: src/sys/arch/amiga/include/cpu.h
diff -u src/sys/arch/amiga/include/cpu.h:1.71 src/sys/arch/amiga/include/cpu.h:1.72
--- src/sys/arch/amiga/include/cpu.h:1.71 Sat Mar 14 14:45:54 2009
+++ src/sys/arch/amiga/include/cpu.h Tue May 19 18:39:27 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.71 2009/03/14 14:45:54 dsl Exp $ */
+/* $NetBSD: cpu.h,v 1.72 2009/05/19 18:39:27 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -158,9 +158,6 @@
extern int astpending; /* need trap before returning to user mode */
#define setsoftast() (astpending = 1)
-/* include support for software interrupts */
-#include <machine/mtpr.h>
-
/*
* The rest of this should probably be moved to ../amiga/amigacpu.h,
* although some of it could probably be put into generic 68k headers.
Index: src/sys/arch/amiga/include/intr.h
diff -u src/sys/arch/amiga/include/intr.h:1.20 src/sys/arch/amiga/include/intr.h:1.21
--- src/sys/arch/amiga/include/intr.h:1.20 Mon Apr 28 20:23:12 2008
+++ src/sys/arch/amiga/include/intr.h Tue May 19 18:39:27 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.20 2008/04/28 20:23:12 martin Exp $ */
+/* $NetBSD: intr.h,v 1.21 2009/05/19 18:39:27 phx Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -39,7 +39,6 @@
#define _AMIGA_INTR_H_
#include <amiga/amiga/isr.h>
-#include <amiga/include/mtpr.h>
#include <m68k/psl.h>
#define IPL_NONE 0