diff options
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/acpi/acpi_intr.h | 4 | ||||
| -rw-r--r-- | sys/dev/acpi/acpi_util.c | 8 | ||||
| -rw-r--r-- | sys/dev/acpi/acpica.h | 6 | ||||
| -rw-r--r-- | sys/dev/acpi/acpica/OsdInterrupt.c | 14 | ||||
| -rw-r--r-- | sys/dev/i2c/ihidev.c | 7 |
5 files changed, 26 insertions, 13 deletions
diff --git a/sys/dev/acpi/acpi_intr.h b/sys/dev/acpi/acpi_intr.h index c0cde90f196..dc3c1ee1f1c 100644 --- a/sys/dev/acpi/acpi_intr.h +++ b/sys/dev/acpi/acpi_intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_intr.h,v 1.1 2017/12/10 16:51:30 bouyer Exp $ */ +/* $NetBSD: acpi_intr.h,v 1.2 2018/03/20 12:14:52 bouyer Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -29,6 +29,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ void * acpi_intr_establish(device_t, uint64_t, - unsigned int (*intr)(void *), void *); + unsigned int (*intr)(void *), void *, const char *); void acpi_intr_disestablish(void *, unsigned int (*intr)(void *)); const char * acpi_intr_string(void *, char *, size_t len); diff --git a/sys/dev/acpi/acpi_util.c b/sys/dev/acpi/acpi_util.c index 0ca7e72f836..db7c4657b94 100644 --- a/sys/dev/acpi/acpi_util.c +++ b/sys/dev/acpi/acpi_util.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_util.c,v 1.10 2017/12/10 18:52:41 bouyer Exp $ */ +/* $NetBSD: acpi_util.c,v 1.11 2018/03/20 12:14:52 bouyer Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.10 2017/12/10 18:52:41 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.11 2018/03/20 12:14:52 bouyer Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -517,7 +517,7 @@ struct acpi_irq_handler { void * acpi_intr_establish(device_t dev, uint64_t c, - unsigned int (*intr)(void *), void *iarg) + unsigned int (*intr)(void *), void *iarg, const char *xname) { ACPI_STATUS rv; ACPI_HANDLE hdl = (void *)(uintptr_t)c; @@ -540,7 +540,7 @@ acpi_intr_establish(device_t dev, uint64_t c, aih->aih_hdl = hdl; aih->aih_irq = irq->ar_irq; - rv = AcpiOsInstallInterruptHandler(irq->ar_irq, intr, iarg); + rv = AcpiOsInstallInterruptHandler_xname(irq->ar_irq, intr, iarg, xname); if (ACPI_FAILURE(rv)) { kmem_free(aih, sizeof(struct acpi_irq_handler)); aih = NULL; diff --git a/sys/dev/acpi/acpica.h b/sys/dev/acpi/acpica.h index 9a768a7c8d2..8f73eaee2a0 100644 --- a/sys/dev/acpi/acpica.h +++ b/sys/dev/acpi/acpica.h @@ -1,4 +1,4 @@ -/* $NetBSD: acpica.h,v 1.5 2011/02/17 07:34:42 jruoho Exp $ */ +/* $NetBSD: acpica.h,v 1.6 2018/03/20 12:14:52 bouyer Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -46,4 +46,8 @@ #include <external/bsd/acpica/dist/include/acpi.h> #include <external/bsd/acpica/dist/include/accommon.h> +/* extention to the ACPICA API */ +ACPI_STATUS AcpiOsInstallInterruptHandler_xname( + UINT32, ACPI_OSD_HANDLER, void *, const char *); + #endif /* !_SYS_DEV_ACPI_ACPICA_H */ diff --git a/sys/dev/acpi/acpica/OsdInterrupt.c b/sys/dev/acpi/acpica/OsdInterrupt.c index 7bf517eabc5..b62da90b4e7 100644 --- a/sys/dev/acpi/acpica/OsdInterrupt.c +++ b/sys/dev/acpi/acpica/OsdInterrupt.c @@ -1,4 +1,4 @@ -/* $NetBSD: OsdInterrupt.c,v 1.8 2009/08/18 16:41:02 jmcneill Exp $ */ +/* $NetBSD: OsdInterrupt.c,v 1.9 2018/03/20 12:14:52 bouyer Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: OsdInterrupt.c,v 1.8 2009/08/18 16:41:02 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: OsdInterrupt.c,v 1.9 2018/03/20 12:14:52 bouyer Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -86,6 +86,14 @@ ACPI_STATUS AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRoutine, void *Context) { + return AcpiOsInstallInterruptHandler_xname(InterruptNumber, + ServiceRoutine, Context, "acpi SCI"); +} + +ACPI_STATUS +AcpiOsInstallInterruptHandler_xname(UINT32 InterruptNumber, + ACPI_OSD_HANDLER ServiceRoutine, void *Context, const char *xname) +{ struct acpi_interrupt_handler *aih; ACPI_STATUS rv; @@ -102,7 +110,7 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, aih->aih_func = ServiceRoutine; rv = acpi_md_OsInstallInterruptHandler(InterruptNumber, - ServiceRoutine, Context, &aih->aih_ih); + ServiceRoutine, Context, &aih->aih_ih, xname); if (rv == AE_OK) { mutex_enter(&acpi_interrupt_list_mtx); LIST_INSERT_HEAD(&acpi_interrupt_list, aih, aih_list); diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c index 93bdf6f0a34..0142e736230 100644 --- a/sys/dev/i2c/ihidev.c +++ b/sys/dev/i2c/ihidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: ihidev.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $ */ +/* $NetBSD: ihidev.c,v 1.2 2018/03/20 12:14:52 bouyer Exp $ */ /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */ /*- @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.2 2018/03/20 12:14:52 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -208,7 +208,8 @@ ihidev_attach(device_t parent, device_t self, void *aux) { char buf[100]; - sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, ihidev_intr, sc); + sc->sc_ih = acpi_intr_establish(self, + sc->sc_phandle, ihidev_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) aprint_error_dev(self, "can't establish interrupt\n"); aprint_normal_dev(self, "interrupting at %s\n", |
