Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86 provide intr xname



details:   https://anonhg.NetBSD.org/src/rev/58823f18b2ae
branches:  trunk
changeset: 348354:58823f18b2ae
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Oct 15 16:46:14 2016 +0000

description:
provide intr xname

diffstat:

 sys/arch/x86/acpi/acpi_machdep.c   |   8 ++++----
 sys/arch/x86/include/isa_machdep.h |   4 +++-
 sys/arch/x86/isa/isa_machdep.c     |  16 ++++++++++++----
 sys/arch/x86/pci/pciide_machdep.c  |  11 ++++++++---
 4 files changed, 27 insertions(+), 12 deletions(-)

diffs (125 lines):

diff -r 9fcbee778d58 -r 58823f18b2ae sys/arch/x86/acpi/acpi_machdep.c
--- a/sys/arch/x86/acpi/acpi_machdep.c  Sat Oct 15 16:31:16 2016 +0000
+++ b/sys/arch/x86/acpi/acpi_machdep.c  Sat Oct 15 16:46:14 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.13 2016/09/21 00:00:06 jmcneill Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.14 2016/10/15 16:46:14 jdolecek Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.13 2016/09/21 00:00:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.14 2016/10/15 16:46:14 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -241,8 +241,8 @@
        /*
         * XXX probably, IPL_BIO is enough.
         */
-       ih = intr_establish(irq, pic, pin, type, IPL_TTY,
-           (int (*)(void *)) ServiceRoutine, Context, false);
+       ih = intr_establish_xname(irq, pic, pin, type, IPL_TTY,
+           (int (*)(void *)) ServiceRoutine, Context, false, "acpi SCI");
 
 #if NIOAPIC > 0
        if (mipp) {
diff -r 9fcbee778d58 -r 58823f18b2ae sys/arch/x86/include/isa_machdep.h
--- a/sys/arch/x86/include/isa_machdep.h        Sat Oct 15 16:31:16 2016 +0000
+++ b/sys/arch/x86/include/isa_machdep.h        Sat Oct 15 16:46:14 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_machdep.h,v 1.11 2011/07/01 18:22:39 dyoung Exp $  */
+/*     $NetBSD: isa_machdep.h,v 1.12 2016/10/15 16:46:14 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -105,6 +105,8 @@
 const struct evcnt *isa_intr_evcnt(isa_chipset_tag_t ic, int irq);
 void   *isa_intr_establish(isa_chipset_tag_t ic, int irq, int type,
            int level, int (*ih_fun)(void *), void *ih_arg);
+void   *isa_intr_establish_xname(isa_chipset_tag_t ic, int irq, int type,
+           int level, int (*ih_fun)(void *), void *ih_arg, const char *xname);
 void   isa_intr_disestablish(isa_chipset_tag_t ic, void *handler);
 int    isa_mem_alloc(bus_space_tag_t, bus_size_t, bus_size_t,
            bus_addr_t, int, bus_addr_t *, bus_space_handle_t *);
diff -r 9fcbee778d58 -r 58823f18b2ae sys/arch/x86/isa/isa_machdep.c
--- a/sys/arch/x86/isa/isa_machdep.c    Sat Oct 15 16:31:16 2016 +0000
+++ b/sys/arch/x86/isa/isa_machdep.c    Sat Oct 15 16:46:14 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_machdep.c,v 1.33 2015/04/27 06:51:40 knakahara Exp $       */
+/*     $NetBSD: isa_machdep.c,v 1.34 2016/10/15 16:46:14 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.33 2015/04/27 06:51:40 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.34 2016/10/15 16:46:14 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -200,6 +200,14 @@
 isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
     int (*ih_fun)(void *), void *ih_arg)
 {
+       return isa_intr_establish_xname(ic, irq, type, level,
+           ih_fun, ih_arg, "unknown");
+}
+
+void *
+isa_intr_establish_xname(isa_chipset_tag_t ic, int irq, int type, int level,
+    int (*ih_fun)(void *), void *ih_arg, const char *xname)
+{
        struct pic *pic;
        int pin;
 #if NIOAPIC > 0
@@ -229,8 +237,8 @@
                        printf("isa_intr_establish: no MP mapping found\n");
        }
 #endif
-       return intr_establish(irq, pic, pin, type, level, ih_fun, ih_arg,
-           false);
+       return intr_establish_xname(irq, pic, pin, type, level, ih_fun, ih_arg,
+           false, xname);
 }
 
 /* Deregister an interrupt handler. */
diff -r 9fcbee778d58 -r 58823f18b2ae sys/arch/x86/pci/pciide_machdep.c
--- a/sys/arch/x86/pci/pciide_machdep.c Sat Oct 15 16:31:16 2016 +0000
+++ b/sys/arch/x86/pci/pciide_machdep.c Sat Oct 15 16:46:14 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide_machdep.c,v 1.15 2015/07/27 15:45:20 msaitoh Exp $      */
+/*     $NetBSD: pciide_machdep.c,v 1.16 2016/10/15 16:46:14 jdolecek Exp $     */
 
 /*
  * Copyright (c) 1998 Christopher G. Demetriou.  All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.15 2015/07/27 15:45:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.16 2016/10/15 16:46:14 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -72,9 +72,14 @@
        intr_handle_t mpih;
        char buf[PCI_INTRSTR_LEN];
 #endif
+       char intr_xname[64];
+
+       snprintf(intr_xname, sizeof(intr_xname), "%s %s",
+           device_xname(dev), PCIIDE_CHANNEL_NAME(chan));
 
        irq = PCIIDE_COMPAT_IRQ(chan);
-       cookie = isa_intr_establish(NULL, irq, IST_EDGE, IPL_BIO, func, arg);
+       cookie = isa_intr_establish_xname(NULL, irq, IST_EDGE, IPL_BIO,
+           func, arg, intr_xname);
        if (cookie == NULL)
                return NULL;
 #if NIOAPIC > 0



Home | Main Index | Thread Index | Old Index