remove irqblock[] as no one uses it. reviewed by Ben Harris.

This commit is contained in:
yamt 2006-05-11 12:05:37 +00:00
parent 1ee9d337ea
commit ccc0bd2ab6
4 changed files with 8 additions and 152 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomd_irqhandler.c,v 1.9 2005/12/11 12:16:47 christos Exp $ */
/* $NetBSD: iomd_irqhandler.c,v 1.10 2006/05/11 12:05:37 yamt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iomd_irqhandler.c,v 1.9 2005/12/11 12:16:47 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: iomd_irqhandler.c,v 1.10 2006/05/11 12:05:37 yamt Exp $");
#include "opt_irqstats.h"
@ -65,7 +65,6 @@ u_int actual_mask;
u_int disabled_mask;
u_int spl_mask;
u_int irqmasks[IPL_LEVELS];
u_int irqblock[NIRQS];
extern u_int soft_interrupts; /* Only so we can initialise it */
@ -89,7 +88,6 @@ irq_init()
/* Clear all the IRQ handlers and the irq block masks */
for (loop = 0; loop < NIRQS; ++loop) {
irqhandlers[loop] = NULL;
irqblock[loop] = 0;
}
/* Clear the IRQ/FIQ masks in the IOMD */
@ -145,7 +143,6 @@ irq_claim(irq, handler)
irqhandler_t *handler;
{
int level;
int loop;
u_int oldirqstate;
#ifdef DIAGNOSTIC
@ -249,32 +246,6 @@ irq_claim(irq, handler)
#endif
}
/*
* We now need to update the irqblock array. This array indicates
* what other interrupts should be blocked when interrupt is asserted
* This basically emulates hardware interrupt priorities e.g. by
* blocking all other IPL_BIO interrupts with an IPL_BIO interrupt
* is asserted. For each interrupt we find the highest IPL and set
* the block mask to the interrupt mask for that level.
*/
for (loop = 0; loop < NIRQS; ++loop) {
irqhandler_t *ptr;
ptr = irqhandlers[loop];
if (ptr) {
/* There is at least 1 handler so scan the chain */
level = ptr->ih_level;
while (ptr) {
if (ptr->ih_level > level)
level = ptr->ih_level;
ptr = ptr->ih_next;
}
irqblock[loop] = ~irqmasks[level];
} else
/* No handlers for this irq so nothing to block */
irqblock[loop] = 0;
}
enable_irq(irq);
set_spl_masks();
restore_interrupts(oldirqstate);
@ -295,7 +266,6 @@ irq_release(irq, handler)
irqhandler_t *handler;
{
int level;
int loop;
irqhandler_t *irqhand;
irqhandler_t **prehand;
#ifdef IRQSTATS
@ -379,32 +349,6 @@ irq_release(irq, handler)
}
}
/*
* We now need to update the irqblock array. This array indicates
* what other interrupts should be blocked when interrupt is asserted
* This basically emulates hardware interrupt priorities e.g. by
* blocking all other IPL_BIO interrupts with an IPL_BIO interrupt
* is asserted. For each interrupt we find the highest IPL and set
* the block mask to the interrupt mask for that level.
*/
for (loop = 0; loop < NIRQS; ++loop) {
irqhandler_t *ptr;
ptr = irqhandlers[loop];
if (ptr) {
/* There is at least 1 handler so scan the chain */
level = ptr->ih_level;
while (ptr) {
if (ptr->ih_level > level)
level = ptr->ih_level;
ptr = ptr->ih_next;
}
irqblock[loop] = ~irqmasks[level];
} else
/* No handlers for this irq so nothing to block */
irqblock[loop] = 0;
}
/*
* Disable the appropriate mask bit if there are no handlers left for
* this IRQ.

View File

@ -1,4 +1,4 @@
/* $NetBSD: ofw_irqhandler.c,v 1.5 2005/12/11 12:16:51 christos Exp $ */
/* $NetBSD: ofw_irqhandler.c,v 1.6 2006/05/11 12:05:37 yamt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ofw_irqhandler.c,v 1.5 2005/12/11 12:16:51 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ofw_irqhandler.c,v 1.6 2006/05/11 12:05:37 yamt Exp $");
#include "opt_irqstats.h"
@ -64,7 +64,6 @@ u_int actual_mask;
u_int disabled_mask;
u_int spl_mask;
u_int irqmasks[IPL_LEVELS];
u_int irqblock[NIRQS];
extern u_int intrcnt[];
extern u_int soft_interrupts; /* Only so we can initialise it */
@ -90,7 +89,6 @@ irq_init()
/* Clear all the IRQ handlers and the irq block masks */
for (loop = 0; loop < NIRQS; ++loop) {
irqhandlers[loop] = NULL;
irqblock[loop] = 0;
}
/*
@ -218,33 +216,6 @@ irq_claim(irq, handler)
#endif
}
/*
* We now need to update the irqblock array. This array indicates
* what other interrupts should be blocked when interrupt is asserted
* This basically emulates hardware interrupt priorities e.g. by
* blocking all other IPL_BIO interrupts with an IPL_BIO interrupt
* is asserted. For each interrupt we find the highest IPL and set
* the block mask to the interrupt mask for that level.
*/
for (loop = 0; loop < NIRQS; ++loop) {
irqhandler_t *ptr;
ptr = irqhandlers[loop];
if (ptr) {
/* There is at least 1 handler so scan the chain */
level = ptr->ih_level;
while (ptr) {
if (ptr->ih_level > level)
level = ptr->ih_level;
ptr = ptr->ih_next;
}
irqblock[loop] = ~irqmasks[level];
} else
/* No handlers for this irq so nothing to block */
irqblock[loop] = 0;
}
enable_irq(irq);
set_spl_masks();
@ -346,32 +317,6 @@ irq_release(irq, handler)
}
}
/*
* We now need to update the irqblock array. This array indicates
* what other interrupts should be blocked when interrupt is asserted
* This basically emulates hardware interrupt priorities e.g. by
* blocking all other IPL_BIO interrupts with an IPL_BIO interrupt
* is asserted. For each interrupt we find the highest IPL and set
* the block mask to the interrupt mask for that level.
*/
for (loop = 0; loop < NIRQS; ++loop) {
irqhandler_t *ptr;
ptr = irqhandlers[loop];
if (ptr) {
/* There is at least 1 handler so scan the chain */
level = ptr->ih_level;
while (ptr) {
if (ptr->ih_level > level)
level = ptr->ih_level;
ptr = ptr->ih_next;
}
irqblock[loop] = ~irqmasks[level];
} else
/* No handlers for this irq so nothing to block */
irqblock[loop] = 0;
}
/*
* Disable the appropriate mask bit if there are no handlers left for
* this IRQ.

View File

@ -1,4 +1,4 @@
/* $NetBSD: sa11x0_irqhandler.c,v 1.8 2006/03/05 11:32:01 peter Exp $ */
/* $NetBSD: sa11x0_irqhandler.c,v 1.9 2006/05/11 12:05:37 yamt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@ -76,7 +76,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sa11x0_irqhandler.c,v 1.8 2006/03/05 11:32:01 peter Exp $");
__KERNEL_RCSID(0, "$NetBSD: sa11x0_irqhandler.c,v 1.9 2006/05/11 12:05:37 yamt Exp $");
#include "opt_irqstats.h"
@ -104,7 +104,6 @@ u_int imask[NIPL];
u_int spl_mask;
u_int irqmasks[IPL_LEVELS];
#endif
u_int irqblock[NIRQS];
extern void set_spl_masks(void);
@ -166,19 +165,6 @@ intr_calculatemasks(void)
for (level = IPL_LEVELS; level > 0; level--)
irqmasks[level - 1] |= irqmasks[level];
#endif
/*
* Calculate irqblock[], which emulates hardware interrupt levels.
*/
for (irq = 0; irq < ICU_LEN; irq++) {
int irqs = 1 << irq;
for (q = irqhandlers[irq]; q; q = q->ih_next)
#ifdef hpcarm
irqs |= ~imask[q->ih_level];
#else
irqs |= ~irqmasks[q->ih_level];
#endif
irqblock[irq] = irqs;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: isa_irqhandler.c,v 1.7 2005/12/11 12:19:02 christos Exp $ */
/* $NetBSD: isa_irqhandler.c,v 1.8 2006/05/11 12:05:37 yamt Exp $ */
/*
* Copyright 1997
@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: isa_irqhandler.c,v 1.7 2005/12/11 12:19:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: isa_irqhandler.c,v 1.8 2006/05/11 12:05:37 yamt Exp $");
#include "opt_irqstats.h"
@ -97,7 +97,6 @@ u_int actual_mask;
u_int disabled_mask;
u_int spl_mask;
u_int irqmasks[IPL_LEVELS];
u_int irqblock[NIRQS];
extern u_int soft_interrupts; /* Only so we can initialise it */
@ -125,7 +124,6 @@ irq_init()
/* Clear all the IRQ handlers and the irq block masks */
for (loop = 0; loop < NIRQS; ++loop) {
irqhandlers[loop] = NULL;
irqblock[loop] = 0;
}
/*
@ -362,23 +360,6 @@ irq_calculatemasks()
* avoid overruns, so serial > high.
*/
irqmasks[IPL_SERIAL] &= irqmasks[IPL_HIGH];
/*
* We now need to update the irqblock array. This array indicates
* what other interrupts should be blocked when interrupt is asserted
* This basically emulates hardware interrupt priorities e.g. by
* blocking all other IPL_BIO interrupts with an IPL_BIO interrupt
* is asserted. For each interrupt we find the highest IPL and set
* the block mask to the interrupt mask for that level.
*/
/* And eventually calculate the complete masks. */
for (irq = 0; irq < NIRQS; irq++) {
int irqs = 1 << irq;
for (ptr = irqhandlers[irq]; ptr; ptr = ptr->ih_next)
irqs |= ~(irqmasks[ptr->ih_level]);
irqblock[irq] = irqs;
}
}