Removed old Amiga-specific "sicallback" software interrupts and replaced
them by MI softints. Approved by "is".
This commit is contained in:
parent
2b1b74bba4
commit
42b74af385
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.103 2009/03/18 15:14:29 cegger Exp $"
|
||||
#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 *);
|
||||
|
@ -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 @@ struct isr {
|
||||
#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_ */
|
||||
|
@ -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 @@ vm_offset_t reserve_dumppages(vm_offset_t);
|
||||
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 @@ paddr_t msgbufpa;
|
||||
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 @@ badbaddr(register void *addr)
|
||||
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 @@ intrhand(int sr)
|
||||
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;
|
||||
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.125 2009/03/18 10:22:23 cegger Exp $");
|
||||
#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>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: drsc.c,v 1.29 2008/06/13 08:13:37 cegger Exp $");
|
||||
#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 @@ drscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
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 @@ drscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
/*
|
||||
* 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 @@ drsc_handler(void)
|
||||
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;
|
||||
}
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: if_ed.c,v 1.58 2009/03/18 17:06:42 cegger Exp $");
|
||||
#endif
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/mtpr.h>
|
||||
|
||||
#include <amiga/amiga/device.h>
|
||||
#include <amiga/amiga/isr.h>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.45 2009/03/19 23:09:13 he Exp $");
|
||||
#endif
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/mtpr.h>
|
||||
#include <amiga/amiga/device.h>
|
||||
#include <amiga/amiga/isr.h>
|
||||
#include <amiga/dev/zbusvar.h>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: if_le.c,v 1.43 2008/04/28 20:23:12 martin Exp $");
|
||||
#endif
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/mtpr.h>
|
||||
|
||||
#include <amiga/amiga/device.h>
|
||||
#include <amiga/amiga/isr.h>
|
||||
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.33 2009/03/18 17:06:42 cegger Exp $");
|
||||
#endif
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/mtpr.h>
|
||||
#include <amiga/amiga/device.h>
|
||||
#include <amiga/amiga/isr.h>
|
||||
#include <amiga/dev/zbusvar.h>
|
||||
|
@ -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 @@ isic_supio_attach(struct device *parent, struct device *self, void *aux)
|
||||
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)
|
||||
{
|
||||
|
@ -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 @@ iteattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
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 @@ ite_filter(u_char c, enum caller caller)
|
||||
/* 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;
|
||||
|
@ -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 @@ struct mfcs_softc {
|
||||
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 @@ int mfcsmctl(dev_t, int, int);
|
||||
void mfcsxintr(int);
|
||||
void mfcseint(int, int);
|
||||
void mfcsmint(register int);
|
||||
void mfcs_intr_soft(void *);
|
||||
#endif
|
||||
|
||||
#if NMFCP > 0
|
||||
@ -441,11 +443,8 @@ mfcsattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
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 @@ mfcsattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
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 @@ mfcintr(void *arg)
|
||||
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 @@ mfcintr(void *arg)
|
||||
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 @@ mfcsmint(int unit)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -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 @@ mgnscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
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 @@ mgnscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
/*
|
||||
* 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 @@ mgnsc_dmaintr(void *arg)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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_tinfo {
|
||||
struct siop_softc {
|
||||
struct device sc_dev;
|
||||
struct isr sc_isr;
|
||||
void *sc_siop_si;
|
||||
|
||||
u_char sc_istat;
|
||||
u_char sc_dstat;
|
||||
|
@ -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 @@ zsscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
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 @@ zsscattach(struct device *pdp, struct device *dp, void *auxp)
|
||||
/*
|
||||
* 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 @@ zssc_dmaintr(void *arg)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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 @@ INCS= ansi.h aout_machdep.h asm.h \
|
||||
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 \
|
||||
|
@ -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 @@ struct clockframe {
|
||||
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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user