Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/pci Define a constant for the SIO IRQ line, a...
details: https://anonhg.NetBSD.org/src/rev/6ef72a20e018
branches: trunk
changeset: 939019:6ef72a20e018
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Sep 23 18:48:50 2020 +0000
description:
Define a constant for the SIO IRQ line, and keep a shadow copy of
the interrupt enables.
diffstat:
sys/arch/alpha/pci/pci_6600.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (66 lines):
diff -r 857e7c04ed2f -r 6ef72a20e018 sys/arch/alpha/pci/pci_6600.c
--- a/sys/arch/alpha/pci/pci_6600.c Wed Sep 23 18:46:02 2020 +0000
+++ b/sys/arch/alpha/pci/pci_6600.c Wed Sep 23 18:48:50 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_6600.c,v 1.26 2020/09/22 15:24:02 thorpej Exp $ */
+/* $NetBSD: pci_6600.c,v 1.27 2020/09/23 18:48:50 thorpej Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_6600.c,v 1.26 2020/09/22 15:24:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_6600.c,v 1.27 2020/09/23 18:48:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -64,6 +64,7 @@
#endif
#define PCI_NIRQ 64
+#define PCI_SIO_IRQ 55
#define PCI_STRAY_MAX 5
/*
@@ -94,6 +95,9 @@
static void dec_6600_intr_enable(pci_chipset_tag_t, int irq);
static void dec_6600_intr_disable(pci_chipset_tag_t, int irq);
+/* Software copy of enabled interrupt bits. */
+static uint64_t dec_6600_intr_enables __read_mostly;
+
void
pci_6600_pickintr(struct tsp_config *pcp)
{
@@ -142,7 +146,7 @@
}
#if NSIO
sio_intr_setup(pc, iot);
- dec_6600_intr_enable(pc, 55); /* irq line for sio */
+ dec_6600_intr_enable(pc, PCI_SIO_IRQ); /* irq line for sio */
#endif
} else {
pc->pc_shared_intrs = sioprimary->pc_pc.pc_shared_intrs;
@@ -264,16 +268,18 @@
static void
dec_6600_intr_enable(pci_chipset_tag_t const pc __unused, int const irq)
{
+ dec_6600_intr_enables |= 1UL << irq;
alpha_mb();
- STQP(TS_C_DIM0) |= 1UL << irq;
+ STQP(TS_C_DIM0) = dec_6600_intr_enables;
alpha_mb();
}
static void
dec_6600_intr_disable(pci_chipset_tag_t const pc __unused, int const irq)
{
+ dec_6600_intr_enables &= ~(1UL << irq);
alpha_mb();
- STQP(TS_C_DIM0) &= ~(1UL << irq);
+ STQP(TS_C_DIM0) = dec_6600_intr_enables;
alpha_mb();
}
Home |
Main Index |
Thread Index |
Old Index