Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/pci In the NIOAPIC case, we do not need to supp...



details:   https://anonhg.NetBSD.org/src/rev/fa1e2dd7cc09
branches:  trunk
changeset: 433361:fa1e2dd7cc09
user:      cherry <cherry%NetBSD.org@localhost>
date:      Mon Sep 10 02:49:23 2018 +0000

description:
In the NIOAPIC case, we do not need to support "legacy" irqs,
ie; We don't need to simultaneously pass back the irq in the
range 0 < irq < 16 (which are sometimes described as "legacy"
in src

This was non-obvious, until the semantics of "legacy" were
used in inconsistent ways in Xen (to also mean interrupts in
the 0 < irq < 256 range) which causes problems with attempting
to unify the sys/arch/x86/isa/isa_machdep.c:isa_intr_establish_xname()
function between XEN and !XEN

This commit should not affect current functionality on any
either native or Xen. It is needed for future code reorg, and
published now as a preview.

diffstat:

 sys/arch/x86/pci/pci_intr_machdep.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 4b588a0efdaf -r fa1e2dd7cc09 sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c       Sun Sep 09 21:16:05 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c       Mon Sep 10 02:49:23 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_intr_machdep.c,v 1.43 2018/06/24 11:51:15 jdolecek Exp $   */
+/*     $NetBSD: pci_intr_machdep.c,v 1.44 2018/09/10 02:49:23 cherry Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.43 2018/06/24 11:51:15 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.44 2018/09/10 02:49:23 cherry Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -294,9 +294,7 @@
                        return ENOENT;
                *pic = &ioapic->sc_pic;
                *pin = APIC_IRQ_PIN(ih);
-               *irq = APIC_IRQ_LEGACY_IRQ(ih);
-               if (*irq < 0 || *irq >= NUM_LEGACY_IRQS)
-                       *irq = -1;
+               *irq = -1; /* PCI doesn't use legacy irq */
        }
 #endif
 



Home | Main Index | Thread Index | Old Index