We don't need to update HD6446X_NIMR when (dis)establishing an

interrupt as splx will update it from the recomputed mask anyway.
This commit is contained in:
uwe 2006-07-22 01:53:49 +00:00
parent 485a350c1b
commit c50fbd7f2b
1 changed files with 2 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd6446xintc.c,v 1.5 2006/07/22 01:34:55 uwe Exp $ */
/* $NetBSD: hd6446xintc.c,v 1.6 2006/07/22 01:53:49 uwe Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hd6446xintc.c,v 1.5 2006/07/22 01:34:55 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: hd6446xintc.c,v 1.6 2006/07/22 01:53:49 uwe Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -66,7 +66,6 @@ hd6446x_intr_establish(int irq, int mode, int level,
int (*func)(void *), void *arg)
{
struct hd6446x_intrhand *hh = &hd6446x_intrhand[ffs(irq) - 1];
uint16_t r;
int s;
s = splhigh();
@ -81,11 +80,6 @@ hd6446x_intr_establish(int irq, int mode, int level,
/* Update interrupt priority masks. */
hd6446x_intr_priority_update();
/* Enable interrupt */
r = _reg_read_2(HD6446X_NIMR);
r &= ~hh->hh_imask;
_reg_write_2(HD6446X_NIMR, r);
splx(s);
return (hh);
@ -95,16 +89,10 @@ void
hd6446x_intr_disestablish(void *handle)
{
struct hd6446x_intrhand *hh = handle;
uint16_t r;
int s;
s = splhigh();
/* Disable interrupt */
r = _reg_read_2(HD6446X_NIMR);
r |= hh->hh_imask;
_reg_write_2(HD6446X_NIMR, r);
/* Update interrupt priority masks */
hd6446x_ienable &= ~hh->hh_imask;
memset(hh, 0, sizeof(*hh));