summaryrefslogtreecommitdiffstats
path: root/sys/amd64/pci
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1995-02-09 20:16:19 +0000
committerse <se@FreeBSD.org>1995-02-09 20:16:19 +0000
commitcf143514eee5ff97ca1bcf31b5a289c48a66e625 (patch)
treeadf555c7bf085b4761d02937d5c5f82c2bf242f1 /sys/amd64/pci
parent5c099a964cd841f148168497cd77214c6f443fd0 (diff)
downloadFreeBSD-src-cf143514eee5ff97ca1bcf31b5a289c48a66e625.zip
FreeBSD-src-cf143514eee5ff97ca1bcf31b5a289c48a66e625.tar.gz
Initialisation of interrupt masks changed.
Reviewed by: se Submitted by: wolf (Wolfgang Stanglmeier)
Diffstat (limited to 'sys/amd64/pci')
-rw-r--r--sys/amd64/pci/pci_bus.c9
-rw-r--r--sys/amd64/pci/pci_cfgreg.c9
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index 5b7f8dd..25356bc 100644
--- a/sys/amd64/pci/pci_bus.c
+++ b/sys/amd64/pci/pci_bus.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.5 1994/10/12 02:33:21 se Exp $
+** $Id: pcibus.c,v 1.1 1995/02/01 23:06:58 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -393,7 +393,7 @@ static unsigned int pci_int_mask [16];
int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
{
int irq;
- unsigned mask;
+ unsigned mask, oldmask;
irq = PCI_INTERRUPT_LINE_EXTRACT(
pci_conf_read (tag, PCI_INTERRUPT_REG));
@@ -402,6 +402,7 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
if (!maskptr)
maskptr = &pci_int_mask[irq];
+ oldmask = *maskptr;
INTRMASK (*maskptr, mask);
@@ -425,13 +426,13 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
** update the isa interrupt masks.
*/
for (mp=&intr_mask[0]; mp<&intr_mask[ICU_LEN]; mp++)
- if (*mp & *maskptr)
+ if ((~*mp & oldmask)==0)
*mp |= mask;
/*
** update the pci interrupt masks.
*/
for (mp=&pci_int_mask[0]; mp<&pci_int_mask[16]; mp++)
- if (*mp & *maskptr)
+ if ((~*mp & oldmask)==0)
*mp |= mask;
};
#endif
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index 5b7f8dd..25356bc 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.5 1994/10/12 02:33:21 se Exp $
+** $Id: pcibus.c,v 1.1 1995/02/01 23:06:58 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -393,7 +393,7 @@ static unsigned int pci_int_mask [16];
int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
{
int irq;
- unsigned mask;
+ unsigned mask, oldmask;
irq = PCI_INTERRUPT_LINE_EXTRACT(
pci_conf_read (tag, PCI_INTERRUPT_REG));
@@ -402,6 +402,7 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
if (!maskptr)
maskptr = &pci_int_mask[irq];
+ oldmask = *maskptr;
INTRMASK (*maskptr, mask);
@@ -425,13 +426,13 @@ int pcibus_regint (pcici_t tag, int(*func)(), void* arg, unsigned* maskptr)
** update the isa interrupt masks.
*/
for (mp=&intr_mask[0]; mp<&intr_mask[ICU_LEN]; mp++)
- if (*mp & *maskptr)
+ if ((~*mp & oldmask)==0)
*mp |= mask;
/*
** update the pci interrupt masks.
*/
for (mp=&pci_int_mask[0]; mp<&pci_int_mask[16]; mp++)
- if (*mp & *maskptr)
+ if ((~*mp & oldmask)==0)
*mp |= mask;
};
#endif
OpenPOWER on IntegriCloud