Remove dummy_splraise() - it is not needed according to Paul Kranenburg.

We may revisit this once a general interrupt queuing mechanism is
available and we can avoid calling the pcmcia cards interrupt handler at
an exsessive IPL.
This commit is contained in:
martin 2002-03-25 09:02:54 +00:00
parent d2df7381ed
commit 642b1a7163
1 changed files with 12 additions and 34 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stp4020.c,v 1.21 2002/03/20 20:39:16 eeh Exp $ */
/* $NetBSD: stp4020.c,v 1.22 2002/03/25 09:02:54 martin Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.21 2002/03/20 20:39:16 eeh Exp $");
__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.22 2002/03/25 09:02:54 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -138,7 +138,6 @@ static int stp4020_iointr __P((void *));
static int stp4020_statintr __P((void *));
static void stp4020_map_window(struct stp4020_socket *h, int win, int speed);
static void stp4020_calc_speed(int bus_speed, int ns, int *length, int *delay);
static int dummy_splraise(int ipl);
struct cfattach nell_ca = {
sizeof(struct stp4020_softc), stp4020match, stp4020attach
@ -612,40 +611,12 @@ stp4020_statintr(arg)
return (r);
}
static int
dummy_splraise(int ipl)
{
switch(ipl) {
case IPL_SOFTCLOCK:
return splsoftclock();
case IPL_BIO:
return splbio();
case IPL_NET:
return splnet();
case IPL_SOFTSERIAL:
return splserial(); /* XXX ? */
case IPL_TTY:
return spltty();
case IPL_IMP:
return splhigh(); /* XXX ? */
case IPL_AUDIO:
return splaudio();
case IPL_CLOCK:
return splclock();
case IPL_SERIAL:
return splserial();
case IPL_HIGH:
return splhigh();
}
panic("illegal pcmcia interrupt level");
}
int
stp4020_iointr(arg)
void *arg;
{
struct stp4020_softc *sc = arg;
int i, r = 0, s;
int i, r = 0;
/*
* Check each socket for pending requests.
@ -661,6 +632,7 @@ stp4020_iointr(arg)
/* we can not deny this is ours, no matter what the
card driver says. */
r = 1;
/* ack interrupt */
stp4020_wr_sockctl(h, STP4020_ISR0_IDX, v);
@ -672,9 +644,15 @@ stp4020_iointr(arg)
}
/* Call card handler, if any */
if (h->intrhandler != NULL) {
s = dummy_splraise(h->ipl);
/*
* Called without handling of it's requested
* protection level (h->ipl), since we have
* no general queuing mechanism available
* right now and we know for sure we are
* running at a higher protection level
* right now.
*/
(*h->intrhandler)(h->intrarg);
splx(s);
}
}