CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Apr 24 18:23:09 UTC 2021 Modified Files: src/sys/arch/macppc/dev [thorpej-cfargs]: ofb.c src/sys/dev/ic [thorpej-cfargs]: vga_raster.c src/sys/dev/pci [thorpej-cfargs]: machfb.c radeonfb.c unichromefb.c Log Message: Make sure to explcitly specify the "wsemuldisplaydev" interface attribute when attaching the wscons display instance, because these devices can also attach children using the "drm" interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.70.32.2 -r1.70.32.3 src/sys/arch/macppc/dev/ofb.c cvs rdiff -u -r1.48.4.1 -r1.48.4.2 src/sys/dev/ic/vga_raster.c cvs rdiff -u -r1.103.4.2 -r1.103.4.3 src/sys/dev/pci/machfb.c cvs rdiff -u -r1.113.2.2 -r1.113.2.3 src/sys/dev/pci/radeonfb.c cvs rdiff -u -r1.19.34.2 -r1.19.34.3 src/sys/dev/pci/unichromefb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/dev/ofb.c diff -u src/sys/arch/macppc/dev/ofb.c:1.70.32.2 src/sys/arch/macppc/dev/ofb.c:1.70.32.3 --- src/sys/arch/macppc/dev/ofb.c:1.70.32.2 Fri Apr 2 22:17:40 2021 +++ src/sys/arch/macppc/dev/ofb.c Sat Apr 24 18:23:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofb.c,v 1.70.32.2 2021/04/02 22:17:40 thorpej Exp $ */ +/* $NetBSD: ofb.c,v 1.70.32.3 2021/04/24 18:23:09 thorpej Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofb.c,v 1.70.32.2 2021/04/02 22:17:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofb.c,v 1.70.32.3 2021/04/24 18:23:09 thorpej Exp $"); #include #include @@ -217,7 +217,9 @@ ofbattach(device_t parent, device_t self a.accessops = &ofb_accessops; a.accesscookie = &sc->vd; - config_found(self, &a, wsemuldisplaydevprint, CFARG_EOL); + config_found(self, &a, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); config_found(self, aux, ofb_drm_print, CFARG_IATTR, "drm", Index: src/sys/dev/ic/vga_raster.c diff -u src/sys/dev/ic/vga_raster.c:1.48.4.1 src/sys/dev/ic/vga_raster.c:1.48.4.2 --- src/sys/dev/ic/vga_raster.c:1.48.4.1 Sun Mar 21 21:09:12 2021 +++ src/sys/dev/ic/vga_raster.c Sat Apr 24 18:23:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.48.4.1 2021/03/21 21:09:12 thorpej Exp $ */ +/* $NetBSD: vga_raster.c,v 1.48.4.2 2021/04/24 18:23:09 thorpej Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.48.4.1 2021/03/21 21:09:12 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.48.4.2 2021/04/24 18:23:09 thorpej Exp $"); #include "opt_vga.h" #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -548,7 +548,9 @@ vga_common_attach(struct vga_softc *sc, aa.accessops = &vga_raster_accessops; aa.accesscookie = vc; - config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); + config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); } int Index: src/sys/dev/pci/machfb.c diff -u src/sys/dev/pci/machfb.c:1.103.4.2 src/sys/dev/pci/machfb.c:1.103.4.3 --- src/sys/dev/pci/machfb.c:1.103.4.2 Fri Apr 2 22:17:44 2021 +++ src/sys/dev/pci/machfb.c Sat Apr 24 18:23:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machfb.c,v 1.103.4.2 2021/04/02 22:17:44 thorpej Exp $ */ +/* $NetBSD: machfb.c,v 1.103.4.3 2021/04/24 18:23:09 thorpej Exp $ */ /* * Copyright (c) 2002 Bang Jun-Young @@ -34,7 +34,7 @@ #include __KERNEL_RCSID(0, - "$NetBSD: machfb.c,v 1.103.4.2 2021/04/02 22:17:44 thorpej Exp $"); + "$NetBSD: machfb.c,v 1.103.4.3 2021/04/24 18:23:09 thorpej Exp $"); #include #include @@ -785,7 +785,9 @@ mach64_attach(device_t parent, device_t aa.accessops = &sc->sc_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); + config_found(self, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); #if 0 /* XXX * turns out some firmware doesn't turn these back on when needed Index: src/sys/dev/pci/radeonfb.c diff -u src/sys/dev/pci/radeonfb.c:1.113.2.2 src/sys/dev/pci/radeonfb.c:1.113.2.3 --- src/sys/dev/pci/radeonfb.c:1.113.2.2 Fri Apr 2 22:17:44 2021 +++ src/sys/dev/pci/radeonfb.c Sat Apr 24 18:23:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.113.2.2 2021/04/02 22:17:44 thorpej Exp $ */ +/* $NetBSD: radeonfb.c,v 1.113.2.3 2021/04/24 18:23:09 thorpej Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.113.2.2 2021/04/02 22:17:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.113.2.3 2021/04/24 18:23:09 thorpej Exp $"); #include #include @@ -1013,7 +1013,9 @@ radeonfb_attach(device_t parent, device_ aa.accessops = &radeonfb_accessops; aa.accesscookie = &dp->rd_vd; - config_found(sc->sc_dev, &aa
CVS commit: [thorpej-cfargs] src/sys/sys
Module Name:src Committed By: thorpej Date: Sat Apr 24 18:07:08 UTC 2021 Modified Files: src/sys/sys [thorpej-cfargs]: device.h Log Message: Use a value for CFARG_EOL that is not likely to be encountered randomly in nature. Suggested by dholland. To generate a diff of this commit: cvs rdiff -u -r1.167.2.9 -r1.167.2.10 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.167.2.9 src/sys/sys/device.h:1.167.2.10 --- src/sys/sys/device.h:1.167.2.9 Sun Apr 4 19:23:53 2021 +++ src/sys/sys/device.h Sat Apr 24 18:07:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.167.2.9 2021/04/04 19:23:53 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.167.2.10 2021/04/24 18:07:07 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -535,7 +535,8 @@ typedef enum { CFARG_LOCATORS = 3, /* locators array */ CFARG_DEVHANDLE = 4, /* devhandle_t (by value) */ - CFARG_EOL = 0x + /* ...a value not likely to occur randomly in the wild. */ + CFARG_EOL = 0x } cfarg_t; #ifdef _KERNEL
CVS commit: [thorpej-cfargs] src/sys/arch/xen/xenbus
Module Name:src Committed By: thorpej Date: Fri Apr 23 15:05:27 UTC 2021 Modified Files: src/sys/arch/xen/xenbus [thorpej-cfargs]: xenbus_probe.c Log Message: No need to be explicit about interface attributes here. To generate a diff of this commit: cvs rdiff -u -r1.55.4.2 -r1.55.4.3 src/sys/arch/xen/xenbus/xenbus_probe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/xenbus/xenbus_probe.c diff -u src/sys/arch/xen/xenbus/xenbus_probe.c:1.55.4.2 src/sys/arch/xen/xenbus/xenbus_probe.c:1.55.4.3 --- src/sys/arch/xen/xenbus/xenbus_probe.c:1.55.4.2 Fri Apr 2 22:17:43 2021 +++ src/sys/arch/xen/xenbus/xenbus_probe.c Fri Apr 23 15:05:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: xenbus_probe.c,v 1.55.4.2 2021/04/02 22:17:43 thorpej Exp $ */ +/* $NetBSD: xenbus_probe.c,v 1.55.4.3 2021/04/23 15:05:27 thorpej Exp $ */ /** * Talks to Xen Store to figure out what devices we have. * @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xenbus_probe.c,v 1.55.4.2 2021/04/02 22:17:43 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xenbus_probe.c,v 1.55.4.3 2021/04/23 15:05:27 thorpej Exp $"); #if 0 #define DPRINTK(fmt, args...) \ @@ -653,7 +653,6 @@ xenbus_probe(void *unused) /* attach balloon. */ config_found(xenbus_dev, &balloon_xa, xenbus_print, - CFARG_IATTR, "xenbus", CFARG_EOL); shutdown_xenbus_setup();
CVS commit: [thorpej-cfargs] src/sys/arch/arm/xscale
Module Name:src Committed By: thorpej Date: Sun Apr 18 17:12:01 UTC 2021 Modified Files: src/sys/arch/arm/xscale [thorpej-cfargs]: becc.c Log Message: Need to be explicit about the interface attribute when attaching the PCI bus instance because "becc" carries 2 interface attributes. To generate a diff of this commit: cvs rdiff -u -r1.16.52.6 -r1.16.52.7 src/sys/arch/arm/xscale/becc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/xscale/becc.c diff -u src/sys/arch/arm/xscale/becc.c:1.16.52.6 src/sys/arch/arm/xscale/becc.c:1.16.52.7 --- src/sys/arch/arm/xscale/becc.c:1.16.52.6 Mon Apr 5 01:01:43 2021 +++ src/sys/arch/arm/xscale/becc.c Sun Apr 18 17:12:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: becc.c,v 1.16.52.6 2021/04/05 01:01:43 thorpej Exp $ */ +/* $NetBSD: becc.c,v 1.16.52.7 2021/04/18 17:12:01 thorpej Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: becc.c,v 1.16.52.6 2021/04/05 01:01:43 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: becc.c,v 1.16.52.7 2021/04/18 17:12:01 thorpej Exp $"); #include #include @@ -212,7 +212,9 @@ becc_attach(struct becc_softc *sc) pba.pba_intrtag = 0; pba.pba_flags = PCI_FLAGS_IO_OKAY | PCI_FLAGS_MEM_OKAY | PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY; - config_found(sc->sc_dev, &pba, pcibusprint, CFARG_EOL); + config_found(sc->sc_dev, &pba, pcibusprint, + CFARG_IATTR, "pcibus", + CFARG_EOL); } /*
CVS commit: [thorpej-cfargs] src/sys/arch/arm/ep93xx
Module Name:src Committed By: thorpej Date: Sun Apr 18 16:46:06 UTC 2021 Modified Files: src/sys/arch/arm/ep93xx [thorpej-cfargs]: eppcic.c Log Message: config_found() takes a device_t, not a softc. This is a bug left-over from decoupling of device_t / softcs long ago. To generate a diff of this commit: cvs rdiff -u -r1.8.10.1 -r1.8.10.2 src/sys/arch/arm/ep93xx/eppcic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/ep93xx/eppcic.c diff -u src/sys/arch/arm/ep93xx/eppcic.c:1.8.10.1 src/sys/arch/arm/ep93xx/eppcic.c:1.8.10.2 --- src/sys/arch/arm/ep93xx/eppcic.c:1.8.10.1 Tue Mar 23 07:14:43 2021 +++ src/sys/arch/arm/ep93xx/eppcic.c Sun Apr 18 16:46:06 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: eppcic.c,v 1.8.10.1 2021/03/23 07:14:43 thorpej Exp $ */ +/* $NetBSD: eppcic.c,v 1.8.10.2 2021/04/18 16:46:06 thorpej Exp $ */ /* * Copyright (c) 2005 HAMAJIMA Katsuomi. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: eppcic.c,v 1.8.10.1 2021/03/23 07:14:43 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eppcic.c,v 1.8.10.2 2021/04/18 16:46:06 thorpej Exp $"); #include #include @@ -242,8 +242,8 @@ eppcic_config_socket(struct eppcic_handl paa.paa_busname = "pcmcia"; paa.pct = (pcmcia_chipset_tag_t)&eppcic_functions; paa.pch = (pcmcia_chipset_handle_t)ph; - ph->ph_card = config_found((void*)sc, &paa, eppcic_print, CFARG_EOL); - + ph->ph_card = config_found(sc->sc_dev, &paa, eppcic_print, CFARG_EOL); + epgpio_intr_establish(sc->sc_gpio, ph->ph_port, ph->ph_cd[0], EDGE_TRIGGER | FALLING_EDGE | DEBOUNCE, IPL_TTY, eppcic_intr_carddetect, ph);
CVS commit: [thorpej-cfargs] src/sys/arch/arm/acpi
Module Name:src Committed By: thorpej Date: Sat Apr 17 18:03:32 UTC 2021 Modified Files: src/sys/arch/arm/acpi [thorpej-cfargs]: acpi_machdep.c Log Message: acpi_md_gtdt_probe(): Fix paste-o in interface attribute name. To generate a diff of this commit: cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/arch/arm/acpi/acpi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/acpi/acpi_machdep.c diff -u src/sys/arch/arm/acpi/acpi_machdep.c:1.21.2.1 src/sys/arch/arm/acpi/acpi_machdep.c:1.21.2.2 --- src/sys/arch/arm/acpi/acpi_machdep.c:1.21.2.1 Fri Apr 2 22:17:37 2021 +++ src/sys/arch/arm/acpi/acpi_machdep.c Sat Apr 17 18:03:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_machdep.c,v 1.21.2.1 2021/04/02 22:17:37 thorpej Exp $ */ +/* $NetBSD: acpi_machdep.c,v 1.21.2.2 2021/04/17 18:03:32 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "pci.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.21.2.1 2021/04/02 22:17:37 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.21.2.2 2021/04/17 18:03:32 thorpej Exp $"); #include #include @@ -331,7 +331,7 @@ acpi_md_gtdt_probe(ACPI_GTDT_HEADER *hdr struct acpi_softc * const sc = aux; config_found(sc->sc_dev, hdrp, NULL, - CFARG_IATTR, "acpimadtbus", + CFARG_IATTR, "acpigtdtbus", CFARG_EOL); return AE_OK;
CVS commit: [thorpej-cfargs] src/sys/dev/audio
Module Name:src Committed By: thorpej Date: Tue Apr 6 00:16:48 UTC 2021 Modified Files: src/sys/dev/audio [thorpej-cfargs]: audio.c Log Message: audiosearch(): Remove a stray CFARG_LOCATORS tag. To generate a diff of this commit: cvs rdiff -u -r1.91.2.7 -r1.91.2.8 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.91.2.7 src/sys/dev/audio/audio.c:1.91.2.8 --- src/sys/dev/audio/audio.c:1.91.2.7 Mon Apr 5 00:48:53 2021 +++ src/sys/dev/audio/audio.c Tue Apr 6 00:16:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.91.2.7 2021/04/05 00:48:53 thorpej Exp $ */ +/* $NetBSD: audio.c,v 1.91.2.8 2021/04/06 00:16:48 thorpej Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.7 2021/04/05 00:48:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.8 2021/04/06 00:16:48 thorpej Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -1405,7 +1405,6 @@ audiosearch(device_t parent, cfdata_t cf if (config_probe(parent, cf, aux)) config_attach(parent, cf, aux, NULL, - CFARG_LOCATORS, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Mon Apr 5 01:28:00 UTC 2021 Modified Files: src/sys/dev/i2c [thorpej-cfargs]: i2c.c Log Message: config_match() -> config_probe(). It's a little over-loaded here because we're mixing direct and indirect in the same place, but that will be addresed at a later time. To generate a diff of this commit: cvs rdiff -u -r1.77.2.7 -r1.77.2.8 src/sys/dev/i2c/i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.77.2.7 src/sys/dev/i2c/i2c.c:1.77.2.8 --- src/sys/dev/i2c/i2c.c:1.77.2.7 Sun Apr 4 22:01:22 2021 +++ src/sys/dev/i2c/i2c.c Mon Apr 5 01:27:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.77.2.7 2021/04/04 22:01:22 thorpej Exp $ */ +/* $NetBSD: i2c.c,v 1.77.2.8 2021/04/05 01:27:59 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.7 2021/04/04 22:01:22 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.8 2021/04/05 01:27:59 thorpej Exp $"); #include #include @@ -343,7 +343,7 @@ iic_search(device_t parent, cfdata_t cf, * us from having to poke at the bus to see if anything * is there. */ - match_result = config_match(parent, cf, &ia); + match_result = config_probe(parent, cf, &ia);/*XXX*/ if (match_result <= 0) continue;
CVS commit: [thorpej-cfargs] src/sys/arch/hpcmips
Module Name:src Committed By: thorpej Date: Mon Apr 5 01:25:55 UTC 2021 Modified Files: src/sys/arch/hpcmips/dev [thorpej-cfargs]: plum.c src/sys/arch/hpcmips/tx [thorpej-cfargs]: txcsbus.c txsim.c src/sys/arch/hpcmips/vr [thorpej-cfargs]: vrc4173bcu.c vrip.c Log Message: Decorate the problematic config_probe() calls (non-boolean return value) with XXX. To generate a diff of this commit: cvs rdiff -u -r1.18.2.6 -r1.18.2.7 src/sys/arch/hpcmips/dev/plum.c cvs rdiff -u -r1.22.52.6 -r1.22.52.7 src/sys/arch/hpcmips/tx/txcsbus.c cvs rdiff -u -r1.17.52.6 -r1.17.52.7 src/sys/arch/hpcmips/tx/txsim.c cvs rdiff -u -r1.24.28.6 -r1.24.28.7 src/sys/arch/hpcmips/vr/vrc4173bcu.c cvs rdiff -u -r1.37.52.6 -r1.37.52.7 src/sys/arch/hpcmips/vr/vrip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/dev/plum.c diff -u src/sys/arch/hpcmips/dev/plum.c:1.18.2.6 src/sys/arch/hpcmips/dev/plum.c:1.18.2.7 --- src/sys/arch/hpcmips/dev/plum.c:1.18.2.6 Mon Apr 5 00:48:49 2021 +++ src/sys/arch/hpcmips/dev/plum.c Mon Apr 5 01:25:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: plum.c,v 1.18.2.6 2021/04/05 00:48:49 thorpej Exp $ */ +/* $NetBSD: plum.c,v 1.18.2.7 2021/04/05 01:25:55 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: plum.c,v 1.18.2.6 2021/04/05 00:48:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: plum.c,v 1.18.2.7 2021/04/05 01:25:55 thorpej Exp $"); #include #include @@ -161,7 +161,7 @@ plum_search(device_t parent, cfdata_t cf pa.pa_memt = sc->sc_csmemt; pa.pa_irq = sc->sc_irq; - if (config_probe(parent, cf, &pa) == sc->sc_pri) { + if (/*XXX*/config_probe(parent, cf, &pa) == sc->sc_pri) { config_attach(parent, cf, &pa, plum_print, CFARG_EOL); } Index: src/sys/arch/hpcmips/tx/txcsbus.c diff -u src/sys/arch/hpcmips/tx/txcsbus.c:1.22.52.6 src/sys/arch/hpcmips/tx/txcsbus.c:1.22.52.7 --- src/sys/arch/hpcmips/tx/txcsbus.c:1.22.52.6 Mon Apr 5 00:48:49 2021 +++ src/sys/arch/hpcmips/tx/txcsbus.c Mon Apr 5 01:25:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: txcsbus.c,v 1.22.52.6 2021/04/05 00:48:49 thorpej Exp $ */ +/* $NetBSD: txcsbus.c,v 1.22.52.7 2021/04/05 01:25:55 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: txcsbus.c,v 1.22.52.6 2021/04/05 00:48:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: txcsbus.c,v 1.22.52.7 2021/04/05 01:25:55 thorpej Exp $"); #include #include @@ -238,7 +238,7 @@ txcsbus_search(device_t parent, cfdata_t ca.ca_irq2 = cf->cf_loc[TXCSBUSCF_IRQ2]; ca.ca_irq3 = cf->cf_loc[TXCSBUSCF_IRQ3]; - if (config_probe(parent, cf, &ca) == sc->sc_pri) { + if (/*XXX*/config_probe(parent, cf, &ca) == sc->sc_pri) { config_attach(parent, cf, &ca, txcsbus_print, CFARG_EOL); } Index: src/sys/arch/hpcmips/tx/txsim.c diff -u src/sys/arch/hpcmips/tx/txsim.c:1.17.52.6 src/sys/arch/hpcmips/tx/txsim.c:1.17.52.7 --- src/sys/arch/hpcmips/tx/txsim.c:1.17.52.6 Mon Apr 5 00:48:49 2021 +++ src/sys/arch/hpcmips/tx/txsim.c Mon Apr 5 01:25:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: txsim.c,v 1.17.52.6 2021/04/05 00:48:49 thorpej Exp $ */ +/* $NetBSD: txsim.c,v 1.17.52.7 2021/04/05 01:25:55 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: txsim.c,v 1.17.52.6 2021/04/05 00:48:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: txsim.c,v 1.17.52.7 2021/04/05 01:25:55 thorpej Exp $"); #include "opt_vr41xx.h" #include "opt_tx39xx.h" @@ -126,7 +126,7 @@ txsim_search(device_t parent, cfdata_t c ta.ta_tc = tx_conf_get_tag(); - if (config_probe(parent, cf, &ta) == sc->sc_pri) + if (/*XXX*/config_probe(parent, cf, &ta) == sc->sc_pri) config_attach(parent, cf, &ta, txsim_print, CFARG_EOL); return (0); Index: src/sys/arch/hpcmips/vr/vrc4173bcu.c diff -u src/sys/arch/hpcmips/vr/vrc4173bcu.c:1.24.28.6 src/sys/arch/hpcmips/vr/vrc4173bcu.c:1.24.28.7 --- src/sys/arch/hpcmips/vr/vrc4173bcu.c:1.24.28.6 Mon Apr 5 00:48:49 2021 +++ src/sys/arch/hpcmips/vr/vrc4173bcu.c Mon Apr 5 01:25:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vrc4173bcu.c,v 1.24.28.6 2021/04/05 00:48:49 thorpej Exp $ */ +/* $NetBSD: vrc4173bcu.c,v 1.24.28.7 2021/04/05 01:25:55 thorpej Exp $ */ /*- * Copyright (c) 2001,2002 Enami Tsugutomo. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vrc4173bcu.c,v 1.24.28.6 2021/04/05 00:48:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vrc4173bcu.c,v 1.24.28.7 2021/04/05 01:25:55 thorpej Exp $"); #include #include @@ -469,7 +469,7 @@ vrc4173bcu_search(device_t parent, cfdat va.va_cc = sc->sc_chipset.vc_cc; va.va_ac = sc->sc_chipset.vc_ac; va.va_dc = sc->sc_chipset.vc_dc; - if ((config_probe(parent, cf, &va) == sc->sc_pri)) + if (/*XXX*/config_probe(parent, c
CVS commit: [thorpej-cfargs] src/sys/arch/arm/imx
Module Name:src Committed By: thorpej Date: Mon Apr 5 01:24:09 UTC 2021 Modified Files: src/sys/arch/arm/imx [thorpej-cfargs]: imx23_apbh.c Log Message: Oops. missed this in the last. To generate a diff of this commit: cvs rdiff -u -r1.1.56.6 -r1.1.56.7 src/sys/arch/arm/imx/imx23_apbh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/imx/imx23_apbh.c diff -u src/sys/arch/arm/imx/imx23_apbh.c:1.1.56.6 src/sys/arch/arm/imx/imx23_apbh.c:1.1.56.7 --- src/sys/arch/arm/imx/imx23_apbh.c:1.1.56.6 Mon Apr 5 01:01:42 2021 +++ src/sys/arch/arm/imx/imx23_apbh.c Mon Apr 5 01:24:09 2021 @@ -1,4 +1,4 @@ -/* $Id: imx23_apbh.c,v 1.1.56.6 2021/04/05 01:01:42 thorpej Exp $ */ +/* $Id: imx23_apbh.c,v 1.1.56.7 2021/04/05 01:24:09 thorpej Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -150,7 +150,7 @@ apbh_search_crit_cb(device_t parent, cfd aa->aa_size = cf->cf_loc[APBHCF_SIZE]; aa->aa_irq = cf->cf_loc[APBHCF_IRQ]; - if (config_probe(parent, cf, aux) > 0) + if (config_probe(parent, cf, aux)) config_attach(parent, cf, aux, apbh_print, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Mon Apr 5 01:01:49 UTC 2021 Modified Files: src/sys/arch/acorn32/eb7500atx [thorpej-cfargs]: rsbus.c src/sys/arch/acorn32/mainbus [thorpej-cfargs]: pioc.c src/sys/arch/arm/at91 [thorpej-cfargs]: at91bus.c at91pio.c src/sys/arch/arm/ep93xx [thorpej-cfargs]: epgpio.c epsoc.c src/sys/arch/arm/imx [thorpej-cfargs]: imx23_ahb.c imx23_apbh.c imx23_apbx.c imx23_usb.c imx51_axi.c imx51_usb.c src/sys/arch/arm/iomd [thorpej-cfargs]: vidc20.c src/sys/arch/arm/ixp12x0 [thorpej-cfargs]: ixpsip.c src/sys/arch/arm/mainbus [thorpej-cfargs]: mainbus.c src/sys/arch/arm/mpcore [thorpej-cfargs]: mpcore_axi.c mpcore_pmr.c src/sys/arch/arm/sa11x0 [thorpej-cfargs]: sa.c sa11x0.c src/sys/arch/arm/xscale [thorpej-cfargs]: becc.c ixp425_ixme.c ixp425_npe.c ixp425_sip.c src/sys/arch/arm/zynq [thorpej-cfargs]: zynq_axi.c src/sys/arch/atari/vme [thorpej-cfargs]: vme.c src/sys/arch/cesfic/cesfic [thorpej-cfargs]: autoconf.c src/sys/arch/cobalt/cobalt [thorpej-cfargs]: mainbus.c src/sys/arch/dreamcast/dev/g1 [thorpej-cfargs]: g1bus.c src/sys/arch/dreamcast/dev/g2 [thorpej-cfargs]: g2bus.c src/sys/arch/epoc32/epoc32 [thorpej-cfargs]: internal.c src/sys/arch/evbarm/adi_brh [thorpej-cfargs]: obio.c src/sys/arch/evbarm/g42xxeb [thorpej-cfargs]: gb225.c obio.c src/sys/arch/evbarm/hdl_g [thorpej-cfargs]: obio.c src/sys/arch/evbarm/ifpga [thorpej-cfargs]: ifpga.c src/sys/arch/evbarm/iq80310 [thorpej-cfargs]: obio.c src/sys/arch/evbarm/iq80321 [thorpej-cfargs]: obio.c src/sys/arch/evbarm/iyonix [thorpej-cfargs]: obio.c src/sys/arch/evbarm/tsarm [thorpej-cfargs]: tspld.c src/sys/arch/hp300/dev [thorpej-cfargs]: hpib.c src/sys/arch/hp300/hp300 [thorpej-cfargs]: autoconf.c src/sys/arch/hpcarm/dev [thorpej-cfargs]: ipaq_atmelgpio.c ipaq_saip.c j720ssp.c uda1341.c src/sys/arch/iyonix/iyonix [thorpej-cfargs]: obio.c src/sys/arch/landisk/dev [thorpej-cfargs]: obio.c src/sys/arch/mac68k/mac68k [thorpej-cfargs]: mainbus.c src/sys/arch/mac68k/obio [thorpej-cfargs]: obio.c src/sys/arch/mips/ralink [thorpej-cfargs]: ralink_mainbus.c src/sys/arch/mips/rmi [thorpej-cfargs]: rmixl_iobus.c rmixl_mainbus.c rmixl_obio.c rmixl_usbi.c src/sys/arch/mips/sibyte/dev [thorpej-cfargs]: sbgbus.c src/sys/arch/mipsco/obio [thorpej-cfargs]: obio.c src/sys/arch/news68k/dev [thorpej-cfargs]: hb.c src/sys/arch/news68k/news68k [thorpej-cfargs]: mainbus.c src/sys/arch/newsmips/dev [thorpej-cfargs]: hb.c src/sys/arch/next68k/dev [thorpej-cfargs]: intio.c src/sys/arch/next68k/next68k [thorpej-cfargs]: mainbus.c src/sys/arch/powerpc/booke/dev [thorpej-cfargs]: pq3obio.c src/sys/arch/prep/pnpbus [thorpej-cfargs]: pnpbus.c src/sys/arch/rs6000/mca [thorpej-cfargs]: ioplanar.c src/sys/arch/sandpoint/sandpoint [thorpej-cfargs]: eumb.c src/sys/arch/sgimips/gio [thorpej-cfargs]: gio.c src/sys/arch/sgimips/ioc [thorpej-cfargs]: ioc.c src/sys/arch/sgimips/mace [thorpej-cfargs]: mace.c src/sys/arch/sgimips/sgimips [thorpej-cfargs]: mainbus.c src/sys/arch/sh3/dev [thorpej-cfargs]: adc.c shb.c src/sys/arch/sparc/dev [thorpej-cfargs]: obio.c src/sys/arch/sun3/sun3 [thorpej-cfargs]: autoconf.c src/sys/arch/sun68k/sun68k [thorpej-cfargs]: autoconf.c src/sys/arch/x68k/dev [thorpej-cfargs]: intio.c mfp.c src/sys/dev/gpib [thorpej-cfargs]: cs80bus.c gpib.c src/sys/dev/gpio [thorpej-cfargs]: gpio.c src/sys/dev/isa [thorpej-cfargs]: isa.c tsdio.c src/sys/dev/marvell [thorpej-cfargs]: obio.c src/sys/dev/ppbus [thorpej-cfargs]: ppbus_conf.c src/sys/dev/spi [thorpej-cfargs]: spi.c src/sys/rump/librump/rumpkern [thorpej-cfargs]: rump_autoconf.c Log Message: Treat config_probe() as if it were a boolean function; don't compare return value > 0... except for the odd balls, which are now really easy to spot. To generate a diff of this commit: cvs rdiff -u -r1.10.52.5 -r1.10.52.6 src/sys/arch/acorn32/eb7500atx/rsbus.c cvs rdiff -u -r1.18.52.7 -r1.18.52.8 src/sys/arch/acorn32/mainbus/pioc.c cvs rdiff -u -r1.27.4.7 -r1.27.4.8 src/sys/arch/arm/at91/at91bus.c cvs rdiff -u -r1.6.52.5 -r1.6.52.6 src/sys/arch/arm/at91/at91pio.c cvs rdiff -u -r1.5.52.5 -r1.5.52.6 src/sys/arch/arm/ep93xx/epgpio.c cvs rdiff -u -r1.13.52.7 -r1.13.52.8 src/sys/arch/arm/ep93xx/epsoc.c cvs rdiff -u -r1.1.50.5 -r1.1.50.6 src/sys/arch/arm/imx/imx23_ahb.c cvs rdiff -u -r1.1.56.5 -r1.1.56.6 src/sys/arch/arm/imx/imx23_apbh.c \ src/sys/arch/arm/imx/imx23_apbx.c cvs rdiff -u -r1.3.2.5 -r1.3.2.6 src/sys/arch/arm/imx/imx23_usb.c cvs rdiff -u -
CVS commit: [thorpej-cfargs] src/sys/kern
Module Name:src Committed By: thorpej Date: Mon Apr 5 00:26:47 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c Log Message: Document that config_probe() really should just return a bool, but explain why it cannot, currently. To generate a diff of this commit: cvs rdiff -u -r1.277.2.12 -r1.277.2.13 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.12 src/sys/kern/subr_autoconf.c:1.277.2.13 --- src/sys/kern/subr_autoconf.c:1.277.2.12 Sun Apr 4 19:23:53 2021 +++ src/sys/kern/subr_autoconf.c Mon Apr 5 00:26:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.12 2021/04/04 19:23:53 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.13 2021/04/05 00:26:47 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.12 2021/04/04 19:23:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.13 2021/04/05 00:26:47 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1031,6 +1031,12 @@ config_probe(device_t parent, cfdata_t c * This is currently a synonym for config_match(), but this * is an implementation detail; "match" and "probe" routines * have different behaviors. + * + * XXX config_probe() should return a bool, because there is + * XXX no match score for probe -- it's either there or it's + * XXX not, but some ports abuse the return value as a way + * XXX to attach "critical" devices before "non-critical" + * XXX devices. */ return config_match(parent, cf, aux); }
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sun Apr 4 19:23:54 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c src/sys/sys [thorpej-cfargs]: device.h Log Message: Add a config_probe() function. This is currently a synonym for config_match(), but exists so as to make a distinction between probing (as is done in indirect configuration) and matching (which is done in direct configuration). The intention is for direct config "submatch" routines to use config_match() and for indirect config "search" routines to use config_probe(). To generate a diff of this commit: cvs rdiff -u -r1.277.2.11 -r1.277.2.12 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.167.2.8 -r1.167.2.9 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.11 src/sys/kern/subr_autoconf.c:1.277.2.12 --- src/sys/kern/subr_autoconf.c:1.277.2.11 Sun Apr 4 19:12:27 2021 +++ src/sys/kern/subr_autoconf.c Sun Apr 4 19:23:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.11 2021/04/04 19:12:27 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.12 2021/04/04 19:23:53 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.11 2021/04/04 19:12:27 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.12 2021/04/04 19:23:53 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1004,7 +1004,7 @@ config_cfdata_detach(cfdata_t cf) /* * Invoke the "match" routine for a cfdata entry on behalf of - * an external caller, usually a "submatch" routine. + * an external caller, usually a direct config "submatch" routine. */ int config_match(device_t parent, cfdata_t cf, void *aux) @@ -1020,6 +1020,21 @@ config_match(device_t parent, cfdata_t c return (*ca->ca_match)(parent, cf, aux); } +/* + * Invoke the "probe" routine for a cfdata entry on behalf of + * an external caller, usually an indirect config "search" routine. + */ +int +config_probe(device_t parent, cfdata_t cf, void *aux) +{ + /* + * This is currently a synonym for config_match(), but this + * is an implementation detail; "match" and "probe" routines + * have different behaviors. + */ + return config_match(parent, cf, aux); +} + static void config_get_cfargs(cfarg_t tag, cfsubmatch_t *fnp, /* output */ Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.167.2.8 src/sys/sys/device.h:1.167.2.9 --- src/sys/sys/device.h:1.167.2.8 Sun Apr 4 19:12:28 2021 +++ src/sys/sys/device.h Sun Apr 4 19:23:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.167.2.8 2021/04/04 19:12:28 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.167.2.9 2021/04/04 19:23:53 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -587,6 +587,7 @@ device_t config_found(device_t, void *, device_t config_rootfound(const char *, void *); device_t config_attach(device_t, cfdata_t, void *, cfprint_t, cfarg_t, ...); int config_match(device_t, cfdata_t, void *); +int config_probe(device_t, cfdata_t, void *); bool ifattr_match(const char *, const char *);
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sun Apr 4 19:12:28 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c src/sys/sys [thorpej-cfargs]: device.h Log Message: Add a CFARG_SEARCH tag, which specifies an indirect config search function (which has the same signature as a direct config submatch function). This is a synonym for CFARG_SUBMATCH internally, but this is an implementation detail; the two things should be distinct to callers, because submatch and search functions have different behaviors. Only one SEARCH or SUBMATCH argument is allowed. Also, change config_get_cfargs() to panic if an unknown tag is passed (we don't know what kind of argument to consume after an unknown tag, so this is fatal). To generate a diff of this commit: cvs rdiff -u -r1.277.2.10 -r1.277.2.11 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.167.2.7 -r1.167.2.8 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.10 src/sys/kern/subr_autoconf.c:1.277.2.11 --- src/sys/kern/subr_autoconf.c:1.277.2.10 Sat Apr 3 16:09:44 2021 +++ src/sys/kern/subr_autoconf.c Sun Apr 4 19:12:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.10 2021/04/03 16:09:44 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.11 2021/04/04 19:12:27 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.10 2021/04/03 16:09:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.11 2021/04/04 19:12:27 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1037,7 +1037,18 @@ config_get_cfargs(cfarg_t tag, while (tag != CFARG_EOL) { switch (tag) { + /* + * CFARG_SUBMATCH and CFARG_SEARCH are synonyms, but this + * is merely an implementation detail. They are distinct + * from the caller's point of view. + */ case CFARG_SUBMATCH: + case CFARG_SEARCH: + /* Only allow one function to be specified. */ + if (fn != NULL) { +panic("%s: caller specified both " +"SUBMATCH and SEARCH", __func__); + } fn = va_arg(ap, cfsubmatch_t); break; @@ -1054,16 +1065,12 @@ config_get_cfargs(cfarg_t tag, break; default: - /* XXX panic? */ - /* XXX dump stack backtrace? */ - aprint_error("%s: unknown cfarg tag: %d\n", + panic("%s: unknown cfarg tag: %d\n", __func__, tag); - goto out; } tag = va_arg(ap, cfarg_t); } - out: if (fnp != NULL) *fnp = fn; if (ifattrp != NULL) Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.167.2.7 src/sys/sys/device.h:1.167.2.8 --- src/sys/sys/device.h:1.167.2.7 Sat Apr 3 16:09:44 2021 +++ src/sys/sys/device.h Sun Apr 4 19:12:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.167.2.7 2021/04/03 16:09:44 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.167.2.8 2021/04/04 19:12:28 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -529,10 +529,11 @@ struct pdevinit { * config_found(). */ typedef enum { - CFARG_SUBMATCH = 0, /* submatch function */ - CFARG_IATTR = 1, /* interface attribute */ - CFARG_LOCATORS = 2, /* locators array */ - CFARG_DEVHANDLE = 3, /* devhandle_t (by value) */ + CFARG_SUBMATCH = 0, /* submatch function (direct config) */ + CFARG_SEARCH = 1, /* search function (indirect config) */ + CFARG_IATTR = 2, /* interface attribute */ + CFARG_LOCATORS = 3, /* locators array */ + CFARG_DEVHANDLE = 4, /* devhandle_t (by value) */ CFARG_EOL = 0x } cfarg_t;
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sun Apr 4 17:43:53 UTC 2021 Modified Files: src/sys/arch/shark/ofw [thorpej-cfargs]: ofisapc.c ofisascr.c vlpci.c src/sys/dev/ofisa [thorpej-cfargs]: ofisa.c src/sys/dev/ofw [thorpej-cfargs]: ofbus.c Log Message: Associate the OpenFirmware phandle associated with a found device (including PCI bus instances) by using CFARG_DEVHANDLE. To generate a diff of this commit: cvs rdiff -u -r1.11.68.1 -r1.11.68.2 src/sys/arch/shark/ofw/ofisapc.c cvs rdiff -u -r1.10.68.1 -r1.10.68.2 src/sys/arch/shark/ofw/ofisascr.c cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/sys/arch/shark/ofw/vlpci.c cvs rdiff -u -r1.30.2.1 -r1.30.2.2 src/sys/dev/ofisa/ofisa.c cvs rdiff -u -r1.26.30.1 -r1.26.30.2 src/sys/dev/ofw/ofbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/shark/ofw/ofisapc.c diff -u src/sys/arch/shark/ofw/ofisapc.c:1.11.68.1 src/sys/arch/shark/ofw/ofisapc.c:1.11.68.2 --- src/sys/arch/shark/ofw/ofisapc.c:1.11.68.1 Sun Mar 21 21:09:07 2021 +++ src/sys/arch/shark/ofw/ofisapc.c Sun Apr 4 17:43:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofisapc.c,v 1.11.68.1 2021/03/21 21:09:07 thorpej Exp $ */ +/* $NetBSD: ofisapc.c,v 1.11.68.2 2021/04/04 17:43:52 thorpej Exp $ */ /* * Copyright 1997 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofisapc.c,v 1.11.68.1 2021/03/21 21:09:07 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofisapc.c,v 1.11.68.2 2021/04/04 17:43:52 thorpej Exp $"); #include #include @@ -120,5 +120,7 @@ ofisapcattach(device_t parent, device_t ia.ia_aux = (void *)oba->oba_phandle; - config_found(dev, &ia, NULL, CFARG_EOL); + config_found(dev, &ia, NULL, + CFARG_DEVHANDLE, devhandle_from_of(oba->oba_phandle), + CFARG_EOL); } Index: src/sys/arch/shark/ofw/ofisascr.c diff -u src/sys/arch/shark/ofw/ofisascr.c:1.10.68.1 src/sys/arch/shark/ofw/ofisascr.c:1.10.68.2 --- src/sys/arch/shark/ofw/ofisascr.c:1.10.68.1 Sun Mar 21 21:09:07 2021 +++ src/sys/arch/shark/ofw/ofisascr.c Sun Apr 4 17:43:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofisascr.c,v 1.10.68.1 2021/03/21 21:09:07 thorpej Exp $ */ +/* $NetBSD: ofisascr.c,v 1.10.68.2 2021/04/04 17:43:52 thorpej Exp $ */ /* * Copyright 1997 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofisascr.c,v 1.10.68.1 2021/03/21 21:09:07 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofisascr.c,v 1.10.68.2 2021/04/04 17:43:52 thorpej Exp $"); #include #include @@ -104,5 +104,7 @@ ofisascrattach(device_t parent, device_t ia.ia_aux = (void *)oba->oba_phandle; - config_found(dev, &ia, NULL, CFARG_EOL); + config_found(dev, &ia, NULL, + CFARG_DEVHANDLE, devhandle_from_of(oba->oba_phandle), + CFARG_EOL); } Index: src/sys/arch/shark/ofw/vlpci.c diff -u src/sys/arch/shark/ofw/vlpci.c:1.10.2.1 src/sys/arch/shark/ofw/vlpci.c:1.10.2.2 --- src/sys/arch/shark/ofw/vlpci.c:1.10.2.1 Tue Mar 23 07:14:51 2021 +++ src/sys/arch/shark/ofw/vlpci.c Sun Apr 4 17:43:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vlpci.c,v 1.10.2.1 2021/03/23 07:14:51 thorpej Exp $ */ +/* $NetBSD: vlpci.c,v 1.10.2.2 2021/04/04 17:43:53 thorpej Exp $ */ /* * Copyright (c) 2017 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vlpci.c,v 1.10.2.1 2021/03/23 07:14:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vlpci.c,v 1.10.2.2 2021/04/04 17:43:53 thorpej Exp $"); #include "opt_pci.h" #include "pci.h" @@ -202,6 +202,7 @@ vlpci_match(device_t parent, struct cfda static void vlpci_attach(device_t parent, device_t self, void *aux) { + struct ofbus_attach_args * const oba = aux; struct vlpci_softc * const sc = device_private(self); pci_chipset_tag_t const pc = &sc->sc_pc; struct pcibus_attach_args pba; @@ -327,7 +328,9 @@ vlpci_attach(device_t parent, device_t s vlpci_dump_window(sc, VLPCI_PCI_WND_NO_2); vlpci_dump_window(sc, VLPCI_PCI_WND_NO_3); - config_found(self, &pba, pcibusprint, CFARG_EOL); + config_found(self, &pba, pcibusprint, + CFARG_DEVHANDLE, devhandle_from_of(oba->oba_phandle), + CFARG_EOL); } static void Index: src/sys/dev/ofisa/ofisa.c diff -u src/sys/dev/ofisa/ofisa.c:1.30.2.1 src/sys/dev/ofisa/ofisa.c:1.30.2.2 --- src/sys/dev/ofisa/ofisa.c:1.30.2.1 Sun Mar 21 21:09:13 2021 +++ src/sys/dev/ofisa/ofisa.c Sun Apr 4 17:43:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofisa.c,v 1.30.2.1 2021/03/21 21:09:13 thorpej Exp $ */ +/* $NetBSD: ofisa.c,v 1.30.2.2 2021/04/04 17:43:52 thorpej Exp $ */ /* * Copyright 1997, 1998 @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.30.2.1 2021/03/21 21:09:13 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofisa.c,v 1.30.2.2 2021/04/04 17:43:52 thorpej Exp $"); #include #include @@ -131,7 +131,9 @@ ofisaattach(device_t parent, device_t se aa.dmat = iba.iba_dmat; aa.ic = iba.iba_ic; - config_found(self, &aa, ofisaprint, CFARG_EOL)
CVS commit: [thorpej-cfargs] src/sys/arch/macppc
Module Name:src Committed By: thorpej Date: Sun Apr 4 17:28:03 UTC 2021 Modified Files: src/sys/arch/macppc/dev [thorpej-cfargs]: gpio.c mediabay.c obio.c smu.c uni-n.c src/sys/arch/macppc/macppc [thorpej-cfargs]: mainbus.c src/sys/arch/macppc/pci [thorpej-cfargs]: bandit.c grackle.c u3.c uninorth.c Log Message: Associate the OpenFirmware phandle associated with a found device (including PCI bus instances) by using CFARG_DEVHANDLE. To generate a diff of this commit: cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/sys/arch/macppc/dev/gpio.c cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/arch/macppc/dev/mediabay.c cvs rdiff -u -r1.48.2.1 -r1.48.2.2 src/sys/arch/macppc/dev/obio.c cvs rdiff -u -r1.12.2.1 -r1.12.2.2 src/sys/arch/macppc/dev/smu.c cvs rdiff -u -r1.9.16.1 -r1.9.16.2 src/sys/arch/macppc/dev/uni-n.c cvs rdiff -u -r1.22.10.1 -r1.22.10.2 src/sys/arch/macppc/macppc/mainbus.c cvs rdiff -u -r1.32.32.1 -r1.32.32.2 src/sys/arch/macppc/pci/bandit.c cvs rdiff -u -r1.16.32.1 -r1.16.32.2 src/sys/arch/macppc/pci/grackle.c cvs rdiff -u -r1.9.16.1 -r1.9.16.2 src/sys/arch/macppc/pci/u3.c cvs rdiff -u -r1.20.16.1 -r1.20.16.2 src/sys/arch/macppc/pci/uninorth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/dev/gpio.c diff -u src/sys/arch/macppc/dev/gpio.c:1.13.2.1 src/sys/arch/macppc/dev/gpio.c:1.13.2.2 --- src/sys/arch/macppc/dev/gpio.c:1.13.2.1 Sun Mar 21 21:09:02 2021 +++ src/sys/arch/macppc/dev/gpio.c Sun Apr 4 17:28:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.13.2.1 2021/03/21 21:09:02 thorpej Exp $ */ +/* $NetBSD: gpio.c,v 1.13.2.2 2021/04/04 17:28:02 thorpej Exp $ */ /*- * Copyright (C) 1998 Internet Research Institute, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.13.2.1 2021/03/21 21:09:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.13.2.2 2021/04/04 17:28:02 thorpej Exp $"); #include #include @@ -119,7 +119,9 @@ gpio_obio_attach(device_t parent, device ca2.ca_reg = reg; ca2.ca_intr = intr; - config_found(self, &ca2, gpio_obio_print, CFARG_EOL); + config_found(self, &ca2, gpio_obio_print, + CFARG_DEVHANDLE, devhandle_from_of(child), + CFARG_EOL); } } Index: src/sys/arch/macppc/dev/mediabay.c diff -u src/sys/arch/macppc/dev/mediabay.c:1.24.2.1 src/sys/arch/macppc/dev/mediabay.c:1.24.2.2 --- src/sys/arch/macppc/dev/mediabay.c:1.24.2.1 Sun Mar 21 21:09:02 2021 +++ src/sys/arch/macppc/dev/mediabay.c Sun Apr 4 17:28:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mediabay.c,v 1.24.2.1 2021/03/21 21:09:02 thorpej Exp $ */ +/* $NetBSD: mediabay.c,v 1.24.2.2 2021/04/04 17:28:02 thorpej Exp $ */ /*- * Copyright (C) 1999 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mediabay.c,v 1.24.2.1 2021/03/21 21:09:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mediabay.c,v 1.24.2.2 2021/04/04 17:28:02 thorpej Exp $"); #include #include @@ -244,6 +244,7 @@ mediabay_attach_content(struct mediabay_ ca.ca_intr = intr; content = config_found(sc->sc_dev, &ca, mediabay_print, + CFARG_DEVHANDLE, devhandle_from_of(child), CFARG_EOL); if (content) { sc->sc_content = content; Index: src/sys/arch/macppc/dev/obio.c diff -u src/sys/arch/macppc/dev/obio.c:1.48.2.1 src/sys/arch/macppc/dev/obio.c:1.48.2.2 --- src/sys/arch/macppc/dev/obio.c:1.48.2.1 Sun Mar 21 21:09:02 2021 +++ src/sys/arch/macppc/dev/obio.c Sun Apr 4 17:28:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.48.2.1 2021/03/21 21:09:02 thorpej Exp $ */ +/* $NetBSD: obio.c,v 1.48.2.2 2021/04/04 17:28:02 thorpej Exp $ */ /*- * Copyright (C) 1998 Internet Research Institute, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.48.2.1 2021/03/21 21:09:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.48.2.2 2021/04/04 17:28:02 thorpej Exp $"); #include #include @@ -271,7 +271,9 @@ obio_attach(device_t parent, device_t se ca.ca_reg = reg; ca.ca_intr = intr; - config_found(self, &ca, obio_print, CFARG_EOL); + config_found(self, &ca, obio_print, + CFARG_DEVHANDLE, devhandle_from_of(child), + CFARG_EOL); } } Index: src/sys/arch/macppc/dev/smu.c diff -u src/sys/arch/macppc/dev/smu.c:1.12.2.1 src/sys/arch/macppc/dev/smu.c:1.12.2.2 --- src/sys/arch/macppc/dev/smu.c:1.12.2.1 Tue Mar 23 07:14:48 2021 +++ src/sys/arch/macppc/dev/smu.c Sun Apr 4 17:28:02 2021 @@ -477,7 +477,9 @@ smu_setup_iicbus(struct smu_softc *sc) ca.ca_name = name; ca.ca_node = node; ca.ca_tag = i2c; - config_found(sc->sc_dev, &ca, smu_iicbus_print, CFARG_EOL); + config_found(sc->sc_dev, &ca, smu_iicbus_print, + CFARG_DEVHANDLE, devhandle_from_of(node), + CFARG_EOL); sc->sc_num_iicbus++; } Index: src/sys/arch/macppc/dev/uni-n.c diff -u src/sys/arch/macppc/dev/uni-n.c:1.9.16.1 src/sys/
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Apr 3 21:45:01 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64 [thorpej-cfargs]: aarch64_machdep.c efi_machdep.c locore.S pmapboot.c vm_machdep.c src/sys/arch/aarch64/include [thorpej-cfargs]: asan.h cpu.h pmap.h types.h vmparam.h src/sys/arch/alpha/alpha [thorpej-cfargs]: pmap.c src/sys/arch/alpha/include [thorpej-cfargs]: lock.h src/sys/arch/amd64/include [thorpej-cfargs]: types.h src/sys/arch/amiga/include [thorpej-cfargs]: types.h src/sys/arch/arm/arm32 [thorpej-cfargs]: arm32_kvminit.c pmap.c vm_machdep.c src/sys/arch/arm/cortex [thorpej-cfargs]: gic.c gicv3.c src/sys/arch/arm/include [thorpej-cfargs]: cpu.h src/sys/arch/arm/omap [thorpej-cfargs]: ti_iic.c src/sys/arch/arm/pic [thorpej-cfargs]: pic.c pic_splfuncs.c picvar.h src/sys/arch/atari/include [thorpej-cfargs]: intr.h types.h src/sys/arch/bebox/include [thorpej-cfargs]: types.h src/sys/arch/cats/include [thorpej-cfargs]: types.h src/sys/arch/cesfic/cesfic [thorpej-cfargs]: isr.c src/sys/arch/cesfic/include [thorpej-cfargs]: types.h src/sys/arch/emips/include [thorpej-cfargs]: types.h src/sys/arch/evbarm/bcm53xx [thorpej-cfargs]: bcm53xx_machdep.c src/sys/arch/evbarm/beagle [thorpej-cfargs]: beagle_machdep.c src/sys/arch/evbarm/conf [thorpej-cfargs]: Makefile.evbarm.inc std.generic std.rpi src/sys/arch/evbarm/include [thorpej-cfargs]: types.h src/sys/arch/evbarm/rpi [thorpej-cfargs]: vcio.h src/sys/arch/evbarm/zynq [thorpej-cfargs]: zynq_machdep.c src/sys/arch/evbppc/conf [thorpej-cfargs]: Makefile.virtex.inc Makefile.walnut.inc files.obs405 files.walnut src/sys/arch/evbppc/evbppc [thorpej-cfargs]: evbppc_machdep.c src/sys/arch/evbppc/explora [thorpej-cfargs]: machdep.c src/sys/arch/evbppc/include [thorpej-cfargs]: obs200.h obs266.h obs600.h src/sys/arch/evbppc/obs405 [thorpej-cfargs]: obs200_autoconf.c obs200_machdep.c obs266_autoconf.c obs266_machdep.c obs600_autoconf.c obs600_machdep.c src/sys/arch/evbppc/virtex [thorpej-cfargs]: autoconf.c consinit.c design_gsrd2.c machdep.c src/sys/arch/evbppc/virtex/dev [thorpej-cfargs]: if_temac.c tft_ll.c src/sys/arch/evbppc/walnut [thorpej-cfargs]: autoconf.c consinit.c machdep.c src/sys/arch/hpcsh/include [thorpej-cfargs]: types.h src/sys/arch/hppa/include [thorpej-cfargs]: types.h src/sys/arch/i386/include [thorpej-cfargs]: types.h src/sys/arch/ia64/include [thorpej-cfargs]: types.h src/sys/arch/landisk/include [thorpej-cfargs]: types.h src/sys/arch/luna68k/include [thorpej-cfargs]: types.h src/sys/arch/luna68k/luna68k [thorpej-cfargs]: isr.c locore.s src/sys/arch/m68k/include [thorpej-cfargs]: types.h src/sys/arch/mac68k/include [thorpej-cfargs]: types.h src/sys/arch/mac68k/mac68k [thorpej-cfargs]: intr.c src/sys/arch/macppc/conf [thorpej-cfargs]: POWERMAC_G5 src/sys/arch/mips/cavium/dev [thorpej-cfargs]: octeon_fpa.c src/sys/arch/mips/conf [thorpej-cfargs]: files.mips src/sys/arch/mips/include [thorpej-cfargs]: Makefile Makefile.inc cdefs.h cpu.h db_machdep.h frame.h types.h src/sys/arch/mips/mips [thorpej-cfargs]: mips_machdep.c mips_stacktrace.c trap.c src/sys/arch/mvme68k/include [thorpej-cfargs]: types.h src/sys/arch/mvme68k/mvme68k [thorpej-cfargs]: isr.c locore.s src/sys/arch/mvmeppc/include [thorpej-cfargs]: types.h src/sys/arch/netwinder/include [thorpej-cfargs]: types.h src/sys/arch/news68k/include [thorpej-cfargs]: types.h src/sys/arch/newsmips/include [thorpej-cfargs]: types.h src/sys/arch/next68k/include [thorpej-cfargs]: types.h src/sys/arch/next68k/next68k [thorpej-cfargs]: isr.c src/sys/arch/or1k/include [thorpej-cfargs]: types.h src/sys/arch/powerpc/booke [thorpej-cfargs]: booke_machdep.c src/sys/arch/powerpc/ibm4xx [thorpej-cfargs]: cpu.c ibm4xx_autoconf.c ibm4xx_machdep.c pmap.c src/sys/arch/powerpc/ibm4xx/dev [thorpej-cfargs]: emacreg.h if_emac.c src/sys/arch/powerpc/ibm4xx/openbios [thorpej-cfargs]: locore.S openbios.c src/sys/arch/powerpc/include [thorpej-cfargs]: types.h src/sys/arch/powerpc/include/ibm4xx [thorpej-cfargs]: cpu.h dcr4xx.h openbios.h tlb.h src/sys/arch/powerpc/oea [thorpej-cfargs]: cpu_subr.c ofwoea_machdep.c src/sys/arch/powerpc/pic [thorpej-cfargs]: intr.c picvar.h src/sys/arch/powerpc/powerpc [thorpej-cfargs]: db_interface.c src/sys/arch/prep/include [thorpej-cfargs]: types.h src/sys/arch/riscv
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Apr 3 21:21:08 UTC 2021 Modified Files: src/sys/arch/arm/acpi [thorpej-cfargs]: acpi_platform.c src/sys/arch/arm/altera [thorpej-cfargs]: cycv_platform.c src/sys/arch/arm/amlogic [thorpej-cfargs]: meson_platform.c src/sys/arch/arm/broadcom [thorpej-cfargs]: bcm283x_platform.c src/sys/arch/arm/fdt [thorpej-cfargs]: arm_platform.c src/sys/arch/arm/nvidia [thorpej-cfargs]: tegra_platform.c src/sys/arch/arm/nxp [thorpej-cfargs]: imx6_platform.c src/sys/arch/arm/rockchip [thorpej-cfargs]: rk_platform.c src/sys/arch/arm/samsung [thorpej-cfargs]: exynos_platform.c src/sys/arch/arm/sunxi [thorpej-cfargs]: sunxi_platform.c src/sys/arch/arm/ti [thorpej-cfargs]: omap3_platform.c src/sys/arch/arm/vexpress [thorpej-cfargs]: vexpress_platform.c src/sys/arch/arm/virt [thorpej-cfargs]: virt_platform.c src/sys/arch/arm/xilinx [thorpej-cfargs]: zynq_platform.c src/sys/dev/fdt [thorpej-cfargs]: fdtbus.c fdtvar.h src/sys/dev/ofw [thorpej-cfargs]: ofw_subr.c openfirm.h Log Message: - FDT device enumeration now sets the device handle using CFARG_DEVHANDLE. - fdtbus_device_register() is now obsolete, so G/C it. - of_device_register() is now obsolete, so G/C it. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/arch/arm/acpi/acpi_platform.c cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/arm/altera/cycv_platform.c cvs rdiff -u -r1.19 -r1.19.2.1 src/sys/arch/arm/amlogic/meson_platform.c cvs rdiff -u -r1.47 -r1.47.2.1 src/sys/arch/arm/broadcom/bcm283x_platform.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/arch/arm/fdt/arm_platform.c cvs rdiff -u -r1.26 -r1.26.2.1 src/sys/arch/arm/nvidia/tegra_platform.c cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/arch/arm/nxp/imx6_platform.c cvs rdiff -u -r1.11 -r1.11.2.1 src/sys/arch/arm/rockchip/rk_platform.c cvs rdiff -u -r1.37 -r1.37.2.1 src/sys/arch/arm/samsung/exynos_platform.c cvs rdiff -u -r1.42 -r1.42.2.1 src/sys/arch/arm/sunxi/sunxi_platform.c cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/arm/ti/omap3_platform.c cvs rdiff -u -r1.21 -r1.21.2.1 src/sys/arch/arm/vexpress/vexpress_platform.c cvs rdiff -u -r1.13 -r1.13.2.1 src/sys/arch/arm/virt/virt_platform.c cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/arch/arm/xilinx/zynq_platform.c cvs rdiff -u -r1.40.2.3 -r1.40.2.4 src/sys/dev/fdt/fdtbus.c cvs rdiff -u -r1.69 -r1.69.2.1 src/sys/dev/fdt/fdtvar.h cvs rdiff -u -r1.57 -r1.57.2.1 src/sys/dev/ofw/ofw_subr.c cvs rdiff -u -r1.46 -r1.46.2.1 src/sys/dev/ofw/openfirm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/acpi/acpi_platform.c diff -u src/sys/arch/arm/acpi/acpi_platform.c:1.24 src/sys/arch/arm/acpi/acpi_platform.c:1.24.2.1 --- src/sys/arch/arm/acpi/acpi_platform.c:1.24 Fri Feb 12 12:26:09 2021 +++ src/sys/arch/arm/acpi/acpi_platform.c Sat Apr 3 21:21:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_platform.c,v 1.24 2021/02/12 12:26:09 jmcneill Exp $ */ +/* $NetBSD: acpi_platform.c,v 1.24.2.1 2021/04/03 21:21:07 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.24 2021/02/12 12:26:09 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.24.2.1 2021/04/03 21:21:07 thorpej Exp $"); #include #include @@ -287,9 +287,7 @@ acpi_platform_init_attach_args(struct fd static void acpi_platform_device_register(device_t self, void *aux) { - /* XXX Not ideal, but the only reasonable solution atm. */ acpi_device_register(self, aux); - fdtbus_device_register(self, aux); #if NCOM > 0 prop_dictionary_t prop = device_properties(self); Index: src/sys/arch/arm/altera/cycv_platform.c diff -u src/sys/arch/arm/altera/cycv_platform.c:1.17 src/sys/arch/arm/altera/cycv_platform.c:1.17.2.1 --- src/sys/arch/arm/altera/cycv_platform.c:1.17 Thu Feb 4 22:36:52 2021 +++ src/sys/arch/arm/altera/cycv_platform.c Sat Apr 3 21:21:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cycv_platform.c,v 1.17 2021/02/04 22:36:52 thorpej Exp $ */ +/* $NetBSD: cycv_platform.c,v 1.17.2.1 2021/04/03 21:21:07 thorpej Exp $ */ /* This file is in the public domain. */ @@ -7,7 +7,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.17 2021/02/04 22:36:52 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.17.2.1 2021/04/03 21:21:07 thorpej Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -141,8 +141,6 @@ cycv_platform_device_register(device_t d { prop_dictionary_t dict = device_properties(dev); - fdtbus_device_register(dev, aux); - if (device_is_a(dev, "arma9tmr")) { prop_dictionary_set_uint32(dict, "frequency", cycv_clkmgr_early_get_mpu_clk() / 4); Index: src/sys/arch/arm/amlogic/meson_platform.c diff -u src/sys/ar
CVS commit: [thorpej-cfargs] src/sys/dev/acpi
Module Name:src Committed By: thorpej Date: Sat Apr 3 16:10:39 UTC 2021 Modified Files: src/sys/dev/acpi [thorpej-cfargs]: acpi.c Log Message: Pass CFARG_DEVHANDLE to config_found(), rather than setting the device handle in acpi_device_register(). To generate a diff of this commit: cvs rdiff -u -r1.290.2.2 -r1.290.2.3 src/sys/dev/acpi/acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.290.2.2 src/sys/dev/acpi/acpi.c:1.290.2.3 --- src/sys/dev/acpi/acpi.c:1.290.2.2 Fri Apr 2 22:17:43 2021 +++ src/sys/dev/acpi/acpi.c Sat Apr 3 16:10:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.290.2.2 2021/04/02 22:17:43 thorpej Exp $ */ +/* $NetBSD: acpi.c,v 1.290.2.3 2021/04/03 16:10:39 thorpej Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.290.2.2 2021/04/02 22:17:43 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.290.2.3 2021/04/03 16:10:39 thorpej Exp $"); #include "pci.h" #include "opt_acpi.h" @@ -951,6 +951,8 @@ acpi_rescan_early(struct acpi_softc *sc) if (acpi_match_hid(ad->ad_devinfo, acpi_early_ids) == 0) continue; + KASSERT(ad->ad_handle != NULL); + aa.aa_node = ad; aa.aa_iot = sc->sc_iot; aa.aa_memt = sc->sc_memt; @@ -964,6 +966,7 @@ acpi_rescan_early(struct acpi_softc *sc) ad->ad_device = config_found(sc->sc_dev, &aa, acpi_print, CFARG_IATTR, "acpinodebus", + CFARG_DEVHANDLE, devhandle_from_acpi(ad->ad_handle), CFARG_EOL); } } @@ -1016,6 +1019,8 @@ acpi_rescan_nodes(struct acpi_softc *sc) if (acpi_match_hid(di, hpet_ids) != 0 && sc->sc_hpet != NULL) continue; + KASSERT(ad->ad_handle != NULL); + aa.aa_node = ad; aa.aa_iot = sc->sc_iot; aa.aa_memt = sc->sc_memt; @@ -1029,6 +1034,7 @@ acpi_rescan_nodes(struct acpi_softc *sc) ad->ad_device = config_found(sc->sc_dev, &aa, acpi_print, CFARG_IATTR, "acpinodebus", + CFARG_DEVHANDLE, devhandle_from_acpi(ad->ad_handle), CFARG_EOL); } } @@ -1151,14 +1157,7 @@ acpi_device_register(device_t dev, void device_t parent = device_parent(dev); ACPI_HANDLE hdl = NULL; - /* - * aa_node is only valid if we attached to the "acpinodebus" - * interface attribute. - */ - if (device_attached_to_iattr(dev, "acpinodebus")) { - const struct acpi_attach_args *aa = v; - hdl = aa->aa_node->ad_handle; - } else if (device_is_a(parent, "pci")) { + if (device_is_a(parent, "pci")) { const struct pci_attach_args *pa = v; struct acpi_devnode *ad; u_int segment;
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Apr 3 16:09:44 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c src/sys/sys [thorpej-cfargs]: device.h Log Message: Add CFARG_DEVHANDLE, allowing direct configuration using e.g. ACPI or OpenFirmware / FDT to associate the handle with the device_t. To generate a diff of this commit: cvs rdiff -u -r1.277.2.9 -r1.277.2.10 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.167.2.6 -r1.167.2.7 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.9 src/sys/kern/subr_autoconf.c:1.277.2.10 --- src/sys/kern/subr_autoconf.c:1.277.2.9 Sat Apr 3 15:37:07 2021 +++ src/sys/kern/subr_autoconf.c Sat Apr 3 16:09:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.9 2021/04/03 15:37:07 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.10 2021/04/03 16:09:44 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.9 2021/04/03 15:37:07 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.10 2021/04/03 16:09:44 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1025,11 +1025,15 @@ config_get_cfargs(cfarg_t tag, cfsubmatch_t *fnp, /* output */ const char **ifattrp, /* output */ const int **locsp, /* output */ + devhandle_t *handlep, /* output */ va_list ap) { cfsubmatch_t fn = NULL; const char *ifattr = NULL; const int *locs = NULL; + devhandle_t handle; + + devhandle_invalidate(&handle); while (tag != CFARG_EOL) { switch (tag) { @@ -1045,6 +1049,10 @@ config_get_cfargs(cfarg_t tag, locs = va_arg(ap, const int *); break; + case CFARG_DEVHANDLE: + handle = va_arg(ap, devhandle_t); + break; + default: /* XXX panic? */ /* XXX dump stack backtrace? */ @@ -1062,6 +1070,8 @@ config_get_cfargs(cfarg_t tag, *ifattrp = ifattr; if (locsp != NULL) *locsp = locs; + if (handlep != NULL) + *handlep = handle; } /* @@ -1085,7 +1095,7 @@ config_vsearch(device_t parent, void *au cfdata_t cf; struct matchinfo m; - config_get_cfargs(tag, &fn, &ifattr, &locs, ap); + config_get_cfargs(tag, &fn, &ifattr, &locs, NULL, ap); KASSERT(config_initialized); KASSERT(!ifattr || cfdriver_get_iattr(parent->dv_cfdriver, ifattr)); @@ -1471,8 +1481,6 @@ config_vdevalloc(const device_t parent, device_lock_t dvl; const int *locs; - config_get_cfargs(tag, NULL, NULL, &locs, ap); - cd = config_cfdriver_lookup(cf->cf_name); if (cd == NULL) return NULL; @@ -1490,6 +1498,13 @@ config_vdevalloc(const device_t parent, } dev = kmem_zalloc(sizeof(*dev), KM_SLEEP); + /* + * If a handle was supplied to config_attach(), we'll get it + * assigned automatically here. If not, then we'll get the + * default invalid handle. + */ + config_get_cfargs(tag, NULL, NULL, &locs, &dev->dv_handle, ap); + dev->dv_class = cd->cd_class; dev->dv_cfdata = cf; dev->dv_cfdriver = cd; Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.167.2.6 src/sys/sys/device.h:1.167.2.7 --- src/sys/sys/device.h:1.167.2.6 Sat Apr 3 06:54:29 2021 +++ src/sys/sys/device.h Sat Apr 3 16:09:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.167.2.6 2021/04/03 06:54:29 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.167.2.7 2021/04/03 16:09:44 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -532,6 +532,7 @@ typedef enum { CFARG_SUBMATCH = 0, /* submatch function */ CFARG_IATTR = 1, /* interface attribute */ CFARG_LOCATORS = 2, /* locators array */ + CFARG_DEVHANDLE = 3, /* devhandle_t (by value) */ CFARG_EOL = 0x } cfarg_t;
CVS commit: [thorpej-cfargs] src/sys/kern
Module Name:src Committed By: thorpej Date: Sat Apr 3 15:37:07 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c Log Message: - Give config_devalloc() the tagged variadic argument treatment. - Only extract the values from the variadic argument list if we're going to use them locally. If not, just pass them along (using va_copy() if necessary). This serves to future-proof the intermediaries as new cfarg_t tag values are added in the future. To generate a diff of this commit: cvs rdiff -u -r1.277.2.8 -r1.277.2.9 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.8 src/sys/kern/subr_autoconf.c:1.277.2.9 --- src/sys/kern/subr_autoconf.c:1.277.2.8 Sat Apr 3 06:54:29 2021 +++ src/sys/kern/subr_autoconf.c Sat Apr 3 15:37:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.8 2021/04/03 06:54:29 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.9 2021/04/03 15:37:07 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.8 2021/04/03 06:54:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.9 2021/04/03 15:37:07 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -168,7 +168,8 @@ struct alldevs_foray { static char *number(char *, int); static void mapply(struct matchinfo *, cfdata_t); -static device_t config_devalloc(const device_t, const cfdata_t, const int *); +static device_t config_vattach(device_t, cfdata_t, void *, cfprint_t, cfarg_t, + va_list); static void config_devdelete(device_t); static void config_devunlink(device_t, struct devicelist *); static void config_makeroom(int, struct cfdriver *); @@ -1189,20 +1190,17 @@ static device_t config_vfound(device_t parent, void *aux, cfprint_t print, cfarg_t tag, va_list ap) { - cfsubmatch_t submatch; - const char *ifattr; - const int *locs; cfdata_t cf; + va_list nap; + + va_copy(nap, ap); + cf = config_vsearch(parent, aux, tag, nap); + va_end(nap); - config_get_cfargs(tag, &submatch, &ifattr, &locs, ap); + if (cf != NULL) { + return config_vattach(parent, cf, aux, print, tag, ap); + } - if ((cf = config_search(parent, aux, -CFARG_SUBMATCH, submatch, -CFARG_IATTR, ifattr, -CFARG_LOCATORS, locs, -CFARG_EOL))) - return config_attach(parent, cf, aux, print, - CFARG_LOCATORS, locs); if (print) { if (config_do_twiddle && cold) twiddle(); @@ -1458,7 +1456,8 @@ config_unit_alloc(device_t dev, cfdriver } static device_t -config_devalloc(const device_t parent, const cfdata_t cf, const int *locs) +config_vdevalloc(const device_t parent, const cfdata_t cf, cfarg_t tag, +va_list ap) { cfdriver_t cd; cfattach_t ca; @@ -1470,6 +1469,9 @@ config_devalloc(const device_t parent, c void *dev_private; const struct cfiattrdata *ia; device_lock_t dvl; + const int *locs; + + config_get_cfargs(tag, NULL, NULL, &locs, ap); cd = config_cfdriver_lookup(cf->cf_name); if (cd == NULL) @@ -1508,7 +1510,7 @@ config_devalloc(const device_t parent, c xunit = number(&num[sizeof(num)], myunit); lunit = &num[sizeof(num)] - xunit; if (lname + lunit > sizeof(dev->dv_xname)) - panic("config_devalloc: device name too long"); + panic("config_vdevalloc: device name too long"); dvl = device_getlock(dev); @@ -1549,6 +1551,19 @@ config_devalloc(const device_t parent, c return dev; } +static device_t +config_devalloc(const device_t parent, const cfdata_t cf, cfarg_t tag, ...) +{ + device_t dev; + va_list ap; + + va_start(ap, tag); + dev = config_vdevalloc(parent, cf, tag, ap); + va_end(ap); + + return dev; +} + /* * Create an array of device attach attributes and add it * to the device's dv_properties dictionary. @@ -1638,11 +1653,8 @@ config_vattach(device_t parent, cfdata_t device_t dev; struct cftable *ct; const char *drvname; - const int *locs; - - config_get_cfargs(tag, NULL, NULL, &locs, ap); - dev = config_devalloc(parent, cf, locs); + dev = config_vdevalloc(parent, cf, tag, ap); if (!dev) panic("config_attach: allocation of device softc failed"); @@ -1735,7 +1747,7 @@ config_attach_pseudo(cfdata_t cf) { device_t dev; - dev = config_devalloc(ROOT, cf, NULL); + dev = config_devalloc(ROOT, cf, CFARG_EOL); if (!dev) return NULL;
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Apr 3 06:54:29 UTC 2021 Modified Files: src/sys/arch/powerpc/booke/dev [thorpej-cfargs]: pq3obio.c src/sys/arch/x86/pci [thorpej-cfargs]: amdpcib.c amdsmn.c src/sys/dev/audio [thorpej-cfargs]: audio.c src/sys/dev/fdt [thorpej-cfargs]: fdtbus.c src/sys/dev/gpio [thorpej-cfargs]: gpio.c src/sys/dev/ic [thorpej-cfargs]: apple_smc.c src/sys/dev/isa [thorpej-cfargs]: isa.c pcppi.c src/sys/dev/scsipi [thorpej-cfargs]: scsiconf.c src/sys/kern [thorpej-cfargs]: subr_autoconf.c src/sys/sys [thorpej-cfargs]: device.h Log Message: config_attach_loc() -> config_attach() with CFARG_LOCATORS argument. To generate a diff of this commit: cvs rdiff -u -r1.5.4.2 -r1.5.4.3 src/sys/arch/powerpc/booke/dev/pq3obio.c cvs rdiff -u -r1.3.96.1 -r1.3.96.2 src/sys/arch/x86/pci/amdpcib.c cvs rdiff -u -r1.10.4.3 -r1.10.4.4 src/sys/arch/x86/pci/amdsmn.c cvs rdiff -u -r1.91.2.4 -r1.91.2.5 src/sys/dev/audio/audio.c cvs rdiff -u -r1.40.2.2 -r1.40.2.3 src/sys/dev/fdt/fdtbus.c cvs rdiff -u -r1.64.10.6 -r1.64.10.7 src/sys/dev/gpio/gpio.c cvs rdiff -u -r1.6.50.2 -r1.6.50.3 src/sys/dev/ic/apple_smc.c cvs rdiff -u -r1.138.76.4 -r1.138.76.5 src/sys/dev/isa/isa.c cvs rdiff -u -r1.45.22.3 -r1.45.22.4 src/sys/dev/isa/pcppi.c cvs rdiff -u -r1.290.4.3 -r1.290.4.4 src/sys/dev/scsipi/scsiconf.c cvs rdiff -u -r1.277.2.7 -r1.277.2.8 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.167.2.5 -r1.167.2.6 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/dev/pq3obio.c diff -u src/sys/arch/powerpc/booke/dev/pq3obio.c:1.5.4.2 src/sys/arch/powerpc/booke/dev/pq3obio.c:1.5.4.3 --- src/sys/arch/powerpc/booke/dev/pq3obio.c:1.5.4.2 Sun Mar 21 17:35:46 2021 +++ src/sys/arch/powerpc/booke/dev/pq3obio.c Sat Apr 3 06:54:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3obio.c,v 1.5.4.2 2021/03/21 17:35:46 thorpej Exp $ */ +/* $NetBSD: pq3obio.c,v 1.5.4.3 2021/04/03 06:54:28 thorpej Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -37,7 +37,7 @@ #define LBC_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: pq3obio.c,v 1.5.4.2 2021/03/21 17:35:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3obio.c,v 1.5.4.3 2021/04/03 06:54:28 thorpej Exp $"); #include "locators.h" @@ -151,7 +151,9 @@ pq3obio_search(device_t parent, cfdata_t [OBIOCF_IRQ] = ga.ga_irq, [OBIOCF_CS] = ga.ga_cs, }; - config_attach_loc(parent, cf, floc, &ga, pq3obio_print); + config_attach(parent, cf, &ga, pq3obio_print, + CFARG_LOCATORS, floc, + CFARG_EOL); tryagain = (cf->cf_fstate == FSTATE_STAR); } } while (tryagain); Index: src/sys/arch/x86/pci/amdpcib.c diff -u src/sys/arch/x86/pci/amdpcib.c:1.3.96.1 src/sys/arch/x86/pci/amdpcib.c:1.3.96.2 --- src/sys/arch/x86/pci/amdpcib.c:1.3.96.1 Sat Mar 20 19:33:39 2021 +++ src/sys/arch/x86/pci/amdpcib.c Sat Apr 3 06:54:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdpcib.c,v 1.3.96.1 2021/03/20 19:33:39 thorpej Exp $ */ +/* $NetBSD: amdpcib.c,v 1.3.96.2 2021/04/03 06:54:28 thorpej Exp $ */ /* * Copyright (c) 2006 Nicolas Joly @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdpcib.c,v 1.3.96.1 2021/03/20 19:33:39 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdpcib.c,v 1.3.96.2 2021/04/03 06:54:28 thorpej Exp $"); #include #include @@ -83,7 +83,9 @@ amdpcib_search(device_t parent, cfdata_t { if (config_match(parent, cf, aux)) - config_attach_loc(parent, cf, locs, aux, NULL); + config_attach(parent, cf, aux, NULL, + CFARG_LOCATORS, locs, + CFARG_EOL); return 0; } Index: src/sys/arch/x86/pci/amdsmn.c diff -u src/sys/arch/x86/pci/amdsmn.c:1.10.4.3 src/sys/arch/x86/pci/amdsmn.c:1.10.4.4 --- src/sys/arch/x86/pci/amdsmn.c:1.10.4.3 Sun Mar 28 01:03:19 2021 +++ src/sys/arch/x86/pci/amdsmn.c Sat Apr 3 06:54:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ */ +/* $NetBSD: amdsmn.c,v 1.10.4.4 2021/04/03 06:54:28 thorpej Exp $ */ /*- * Copyright (c) 2017, 2019 Conrad Meyer @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.4 2021/04/03 06:54:28 thorpej Exp $ "); /* * Driver for the AMD Family 15h (model 60+) and 17h CPU @@ -123,7 +123,9 @@ static int amdsmn_misc_search(device_t parent, cfdata_t cf, const int *locs, void *aux) { if (config_match(parent, cf, aux)) - config_attach_loc(parent, cf, locs, aux, NULL); + config_attach(parent, cf, aux, NULL, + CFARG_LOCATORS, locs, + CFARG_EOL); return 0; } Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.91.2.4 src/sys/dev/audio/audio.c:1.91.2.5 --- src/sys/dev/audio/audio.c:1.91.2.4 Sun Mar 28 19:55:37 2021 +++
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sat Apr 3 01:52:16 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: ismt.c Log Message: ismt_config_interrupts(): remove a now-unused variable. To generate a diff of this commit: cvs rdiff -u -r1.7.10.1 -r1.7.10.2 src/sys/dev/pci/ismt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ismt.c diff -u src/sys/dev/pci/ismt.c:1.7.10.1 src/sys/dev/pci/ismt.c:1.7.10.2 --- src/sys/dev/pci/ismt.c:1.7.10.1 Wed Mar 24 14:21:08 2021 +++ src/sys/dev/pci/ismt.c Sat Apr 3 01:52:16 2021 @@ -60,7 +60,7 @@ #if 0 __FBSDID("$FreeBSD: head/sys/dev/ismt/ismt.c 266474 2014-05-20 19:55:06Z jimharris $"); #endif -__KERNEL_RCSID(0, "$NetBSD: ismt.c,v 1.7.10.1 2021/03/24 14:21:08 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ismt.c,v 1.7.10.2 2021/04/03 01:52:16 thorpej Exp $"); #include #include @@ -810,7 +810,6 @@ ismt_rescan(device_t self, const char *i static void ismt_config_interrupts(device_t self) { - int flags = 0; ismt_rescan(self, NULL, NULL); }
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Wed Mar 31 01:44:59 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: voodoofb.c Log Message: There are two interface attriubtues on this device, so we need to be explcit about it in BOTH config_found() calls. To generate a diff of this commit: cvs rdiff -u -r1.53.10.1 -r1.53.10.2 src/sys/dev/pci/voodoofb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/voodoofb.c diff -u src/sys/dev/pci/voodoofb.c:1.53.10.1 src/sys/dev/pci/voodoofb.c:1.53.10.2 --- src/sys/dev/pci/voodoofb.c:1.53.10.1 Sun Mar 21 21:09:14 2021 +++ src/sys/dev/pci/voodoofb.c Wed Mar 31 01:44:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: voodoofb.c,v 1.53.10.1 2021/03/21 21:09:14 thorpej Exp $ */ +/* $NetBSD: voodoofb.c,v 1.53.10.2 2021/03/31 01:44:59 thorpej Exp $ */ /* * Copyright (c) 2005, 2006, 2012 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53.10.1 2021/03/21 21:09:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53.10.2 2021/03/31 01:44:59 thorpej Exp $"); #include #include @@ -546,8 +546,12 @@ voodoofb_attach(device_t parent, device_ aa.accessops = &voodoofb_accessops; aa.accesscookie = &sc->vd; - config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); - config_found_ia(self, "drm", aux, voodoofb_drm_print); + config_found(self, &aa, wsemuldisplaydevprint, + CFARG_IATTR, "wsemuldisplaydev", + CFARG_EOL); + config_found(self, aux, voodoofb_drm_print, + CFARG_IATTR, "drm", + CFARG_EOL); } static int
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:41:04 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: mfii.c mpii.c Log Message: No need to pass interface attribute or locators to config_found(). To generate a diff of this commit: cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/sys/dev/pci/mfii.c cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/mfii.c diff -u src/sys/dev/pci/mfii.c:1.7.4.2 src/sys/dev/pci/mfii.c:1.7.4.3 --- src/sys/dev/pci/mfii.c:1.7.4.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/mfii.c Sun Mar 28 20:41:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mfii.c,v 1.7.4.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: mfii.c,v 1.7.4.3 2021/03/28 20:41:04 thorpej Exp $ */ /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.7.4.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.7.4.3 2021/03/28 20:41:04 thorpej Exp $"); #include "bio.h" @@ -988,13 +988,11 @@ static int mfii_rescan(device_t self, const char *ifattr, const int *locators) { struct mfii_softc *sc = device_private(self); + if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, - CFARG_EOL); + sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL); return 0; } Index: src/sys/dev/pci/mpii.c diff -u src/sys/dev/pci/mpii.c:1.27.2.2 src/sys/dev/pci/mpii.c:1.27.2.3 --- src/sys/dev/pci/mpii.c:1.27.2.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/mpii.c Sun Mar 28 20:41:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.27.2.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: mpii.c,v 1.27.2.3 2021/03/28 20:41:04 thorpej Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.27.2.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.27.2.3 2021/03/28 20:41:04 thorpej Exp $"); #include "bio.h" @@ -726,10 +726,7 @@ mpii_rescan(device_t self, const char *i if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, - CFARG_EOL); + sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/gpio
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:40:30 UTC 2021 Modified Files: src/sys/dev/gpio [thorpej-cfargs]: gpio.c Log Message: No need to pass interface attribute or locators to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.64.10.4 -r1.64.10.5 src/sys/dev/gpio/gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.64.10.4 src/sys/dev/gpio/gpio.c:1.64.10.5 --- src/sys/dev/gpio/gpio.c:1.64.10.4 Sun Mar 21 18:03:32 2021 +++ src/sys/dev/gpio/gpio.c Sun Mar 28 20:40:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.64.10.4 2021/03/21 18:03:32 thorpej Exp $ */ +/* $NetBSD: gpio.c,v 1.64.10.5 2021/03/28 20:40:30 thorpej Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.4 2021/03/21 18:03:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.5 2021/03/28 20:40:30 thorpej Exp $"); /* * General Purpose Input/Output framework. @@ -192,8 +192,6 @@ gpio_rescan(device_t self, const char *i config_search(self, NULL, CFARG_SUBMATCH, gpio_search, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/pcmcia
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:39:10 UTC 2021 Modified Files: src/sys/dev/pcmcia [thorpej-cfargs]: pcmcia.c Log Message: - Unwrap a line. - No need to be explcit about interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.94.70.2 -r1.94.70.3 src/sys/dev/pcmcia/pcmcia.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pcmcia/pcmcia.c diff -u src/sys/dev/pcmcia/pcmcia.c:1.94.70.2 src/sys/dev/pcmcia/pcmcia.c:1.94.70.3 --- src/sys/dev/pcmcia/pcmcia.c:1.94.70.2 Mon Mar 22 16:23:46 2021 +++ src/sys/dev/pcmcia/pcmcia.c Sun Mar 28 20:39:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcmcia.c,v 1.94.70.2 2021/03/22 16:23:46 thorpej Exp $ */ +/* $NetBSD: pcmcia.c,v 1.94.70.3 2021/03/28 20:39:10 thorpej Exp $ */ /* * Copyright (c) 2004 Charles M. Hannum. All rights reserved. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.94.70.2 2021/03/22 16:23:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.94.70.3 2021/03/28 20:39:10 thorpej Exp $"); #include "opt_pcmciaverbose.h" @@ -214,8 +214,7 @@ done: } int -pcmcia_rescan(device_t self, const char *ifattr, -const int *locators) +pcmcia_rescan(device_t self, const char *ifattr, const int *locators) { struct pcmcia_softc *sc = device_private(self); struct pcmcia_function *pf; @@ -248,7 +247,6 @@ pcmcia_rescan(device_t self, const char pf->child = config_found(self, &paa, pcmcia_print, CFARG_SUBMATCH, config_stdsubmatch, - CFARG_IATTR, ifattr, CFARG_LOCATORS, locs, CFARG_EOL); }
CVS commit: [thorpej-cfargs] src/sys/dev/scsipi
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:38:47 UTC 2021 Modified Files: src/sys/dev/scsipi [thorpej-cfargs]: scsiconf.c Log Message: Unwrap a line. To generate a diff of this commit: cvs rdiff -u -r1.290.4.2 -r1.290.4.3 src/sys/dev/scsipi/scsiconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.290.4.2 src/sys/dev/scsipi/scsiconf.c:1.290.4.3 --- src/sys/dev/scsipi/scsiconf.c:1.290.4.2 Sun Mar 21 17:35:49 2021 +++ src/sys/dev/scsipi/scsiconf.c Sun Mar 28 20:38:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.290.4.2 2021/03/21 17:35:49 thorpej Exp $ */ +/* $NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.2 2021/03/21 17:35:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $"); #include #include @@ -433,8 +433,7 @@ ret: } static int -scsibusrescan(device_t sc, const char *ifattr, -const int *locators) +scsibusrescan(device_t sc, const char *ifattr, const int *locators) { KASSERT(ifattr && !strcmp(ifattr, "scsibus"));
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:38:04 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: mlx_pci.c twe.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.14.1 src/sys/dev/pci/mlx_pci.c cvs rdiff -u -r1.108.10.2 -r1.108.10.3 src/sys/dev/pci/twe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/mlx_pci.c diff -u src/sys/dev/pci/mlx_pci.c:1.27 src/sys/dev/pci/mlx_pci.c:1.27.14.1 --- src/sys/dev/pci/mlx_pci.c:1.27 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/mlx_pci.c Sun Mar 28 20:38:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: mlx_pci.c,v 1.27.14.1 2021/03/28 20:38:04 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27.14.1 2021/03/28 20:38:04 thorpej Exp $"); #include #include @@ -145,7 +145,7 @@ static struct mlx_pci_ident { }; static int -mlx_pci_rescan(device_t self, const char *attr, const int *flag) +mlx_pci_rescan(device_t self, const char *ifattr, const int *locs) { return mlx_configure(device_private(self), 1); Index: src/sys/dev/pci/twe.c diff -u src/sys/dev/pci/twe.c:1.108.10.2 src/sys/dev/pci/twe.c:1.108.10.3 --- src/sys/dev/pci/twe.c:1.108.10.2 Mon Mar 22 16:23:46 2021 +++ src/sys/dev/pci/twe.c Sun Mar 28 20:38:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.108.10.2 2021/03/22 16:23:46 thorpej Exp $ */ +/* $NetBSD: twe.c,v 1.108.10.3 2021/03/28 20:38:04 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108.10.2 2021/03/22 16:23:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108.10.3 2021/03/28 20:38:04 thorpej Exp $"); #include #include @@ -451,7 +451,7 @@ twe_attach(device_t parent, device_t sel twe_describe_controller(sc); /* Find and attach RAID array units. */ - twe_rescan(self, "twe", 0); + twe_rescan(self, NULL, NULL); /* ...and finally, enable interrupts. */ twe_outl(sc, TWE_REG_CTL, TWE_CTL_CLEAR_ATTN_INTR | @@ -482,7 +482,7 @@ twe_attach(device_t parent, device_t sel } static int -twe_rescan(device_t self, const char *attr, const int *flags) +twe_rescan(device_t self, const char *ifattr, const int *locs) { struct twe_softc *sc; int i;
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:36:40 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: amr.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.65.10.2 -r1.65.10.3 src/sys/dev/pci/amr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/amr.c diff -u src/sys/dev/pci/amr.c:1.65.10.2 src/sys/dev/pci/amr.c:1.65.10.3 --- src/sys/dev/pci/amr.c:1.65.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/amr.c Sun Mar 28 20:36:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amr.c,v 1.65.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: amr.c,v 1.65.10.3 2021/03/28 20:36:40 thorpej Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.65.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.65.10.3 2021/03/28 20:36:40 thorpej Exp $"); #include #include @@ -511,7 +511,7 @@ amr_attach(device_t parent, device_t sel } static int -amr_rescan(device_t self, const char *attr, const int *flags) +amr_rescan(device_t self, const char *ifattr, const int *ulocs) { int j; int locs[AMRCF_NLOCS]; @@ -531,7 +531,7 @@ amr_rescan(device_t self, const char *at amr->amr_drive[j].al_dv = config_found(amr->amr_dv, &amra, amr_print, CFARG_SUBMATCH, config_stdsubmatch, - CFARG_IATTR, attr, + CFARG_IATTR, ifattr, CFARG_LOCATORS, locs, CFARG_EOL); }
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:36:16 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: aac_pci.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.40.14.1 src/sys/dev/pci/aac_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/aac_pci.c diff -u src/sys/dev/pci/aac_pci.c:1.40 src/sys/dev/pci/aac_pci.c:1.40.14.1 --- src/sys/dev/pci/aac_pci.c:1.40 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/aac_pci.c Sun Mar 28 20:36:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: aac_pci.c,v 1.40 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: aac_pci.c,v 1.40.14.1 2021/03/28 20:36:16 thorpej Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.40 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.40.14.1 2021/03/28 20:36:16 thorpej Exp $"); #include #include @@ -617,7 +617,7 @@ aac_pci_attach(device_t parent, device_t /* ARGSUSED */ static int -aac_pci_rescan(device_t self, const char *attr, const int *flags) +aac_pci_rescan(device_t self, const char *ifattr, const int *locs) { return aac_devscan(device_private(self));
CVS commit: [thorpej-cfargs] src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:35:57 UTC 2021 Modified Files: src/sys/dev/isa [thorpej-cfargs]: pcppi.c Log Message: pcppi_scan(): No need to pass interface attribute or locators to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.45.22.2 -r1.45.22.3 src/sys/dev/isa/pcppi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.45.22.2 src/sys/dev/isa/pcppi.c:1.45.22.3 --- src/sys/dev/isa/pcppi.c:1.45.22.2 Sun Mar 21 19:06:19 2021 +++ src/sys/dev/isa/pcppi.c Sun Mar 28 20:35:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.45.22.2 2021/03/21 19:06:19 thorpej Exp $ */ +/* $NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.2 2021/03/21 19:06:19 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $"); #include "attimer.h" @@ -247,8 +247,6 @@ pcppi_rescan(device_t self, const char * config_search(sc->sc_dv, &pa, CFARG_SUBMATCH, pcppisearch, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:34:44 UTC 2021 Modified Files: src/sys/dev/isa [thorpej-cfargs]: isa.c Log Message: - Use designated initializers for the wildcard[] array in isaattach(). - No need to be explicit about interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.138.76.3 -r1.138.76.4 src/sys/dev/isa/isa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isa/isa.c diff -u src/sys/dev/isa/isa.c:1.138.76.3 src/sys/dev/isa/isa.c:1.138.76.4 --- src/sys/dev/isa/isa.c:1.138.76.3 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/isa/isa.c Sun Mar 28 20:34:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: isa.c,v 1.138.76.3 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $ */ /*- * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.3 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $"); #include #include @@ -86,9 +86,13 @@ isaattach(device_t parent, device_t self struct isa_softc *sc = device_private(self); struct isabus_attach_args *iba = aux; static const int wildcard[ISACF_NLOCS] = { - ISACF_PORT_DEFAULT, ISACF_SIZE_DEFAULT, - ISACF_IOMEM_DEFAULT, ISACF_IOSIZ_DEFAULT, - ISACF_IRQ_DEFAULT, ISACF_DRQ_DEFAULT, ISACF_DRQ2_DEFAULT + [ISACF_PORT] = ISACF_PORT_DEFAULT, + [ISACF_SIZE] = ISACF_SIZE_DEFAULT, + [ISACF_IOMEM] = ISACF_IOMEM_DEFAULT, + [ISACF_IOSIZ] = ISACF_IOSIZ_DEFAULT, + [ISACF_IRQ] = ISACF_IRQ_DEFAULT, + [ISACF_DRQ] = ISACF_DRQ_DEFAULT, + [ISACF_DRQ2] = ISACF_DRQ2_DEFAULT, }; TAILQ_INIT(&sc->sc_knowndevs); @@ -132,7 +136,7 @@ isaattach(device_t parent, device_t self isa_free_knowndevs(sc); /* Attach all indirect-config children. */ - isarescan(self, "isa", wildcard); + isarescan(self, NULL, wildcard); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); @@ -188,7 +192,6 @@ isarescan(device_t self, const char *ifa config_search(self, NULL, CFARG_SUBMATCH, isasearch, - CFARG_IATTR, ifattr, CFARG_LOCATORS, locs, CFARG_EOL); return (0);
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:33:47 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: nvme.c Log Message: - In nvme_rescan(), pass the locators used for matching to config_found() and use config_stdsubmatch(). - No need to be explicit about interface attribute, because we carry only one. To generate a diff of this commit: cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/nvme.c diff -u src/sys/dev/ic/nvme.c:1.54.2.1 src/sys/dev/ic/nvme.c:1.54.2.2 --- src/sys/dev/ic/nvme.c:1.54.2.1 Sun Mar 21 21:09:12 2021 +++ src/sys/dev/ic/nvme.c Sun Mar 28 20:33:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nvme.c,v 1.54.2.1 2021/03/21 21:09:12 thorpej Exp $ */ +/* $NetBSD: nvme.c,v 1.54.2.2 2021/03/28 20:33:46 thorpej Exp $ */ /* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.54.2.1 2021/03/21 21:09:12 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.54.2.2 2021/03/28 20:33:46 thorpej Exp $"); #include #include @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.5 #include #include "ioconf.h" +#include "locators.h" #define B4_CHK_RDY_DELAY_MS 2300 /* workaround controller bug */ @@ -447,7 +448,7 @@ nvme_attach(struct nvme_softc *sc) /* probe subdevices */ sc->sc_namespaces = kmem_zalloc(sizeof(*sc->sc_namespaces) * sc->sc_nn, KM_SLEEP); - nvme_rescan(sc->sc_dev, "nvme", &i); + nvme_rescan(sc->sc_dev, NULL, NULL); return 0; @@ -467,7 +468,7 @@ free_admin_q: } int -nvme_rescan(device_t self, const char *attr, const int *flags) +nvme_rescan(device_t self, const char *ifattr, const int *locs) { struct nvme_softc *sc = device_private(self); struct nvme_attach_args naa; @@ -475,7 +476,7 @@ nvme_rescan(device_t self, const char *a struct nvme_namespace *ns; uint64_t cap; int ioq_entries = nvme_ioq_size; - int i; + int i, mlocs[NVMECF_NLOCS]; int error; cap = nvme_read8(sc, NVME_CAP); @@ -511,13 +512,18 @@ nvme_rescan(device_t self, const char *a continue; } + mlocs[NVMECF_NSID] = i; + memset(&naa, 0, sizeof(naa)); naa.naa_nsid = i; naa.naa_qentries = (ioq_entries - 1) * sc->sc_nq; naa.naa_maxphys = sc->sc_mdts; naa.naa_typename = sc->sc_modelname; - sc->sc_namespaces[i - 1].dev = config_found(sc->sc_dev, &naa, - nvme_print, CFARG_EOL); + sc->sc_namespaces[i - 1].dev = + config_found(sc->sc_dev, &naa, nvme_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, mlocs, + CFARG_EOL); } return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:31:05 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: mfi.c Log Message: No need to pass interface or locators to config_found() in mfi_rescan(). To generate a diff of this commit: cvs rdiff -u -r1.63.10.2 -r1.63.10.3 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.63.10.2 src/sys/dev/ic/mfi.c:1.63.10.3 --- src/sys/dev/ic/mfi.c:1.63.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/ic/mfi.c Sun Mar 28 20:31:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.63.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: mfi.c,v 1.63.10.3 2021/03/28 20:31:05 thorpej Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63.10.3 2021/03/28 20:31:05 thorpej Exp $"); #include "bio.h" @@ -909,10 +909,7 @@ mfi_rescan(device_t self, const char *if if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, - CFARG_EOL); + sc->sc_child = config_found(self, &sc->sc_chan, scsiprint, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:30:14 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: cac.c Log Message: Correct the names of the arguments passed to cac_rescan(), and update a local variable to avoid a name collision. Also, no need to be explcit about our interface attribute, since we carry only one. To generate a diff of this commit: cvs rdiff -u -r1.61.10.2 -r1.61.10.3 src/sys/dev/ic/cac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/cac.c diff -u src/sys/dev/ic/cac.c:1.61.10.2 src/sys/dev/ic/cac.c:1.61.10.3 --- src/sys/dev/ic/cac.c:1.61.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/ic/cac.c Sun Mar 28 20:30:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cac.c,v 1.61.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: cac.c,v 1.61.10.3 2021/03/28 20:30:14 thorpej Exp $ */ /*- * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.61.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.61.10.3 2021/03/28 20:30:14 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "bio.h" @@ -217,11 +217,11 @@ cac_init(struct cac_softc *sc, const cha } int -cac_rescan(device_t self, const char *attr, const int *flags) +cac_rescan(device_t self, const char *attr, const int *locs) { struct cac_softc *sc; struct cac_attach_args caca; - int locs[CACCF_NLOCS]; + int mlocs[CACCF_NLOCS]; int i; sc = device_private(self); @@ -230,12 +230,11 @@ cac_rescan(device_t self, const char *at continue; caca.caca_unit = i; - locs[CACCF_UNIT] = i; + mlocs[CACCF_UNIT] = i; if (config_found(self, &caca, cac_print, CFARG_SUBMATCH, config_stdsubmatch, - CFARG_IATTR, attr, - CFARG_LOCATORS, locs, + CFARG_LOCATORS, mlocs, CFARG_EOL) != NULL) sc->sc_unitmask |= 1 << i; }
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:25:44 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: apple_smc.c Log Message: This driver only has a single interface attribute, so no need to be expicit about it. That interface attribute has no locators, so don't pass them to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.6.50.1 -r1.6.50.2 src/sys/dev/ic/apple_smc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/apple_smc.c diff -u src/sys/dev/ic/apple_smc.c:1.6.50.1 src/sys/dev/ic/apple_smc.c:1.6.50.2 --- src/sys/dev/ic/apple_smc.c:1.6.50.1 Sat Mar 20 19:33:40 2021 +++ src/sys/dev/ic/apple_smc.c Sun Mar 28 20:25:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: apple_smc.c,v 1.6.50.1 2021/03/20 19:33:40 thorpej Exp $ */ +/* $NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $ */ /* * Apple System Management Controller @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.1 2021/03/20 19:33:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $"); #include #include @@ -81,7 +81,7 @@ apple_smc_attach(struct apple_smc_tag *s #endif /* Attach any children. */ -(void)apple_smc_rescan(smc, APPLE_SMC_BUS, NULL); +(void)apple_smc_rescan(smc, NULL, NULL); } int @@ -110,8 +110,6 @@ apple_smc_rescan(struct apple_smc_tag *s /* Let autoconf(9) do the work of finding new children. */ config_search(smc->smc_dev, smc, CFARG_SUBMATCH, apple_smc_search, - CFARG_IATTR, APPLE_SMC_BUS, - CFARG_LOCATORS, locators, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:02:29 UTC 2021 Modified Files: src/sys/dev/i2c [thorpej-cfargs]: i2c.c Log Message: "iic" only has a single interface attribute, so no need to be explicit. To generate a diff of this commit: cvs rdiff -u -r1.77.2.4 -r1.77.2.5 src/sys/dev/i2c/i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.77.2.4 src/sys/dev/i2c/i2c.c:1.77.2.5 --- src/sys/dev/i2c/i2c.c:1.77.2.4 Mon Mar 22 16:23:44 2021 +++ src/sys/dev/i2c/i2c.c Sun Mar 28 20:02:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.77.2.4 2021/03/22 16:23:44 thorpej Exp $ */ +/* $NetBSD: i2c.c,v 1.77.2.5 2021/03/28 20:02:29 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.4 2021/03/22 16:23:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.5 2021/03/28 20:02:29 thorpej Exp $"); #include #include @@ -382,7 +382,6 @@ iic_rescan(device_t self, const char *if { config_search(self, NULL, CFARG_SUBMATCH, iic_search, - CFARG_IATTR, ifattr, CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:57:51 UTC 2021 Modified Files: src/sys/dev/eisa [thorpej-cfargs]: mlx_eisa.c Log Message: Correct names of arguments passed to rescan function. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/dev/eisa/mlx_eisa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/eisa/mlx_eisa.c diff -u src/sys/dev/eisa/mlx_eisa.c:1.27 src/sys/dev/eisa/mlx_eisa.c:1.27.2.1 --- src/sys/dev/eisa/mlx_eisa.c:1.27 Wed Jan 27 04:35:15 2021 +++ src/sys/dev/eisa/mlx_eisa.c Sun Mar 28 19:57:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_eisa.c,v 1.27 2021/01/27 04:35:15 thorpej Exp $ */ +/* $NetBSD: mlx_eisa.c,v 1.27.2.1 2021/03/28 19:57:50 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.27 2021/01/27 04:35:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.27.2.1 2021/03/28 19:57:50 thorpej Exp $"); #include #include @@ -190,7 +190,7 @@ mlx_eisa_attach(device_t parent, device_ } static int -mlx_eisa_rescan(device_t self, const char *attr, const int *flag) +mlx_eisa_rescan(device_t self, const char *ifattr, const int *locs) { return mlx_configure(device_private(self), 1);
CVS commit: [thorpej-cfargs] src/sys/dev/audio
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:55:37 UTC 2021 Modified Files: src/sys/dev/audio [thorpej-cfargs]: audio.c Log Message: audio only has one interface attribute, so no need to be explcit about it. audio also doesn't have locators, so don't pass any to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.91.2.3 -r1.91.2.4 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.91.2.3 src/sys/dev/audio/audio.c:1.91.2.4 --- src/sys/dev/audio/audio.c:1.91.2.3 Sun Mar 21 21:09:09 2021 +++ src/sys/dev/audio/audio.c Sun Mar 28 19:55:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.91.2.3 2021/03/21 21:09:09 thorpej Exp $ */ +/* $NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.3 2021/03/21 21:09:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -,7 +,7 @@ audioattach(device_t parent, device_t se audio_mlog_init(); #endif - audiorescan(self, "audio", NULL); + audiorescan(self, NULL, NULL); sc->sc_exlock = 0; return; @@ -1416,8 +1416,6 @@ audiorescan(device_t self, const char *i config_search(sc->sc_dev, NULL, CFARG_SUBMATCH, audiosearch, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/ata
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:53:09 UTC 2021 Modified Files: src/sys/dev/ata [thorpej-cfargs]: ata_raid.c Log Message: Correct names of arguments passed to rescan function. To generate a diff of this commit: cvs rdiff -u -r1.43.4.2 -r1.43.4.3 src/sys/dev/ata/ata_raid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ata/ata_raid.c diff -u src/sys/dev/ata/ata_raid.c:1.43.4.2 src/sys/dev/ata/ata_raid.c:1.43.4.3 --- src/sys/dev/ata/ata_raid.c:1.43.4.2 Mon Mar 22 16:23:44 2021 +++ src/sys/dev/ata/ata_raid.c Sun Mar 28 19:53:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ata_raid.c,v 1.43.4.2 2021/03/22 16:23:44 thorpej Exp $ */ +/* $NetBSD: ata_raid.c,v 1.43.4.3 2021/03/28 19:53:09 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.43.4.2 2021/03/22 16:23:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.43.4.3 2021/03/28 19:53:09 thorpej Exp $"); #include #include @@ -114,7 +114,7 @@ ataraidattach(int count) /* ARGSUSED */ static int -ataraid_rescan(device_t self, const char *attr, const int *flags) +ataraid_rescan(device_t self, const char *ifattr, const int *locs) { finalize_done = 0;
CVS commit: [thorpej-cfargs] src/sys/dev
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:50:05 UTC 2021 Modified Files: src/sys/dev [thorpej-cfargs]: spkr.c Log Message: "" is not a valid interface attribute, so don't pass it to spkr_rescan() (luckily it wasn't used anyway). To generate a diff of this commit: cvs rdiff -u -r1.17.14.1 -r1.17.14.2 src/sys/dev/spkr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/spkr.c diff -u src/sys/dev/spkr.c:1.17.14.1 src/sys/dev/spkr.c:1.17.14.2 --- src/sys/dev/spkr.c:1.17.14.1 Sun Mar 21 21:09:09 2021 +++ src/sys/dev/spkr.c Sun Mar 28 19:50:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.17.14.1 2021/03/21 21:09:09 thorpej Exp $ */ +/* $NetBSD: spkr.c,v 1.17.14.2 2021/03/28 19:50:05 thorpej Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.17.14.1 2021/03/21 21:09:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.17.14.2 2021/03/28 19:50:05 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "wsmux.h" @@ -375,7 +375,7 @@ spkr_attach(device_t self, void (*tone)( sc->sc_inbuf = NULL; sc->sc_wsbelldev = NULL; - spkr_rescan(self, "", NULL); + spkr_rescan(self, NULL, NULL); } int
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci/imcsmb
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:42:59 UTC 2021 Modified Files: src/sys/arch/x86/pci/imcsmb [thorpej-cfargs]: imc.c imcsmb.c Log Message: - The third argument passed to the rescan function is a locs array, not a pointer to flags. - imc and imcsmb each carry only a single interface attribute, so no need to be explicit. To generate a diff of this commit: cvs rdiff -u -r1.2.16.1 -r1.2.16.2 src/sys/arch/x86/pci/imcsmb/imc.c cvs rdiff -u -r1.3.10.1 -r1.3.10.2 src/sys/arch/x86/pci/imcsmb/imcsmb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/imcsmb/imc.c diff -u src/sys/arch/x86/pci/imcsmb/imc.c:1.2.16.1 src/sys/arch/x86/pci/imcsmb/imc.c:1.2.16.2 --- src/sys/arch/x86/pci/imcsmb/imc.c:1.2.16.1 Tue Mar 23 07:14:51 2021 +++ src/sys/arch/x86/pci/imcsmb/imc.c Sun Mar 28 19:42:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imc.c,v 1.2.16.1 2021/03/23 07:14:51 thorpej Exp $ */ +/* $NetBSD: imc.c,v 1.2.16.2 2021/03/28 19:42:59 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2.16.1 2021/03/23 07:14:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2.16.2 2021/03/28 19:42:59 thorpej Exp $"); #include #include @@ -206,7 +206,7 @@ imc_attach(device_t parent, device_t sel { struct imc_softc *sc = device_private(self); struct pci_attach_args *pa = aux; - int flags, i; + int i; sc->sc_dev = self; sc->sc_pci_tag = pa->pa_tag; @@ -222,22 +222,19 @@ imc_attach(device_t parent, device_t sel } } - flags = 0; - if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - imc_rescan(self, "imc", &flags); + imc_rescan(self, NULL, NULL); } /* Create the imcsmbX children */ static int -imc_rescan(device_t self, const char * ifattr, const int *flags) +imc_rescan(device_t self, const char *ifattr, const int *locs) { struct imc_softc *sc = device_private(self); struct imc_attach_args imca; - device_t child; int unit; for (unit = 0; unit < 2; unit++) { @@ -248,13 +245,8 @@ imc_rescan(device_t self, const char * i imca.ia_regs = &imcsmb_regs[unit]; imca.ia_pci_tag = sc->sc_pci_tag; imca.ia_pci_chipset_tag = sc->sc_pci_chipset_tag; - child = config_found(self, &imca, NULL, CFARG_EOL); - - if (child == NULL) { - aprint_debug_dev(self, "Child %d imcsmb not added\n", - unit); - } - sc->sc_smbchild[unit] = child; + sc->sc_smbchild[unit] = + config_found(self, &imca, NULL, CFARG_EOL); } return 0; Index: src/sys/arch/x86/pci/imcsmb/imcsmb.c diff -u src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.1 src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.2 --- src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.1 Tue Mar 23 01:29:32 2021 +++ src/sys/arch/x86/pci/imcsmb/imcsmb.c Sun Mar 28 19:42:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $ */ +/* $NetBSD: imcsmb.c,v 1.3.10.2 2021/03/28 19:42:59 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3.10.2 2021/03/28 19:42:59 thorpej Exp $"); #include #include @@ -138,7 +138,7 @@ imcsmb_attach(device_t parent, device_t } static int -imcsmb_rescan(device_t self, const char *ifattr, const int *flags) +imcsmb_rescan(device_t self, const char *ifattr, const int *locs) { struct imcsmb_softc *sc = device_private(self); struct i2cbus_attach_args iba; @@ -155,7 +155,7 @@ imcsmb_rescan(device_t self, const char memset(&iba, 0, sizeof(iba)); iba.iba_tag = &sc->sc_i2c_tag; - sc->sc_smbus = config_found_ia(self, ifattr, &iba, iicbus_print); + sc->sc_smbus = config_found(self, &iba, iicbus_print, CFARG_EOL); if (sc->sc_smbus == NULL) { aprint_normal_dev(self, "no child found\n");
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 01:03:19 UTC 2021 Modified Files: src/sys/arch/x86/pci [thorpej-cfargs]: amdnb_misc.c amdsmn.c Log Message: These devices have only one interface attribute and no locators, so simplify: - config_attach_loc() -> config_attach(). - Don't pass CFARG_IATTR, or CFARG_LOCATORS to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.3.14.3 -r1.3.14.4 src/sys/arch/x86/pci/amdnb_misc.c cvs rdiff -u -r1.10.4.2 -r1.10.4.3 src/sys/arch/x86/pci/amdsmn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/amdnb_misc.c diff -u src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.3 src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.4 --- src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.3 Sun Mar 21 19:06:19 2021 +++ src/sys/arch/x86/pci/amdnb_misc.c Sun Mar 28 01:03:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdnb_misc.c,v 1.3.14.3 2021/03/21 19:06:19 thorpej Exp $ */ +/* $NetBSD: amdnb_misc.c,v 1.3.14.4 2021/03/28 01:03:19 thorpej Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3.14.3 2021/03/21 19:06:19 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3.14.4 2021/03/28 01:03:19 thorpej Exp $"); #include #include @@ -114,7 +114,7 @@ amdnb_misc_search(device_t parent, cfdat if (!attach) return 0; - config_attach_loc(parent, cf, locs, aux, NULL); + config_attach(parent, cf, aux, NULL); return 0; } @@ -160,8 +160,6 @@ amdnb_misc_rescan(device_t self, const c config_search(self, &sc->sc_pa, CFARG_SUBMATCH, amdnb_misc_search, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0; Index: src/sys/arch/x86/pci/amdsmn.c diff -u src/sys/arch/x86/pci/amdsmn.c:1.10.4.2 src/sys/arch/x86/pci/amdsmn.c:1.10.4.3 --- src/sys/arch/x86/pci/amdsmn.c:1.10.4.2 Sun Mar 21 19:06:19 2021 +++ src/sys/arch/x86/pci/amdsmn.c Sun Mar 28 01:03:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdsmn.c,v 1.10.4.2 2021/03/21 19:06:19 thorpej Exp $ */ +/* $NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ */ /*- * Copyright (c) 2017, 2019 Conrad Meyer @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.2 2021/03/21 19:06:19 thorpej Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ "); /* * Driver for the AMD Family 15h (model 60+) and 17h CPU @@ -133,7 +133,6 @@ amdsmn_attach(device_t parent, device_t { struct amdsmn_softc *sc = device_private(self); struct pci_attach_args *pa = aux; - int flags = 0; size_t i; mutex_init(&sc->smn_lock, MUTEX_DEFAULT, IPL_NONE); @@ -149,7 +148,7 @@ amdsmn_attach(device_t parent, device_t // aprint_normal(": AMD Family 17h System Management Network\n"); aprint_normal(": AMD System Management Network\n"); - amdsmn_rescan(self, "amdsmnbus", &flags); + amdsmn_rescan(self, NULL, NULL); } static int @@ -159,8 +158,6 @@ amdsmn_rescan(device_t self, const char config_search(self, &sc->pa, CFARG_SUBMATCH, amdsmn_misc_search, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 01:01:46 UTC 2021 Modified Files: src/sys/arch/x86/pci [thorpej-cfargs]: files.pci Log Message: Minor rearrangement of the deck chairs to group things together. To generate a diff of this commit: cvs rdiff -u -r1.25.4.1 -r1.25.4.2 src/sys/arch/x86/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/files.pci diff -u src/sys/arch/x86/pci/files.pci:1.25.4.1 src/sys/arch/x86/pci/files.pci:1.25.4.2 --- src/sys/arch/x86/pci/files.pci:1.25.4.1 Tue Mar 23 01:25:48 2021 +++ src/sys/arch/x86/pci/files.pci Sun Mar 28 01:01:45 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.25.4.1 2021/03/23 01:25:48 thorpej Exp $ +# $NetBSD: files.pci,v 1.25.4.2 2021/03/28 01:01:45 thorpej Exp $ device aapic attach aapic at pci @@ -9,9 +9,6 @@ file arch/x86/pci/agp_machdep.c agp define agp_x86: agp_ali, agp_amd, agp_amd64, agp_i810, agp_intel, agp_sis, agp_via defflag AGP_X86 -define amdnb_miscbus {} -define amdsmnbus {} - # PCI-Host bridge chipsets device pchb: pcibus, agpbus, agp_x86 attach pchb at pci @@ -32,11 +29,17 @@ attach hpet at amdpcib with amdpcib_hpe filearch/x86/pci/amdpcib_hpet.c amdpcib_hpet # AMD Processors -- Miscellaneous Control +define amdnb_miscbus {} device amdnb_misc: amdnb_miscbus attach amdnb_misc at pci file arch/x86/pci/amdnb_misc.c amdnb_misc + +device amdtemp: sysmon_envsys +attach amdtemp at amdnb_miscbus +file arch/x86/pci/amdtemp.c amdtemp # AMD Family 17h system management network +define amdsmnbus {} device amdsmn: amdsmnbus attach amdsmn at pci file arch/x86/pci/amdsmn.c amdsmn @@ -46,10 +49,6 @@ device amdzentemp: sysmon_envsys attach amdzentemp at amdsmnbus file arch/x86/pci/amdzentemp.c amdzentemp -device amdtemp: sysmon_envsys -attach amdtemp at amdnb_miscbus -file arch/x86/pci/amdtemp.c amdtemp - attach dwiic at pci with pcidwiic filearch/x86/pci/dwiic_pci.c pcidwiic
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Mar 27 01:41:43 UTC 2021 Modified Files: src/sys/arch/evbmips/mipssim [thorpej-cfargs]: virtio_mainbus.c src/sys/dev/acpi [thorpej-cfargs]: virtio_acpi.c src/sys/dev/fdt [thorpej-cfargs]: virtio_mmio_fdt.c src/sys/dev/pci [thorpej-cfargs]: virtio_pci.c Log Message: - config_found_ia() -> config_found(). - virtio only carries a single interface attribute, so no need to specify it explicitly. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.2.1 src/sys/arch/evbmips/mipssim/virtio_mainbus.c cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/acpi/virtio_acpi.c cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/dev/fdt/virtio_mmio_fdt.c cvs rdiff -u -r1.28 -r1.28.2.1 src/sys/dev/pci/virtio_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/mipssim/virtio_mainbus.c diff -u src/sys/arch/evbmips/mipssim/virtio_mainbus.c:1.1 src/sys/arch/evbmips/mipssim/virtio_mainbus.c:1.1.2.1 --- src/sys/arch/evbmips/mipssim/virtio_mainbus.c:1.1 Mon Feb 15 22:39:46 2021 +++ src/sys/arch/evbmips/mipssim/virtio_mainbus.c Sat Mar 27 01:41:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_mainbus.c,v 1.1 2021/02/15 22:39:46 reinoud Exp $ */ +/* $NetBSD: virtio_mainbus.c,v 1.1.2.1 2021/03/27 01:41:43 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio_mainbus.c,v 1.1 2021/02/15 22:39:46 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_mainbus.c,v 1.1.2.1 2021/03/27 01:41:43 thorpej Exp $"); #include #include @@ -108,13 +108,13 @@ virtio_mainbus_attach(device_t parent, d if (virtio_mmio_common_probe_present(msc)) virtio_mmio_common_attach(msc); - virtio_mainbus_rescan(self, "virtio", NULL); + virtio_mainbus_rescan(self, NULL, NULL); } /* ARGSUSED */ static int -virtio_mainbus_rescan(device_t self, const char *attr, const int *scan_flags) +virtio_mainbus_rescan(device_t self, const char *ifattr, const int *locs) { struct virtio_mainbus_softc *sc = device_private(self); struct virtio_mmio_softc *msc = &sc->sc_msc; @@ -127,7 +127,7 @@ virtio_mainbus_rescan(device_t self, con memset(&va, 0, sizeof(va)); va.sc_childdevid = vsc->sc_childdevid; - config_found_ia(self, attr, &va, NULL); + config_found(self, &va, NULL, CFARG_EOL); if (virtio_attach_failed(vsc)) return 0; Index: src/sys/dev/acpi/virtio_acpi.c diff -u src/sys/dev/acpi/virtio_acpi.c:1.7 src/sys/dev/acpi/virtio_acpi.c:1.7.2.1 --- src/sys/dev/acpi/virtio_acpi.c:1.7 Fri Jan 29 15:49:55 2021 +++ src/sys/dev/acpi/virtio_acpi.c Sat Mar 27 01:41:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_acpi.c,v 1.7 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: virtio_acpi.c,v 1.7.2.1 2021/03/27 01:41:43 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.7 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.7.2.1 2021/03/27 01:41:43 thorpej Exp $"); #include #include @@ -160,7 +160,7 @@ virtio_acpi_rescan(device_t self, const memset(&va, 0, sizeof(va)); va.sc_childdevid = vsc->sc_childdevid; - config_found_ia(self, ifattr, &va, NULL); + config_found(self, &va, NULL, CFARG_EOL); if (virtio_attach_failed(vsc)) return 0; Index: src/sys/dev/fdt/virtio_mmio_fdt.c diff -u src/sys/dev/fdt/virtio_mmio_fdt.c:1.7 src/sys/dev/fdt/virtio_mmio_fdt.c:1.7.2.1 --- src/sys/dev/fdt/virtio_mmio_fdt.c:1.7 Wed Jan 27 03:10:21 2021 +++ src/sys/dev/fdt/virtio_mmio_fdt.c Sat Mar 27 01:41:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_mmio_fdt.c,v 1.7 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: virtio_mmio_fdt.c,v 1.7.2.1 2021/03/27 01:41:43 thorpej Exp $ */ /* * Copyright (c) 2018 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.7 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_mmio_fdt.c,v 1.7.2.1 2021/03/27 01:41:43 thorpej Exp $"); #include #include @@ -105,7 +105,7 @@ virtio_mmio_fdt_attach(device_t parent, msc->sc_free_interrupts = virtio_mmio_fdt_free_interrupts; virtio_mmio_common_attach(msc); - virtio_mmio_fdt_rescan(self, "virtio", NULL); + virtio_mmio_fdt_rescan(self, NULL, NULL); } /* ARGSUSED */ @@ -123,7 +123,7 @@ virtio_mmio_fdt_rescan(device_t self, co memset(&va, 0, sizeof(va)); va.sc_childdevid = vsc->sc_childdevid; - config_found_ia(self, attr, &va, NULL); + config_found(self, &va, NULL, CFARG_EOL); if (virtio_attach_failed(vsc)) return 0; Index: src/sys/dev/pci/virtio_pci.c diff -u src/sys/dev/pci/virtio_pci.c:1.28 src/sys/dev/pci/virtio_pci.c:1.28.2.1 --- src/sys/dev/pci/virtio_pci.c:1.28 Fri Feb 5 19:18:23 2021 +++ src/sys/dev/pci/virtio_pci.c Sat Mar 27 01:41:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD:
CVS commit: [thorpej-cfargs] src/sys/arch/i386/pci
Module Name:src Committed By: thorpej Date: Fri Mar 26 02:05:02 UTC 2021 Modified Files: src/sys/arch/i386/pci [thorpej-cfargs]: gscpcib.c Log Message: gscpcib_rescan(): "gpiobus" doesn't have locators, so no need to pass any to config_found(). To generate a diff of this commit: cvs rdiff -u -r1.18.66.1 -r1.18.66.2 src/sys/arch/i386/pci/gscpcib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/pci/gscpcib.c diff -u src/sys/arch/i386/pci/gscpcib.c:1.18.66.1 src/sys/arch/i386/pci/gscpcib.c:1.18.66.2 --- src/sys/arch/i386/pci/gscpcib.c:1.18.66.1 Mon Mar 22 02:00:57 2021 +++ src/sys/arch/i386/pci/gscpcib.c Fri Mar 26 02:05:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gscpcib.c,v 1.18.66.1 2021/03/22 02:00:57 thorpej Exp $ */ +/* $NetBSD: gscpcib.c,v 1.18.66.2 2021/03/26 02:05:02 thorpej Exp $ */ /* $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.18.66.1 2021/03/22 02:00:57 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.18.66.2 2021/03/26 02:05:02 thorpej Exp $"); #include #include @@ -101,7 +101,6 @@ gscpcib_rescan(device_t self, const char sc->sc_gpiobus = config_found(self, &gba, gpiobus_print, CFARG_IATTR, "gpiobus", - CFARG_LOCATORS, loc, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/arch/evbmips/loongson/dev
Module Name:src Committed By: thorpej Date: Fri Mar 26 02:04:02 UTC 2021 Modified Files: src/sys/arch/evbmips/loongson/dev [thorpej-cfargs]: pcib.c Log Message: pcibrescan(): config_found_ia() -> config_found(). Add a comment why we are explicit about the interface attribute even though "pcib" itself only carries one. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.16.1 src/sys/arch/evbmips/loongson/dev/pcib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/loongson/dev/pcib.c diff -u src/sys/arch/evbmips/loongson/dev/pcib.c:1.2 src/sys/arch/evbmips/loongson/dev/pcib.c:1.2.16.1 --- src/sys/arch/evbmips/loongson/dev/pcib.c:1.2 Thu Mar 8 18:48:25 2018 +++ src/sys/arch/evbmips/loongson/dev/pcib.c Fri Mar 26 02:04:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcib.c,v 1.2 2018/03/08 18:48:25 martin Exp $ */ +/* $NetBSD: pcib.c,v 1.2.16.1 2021/03/26 02:04:02 thorpej Exp $ */ /*- * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.2 2018/03/08 18:48:25 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.2.16.1 2021/03/26 02:04:02 thorpej Exp $"); #include #include @@ -148,6 +148,10 @@ pcibrescan(device_t self, const char *if struct pcib_softc *sc = device_private(self); struct isabus_attach_args iba; + /* + * pcib only carries "isabus", but this can also be used + * by other drivers that carry additional interface attributes. + */ if (ifattr_match(ifattr, "isabus") && sc->sc_isabus == NULL) { /* * Attach the ISA bus behind this bridge. @@ -162,7 +166,9 @@ pcibrescan(device_t self, const char *if if (iba.iba_ic != NULL) sc->sc_isabus = - config_found_ia(self, "isabus", &iba, isabusprint); + config_found(self, &iba, isabusprint, + CFARG_IATTR, "isabus", + CFARG_EOL); } return 0; }
CVS commit: [thorpej-cfargs] src/sys/arch/arm/omap
Module Name:src Committed By: thorpej Date: Fri Mar 26 02:02:53 UTC 2021 Modified Files: src/sys/arch/arm/omap [thorpej-cfargs]: tiotg.c Log Message: tiotg_rescan(): properly pass the "matching locators" to config_found(), and use config_stdsubmatch(). To generate a diff of this commit: cvs rdiff -u -r1.7.18.2 -r1.7.18.3 src/sys/arch/arm/omap/tiotg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/tiotg.c diff -u src/sys/arch/arm/omap/tiotg.c:1.7.18.2 src/sys/arch/arm/omap/tiotg.c:1.7.18.3 --- src/sys/arch/arm/omap/tiotg.c:1.7.18.2 Wed Mar 24 14:21:08 2021 +++ src/sys/arch/arm/omap/tiotg.c Fri Mar 26 02:02:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tiotg.c,v 1.7.18.2 2021/03/24 14:21:08 thorpej Exp $ */ +/* $NetBSD: tiotg.c,v 1.7.18.3 2021/03/26 02:02:53 thorpej Exp $ */ /* * Copyright (c) 2013 Manuel Bouyer. All rights reserved. * @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.7.18.2 2021/03/24 14:21:08 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.7.18.3 2021/03/26 02:02:53 thorpej Exp $"); #include "opt_omap.h" #include "locators.h" @@ -191,11 +191,15 @@ tiotg_rescan(device_t self, const char * { struct tiotg_softc *sc = device_private(self); struct motg_attach_args aa; + int mlocs[TIOTG_PORTCF_NLOCS]; int i; for (i = 0; i < TI_OTG_NPORTS; i++) { if (sc->sc_motgdev[i] != NULL) continue; + + mlocs[TIOTG_PORTCF_PORT] = i; + if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, USB_CTRL_OFFSET(i), USB_PORT_SIZE, &aa.aa_ioh) < 0) { aprint_error_dev(self, @@ -207,7 +211,10 @@ tiotg_rescan(device_t self, const char * aa.aa_port = i; aa.aa_intr = sc->sc_intrbase + 1 + i; sc->sc_motgdev[i] = - config_found(self, &aa, ti_motg_print, CFARG_EOL); + config_found(self, &aa, ti_motg_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, mlocs, + CFARG_EOL); } return 0; }
CVS commit: [thorpej-cfargs] src/sys/arch/arm/omap
Module Name:src Committed By: thorpej Date: Thu Mar 25 15:59:50 UTC 2021 Modified Files: src/sys/arch/arm/omap [thorpej-cfargs]: files.omap2 Log Message: Nothing uses / references the "mode" locator on the "tiotg_port" interface attribute; remove it. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.36.30.1 src/sys/arch/arm/omap/files.omap2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/omap/files.omap2 diff -u src/sys/arch/arm/omap/files.omap2:1.36 src/sys/arch/arm/omap/files.omap2:1.36.30.1 --- src/sys/arch/arm/omap/files.omap2:1.36 Sat Oct 15 15:11:56 2016 +++ src/sys/arch/arm/omap/files.omap2 Thu Mar 25 15:59:49 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.omap2,v 1.36 2016/10/15 15:11:56 kiyohara Exp $ +# $NetBSD: files.omap2,v 1.36.30.1 2021/03/25 15:59:49 thorpej Exp $ # # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support # Based on xscale/files.pxa2x0 @@ -126,7 +126,7 @@ attach edma at mainbus file arch/arm/omap/omap_edma.c edma needs-flag # TI OTG controller -define tiotg_port {[port = -1], [mode = -1]} +define tiotg_port { [port = -1] } device tiotg: tiotg_port attach tiotg at mainbus file arch/arm/omap/tiotg.c tiotg
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Wed Mar 24 14:21:08 UTC 2021 Modified Files: src/sys/arch/arm/broadcom [thorpej-cfargs]: bcm2835_vcaudio.c src/sys/arch/arm/omap [thorpej-cfargs]: tiotg.c src/sys/arch/x86/pci [thorpej-cfargs]: pcib.c src/sys/dev/acpi/wmi [thorpej-cfargs]: wmi_acpi.c src/sys/dev/hdaudio [thorpej-cfargs]: hdaudio.c src/sys/dev/pci [thorpej-cfargs]: ichsmb.c ismt.c piixpm.c Log Message: Don't filter interface attributes in rescan functions for devices that carry only a single interface attribute. The autoconfiguration machinery already considers interface attributes when searching for possible parents. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/arm/broadcom/bcm2835_vcaudio.c cvs rdiff -u -r1.7.18.1 -r1.7.18.2 src/sys/arch/arm/omap/tiotg.c cvs rdiff -u -r1.19 -r1.19.10.1 src/sys/arch/x86/pci/pcib.c cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/dev/acpi/wmi/wmi_acpi.c cvs rdiff -u -r1.13.2.2 -r1.13.2.3 src/sys/dev/hdaudio/hdaudio.c cvs rdiff -u -r1.69 -r1.69.2.1 src/sys/dev/pci/ichsmb.c cvs rdiff -u -r1.7 -r1.7.10.1 src/sys/dev/pci/ismt.c cvs rdiff -u -r1.63 -r1.63.8.1 src/sys/dev/pci/piixpm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm2835_vcaudio.c diff -u src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.17 src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.17.2.1 --- src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.17 Wed Jan 27 12:06:10 2021 +++ src/sys/arch/arm/broadcom/bcm2835_vcaudio.c Wed Mar 24 14:21:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_vcaudio.c,v 1.17 2021/01/27 12:06:10 nia Exp $ */ +/* $NetBSD: bcm2835_vcaudio.c,v 1.17.2.1 2021/03/24 14:21:08 thorpej Exp $ */ /*- * Copyright (c) 2013 Jared D. McNeill @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_vcaudio.c,v 1.17 2021/01/27 12:06:10 nia Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_vcaudio.c,v 1.17.2.1 2021/03/24 14:21:08 thorpej Exp $"); #include #include @@ -237,7 +237,7 @@ vcaudio_rescan(device_t self, const char struct vcaudio_softc *sc = device_private(self); int error; - if (ifattr_match(ifattr, "audiobus") && sc->sc_audiodev == NULL) { + if (sc->sc_audiodev == NULL) { error = vcaudio_init(sc); if (error) { return error; Index: src/sys/arch/arm/omap/tiotg.c diff -u src/sys/arch/arm/omap/tiotg.c:1.7.18.1 src/sys/arch/arm/omap/tiotg.c:1.7.18.2 --- src/sys/arch/arm/omap/tiotg.c:1.7.18.1 Tue Mar 23 07:14:44 2021 +++ src/sys/arch/arm/omap/tiotg.c Wed Mar 24 14:21:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tiotg.c,v 1.7.18.1 2021/03/23 07:14:44 thorpej Exp $ */ +/* $NetBSD: tiotg.c,v 1.7.18.2 2021/03/24 14:21:08 thorpej Exp $ */ /* * Copyright (c) 2013 Manuel Bouyer. All rights reserved. * @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.7.18.1 2021/03/23 07:14:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.7.18.2 2021/03/24 14:21:08 thorpej Exp $"); #include "opt_omap.h" #include "locators.h" @@ -196,8 +196,6 @@ tiotg_rescan(device_t self, const char * for (i = 0; i < TI_OTG_NPORTS; i++) { if (sc->sc_motgdev[i] != NULL) continue; - if (!ifattr_match(ifattr, "tiotg_port")) - continue; if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, USB_CTRL_OFFSET(i), USB_PORT_SIZE, &aa.aa_ioh) < 0) { aprint_error_dev(self, Index: src/sys/arch/x86/pci/pcib.c diff -u src/sys/arch/x86/pci/pcib.c:1.19 src/sys/arch/x86/pci/pcib.c:1.19.10.1 --- src/sys/arch/x86/pci/pcib.c:1.19 Fri Oct 4 12:23:37 2019 +++ src/sys/arch/x86/pci/pcib.c Wed Mar 24 14:21:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcib.c,v 1.19 2019/10/04 12:23:37 mrg Exp $ */ +/* $NetBSD: pcib.c,v 1.19.10.1 2021/03/24 14:21:08 thorpej Exp $ */ /*- * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.19 2019/10/04 12:23:37 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.19.10.1 2021/03/24 14:21:08 thorpej Exp $"); #include #include @@ -228,6 +228,11 @@ pcibrescan(device_t self, const char *if struct pcib_softc *sc = device_private(self); struct isabus_attach_args iba; + /* + * Even though pcib only has a single "isabus" interface + * attribute, this function is referenced by other drivers + * that carry more, so we go ahead and filter. + */ if (ifattr_match(ifattr, "isabus") && sc->sc_isabus == NULL) { /* * Attach the ISA bus behind this bridge. @@ -239,7 +244,9 @@ pcibrescan(device_t self, const char *if iba.iba_dmat = &isa_bus_dma_tag; #endif sc->sc_isabus = - config_found_ia(self, "isabus", &iba, isabusprint); + config_found(self, &iba, isabusprint, + CFARG_IATTR, "isabus", + CFARG_EOL); } return 0; } Index: src/sys/dev/acpi/wmi/wmi_acpi.c diff -u src/sys/dev/acpi/wmi/wmi_acpi.c:1.17 src/sys/dev/acpi/wmi/wmi
CVS commit: [thorpej-cfargs] src/sys/arch/hpcmips/dev
Module Name:src Committed By: thorpej Date: Tue Mar 23 06:18:23 UTC 2021 Modified Files: src/sys/arch/hpcmips/dev [thorpej-cfargs]: plumpcmcia.c Log Message: plumpcmcia has only a single interface attribute, so no need to use config_found_ia(). While here, also fix an apparent bug left over from when device_t and driver softcs were fully split ... config_found() takes a device_t, not the associated softc. (Issue was masked by a case to "void *".) To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.32.1 src/sys/arch/hpcmips/dev/plumpcmcia.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/dev/plumpcmcia.c diff -u src/sys/arch/hpcmips/dev/plumpcmcia.c:1.28 src/sys/arch/hpcmips/dev/plumpcmcia.c:1.28.32.1 --- src/sys/arch/hpcmips/dev/plumpcmcia.c:1.28 Thu Jun 30 08:51:06 2016 +++ src/sys/arch/hpcmips/dev/plumpcmcia.c Tue Mar 23 06:18:23 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: plumpcmcia.c,v 1.28 2016/06/30 08:51:06 skrll Exp $ */ +/* $NetBSD: plumpcmcia.c,v 1.28.32.1 2021/03/23 06:18:23 thorpej Exp $ */ /* * Copyright (c) 1999, 2000 UCHIYAMA Yasushi. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.28 2016/06/30 08:51:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.28.32.1 2021/03/23 06:18:23 thorpej Exp $"); #include #include @@ -303,14 +303,13 @@ static void plumpcmcia_attach_socket(struct plumpcmcia_handle *ph) { struct pcmciabus_attach_args paa; - struct plumpcmcia_softc *sc = device_private(ph->ph_parent); paa.paa_busname = "pcmcia"; paa.pct = (pcmcia_chipset_tag_t)&plumpcmcia_functions; paa.pch = (pcmcia_chipset_handle_t)ph; - if ((ph->ph_pcmcia = config_found_ia((void*)sc, "pcmciabus", &paa, - plumpcmcia_print))) { + if ((ph->ph_pcmcia = config_found(ph->ph_parent, &paa, plumpcmcia_print, + CFARG_EOL))) { /* Enable slot */ plum_conf_write(ph->ph_regt, ph->ph_regh, PLUM_PCMCIA_SLOTCTRL,
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci/imcsmb
Module Name:src Committed By: thorpej Date: Tue Mar 23 01:29:32 UTC 2021 Modified Files: src/sys/arch/x86/pci/imcsmb [thorpej-cfargs]: imcsmb.c Log Message: In imcsmb_rescan(), no need to explcitly check that we're being asked to rescan on the "i2cbus" interface attribute. The autoconfiguration machinery will not request a rescan of an interface attribute that a device does not carry, and imcsmb only carries "i2cbus". To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.10.1 src/sys/arch/x86/pci/imcsmb/imcsmb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/imcsmb/imcsmb.c diff -u src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3 src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.1 --- src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3 Sun Dec 22 23:23:31 2019 +++ src/sys/arch/x86/pci/imcsmb/imcsmb.c Tue Mar 23 01:29:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imcsmb.c,v 1.3 2019/12/22 23:23:31 thorpej Exp $ */ +/* $NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3 2019/12/22 23:23:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $"); #include #include @@ -134,7 +134,7 @@ imcsmb_attach(device_t parent, device_t if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - imcsmb_rescan(self, "i2cbus", 0); + imcsmb_rescan(self, NULL, NULL); } static int @@ -143,9 +143,6 @@ imcsmb_rescan(device_t self, const char struct imcsmb_softc *sc = device_private(self); struct i2cbus_attach_args iba; - if (!ifattr_match(ifattr, "i2cbus")) - return 0; - /* Create the i2cbus child */ if (sc->sc_smbus != NULL) return 0;
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci
Module Name:src Committed By: thorpej Date: Tue Mar 23 01:25:48 UTC 2021 Modified Files: src/sys/arch/x86/pci [thorpej-cfargs]: files.pci Log Message: Remove unneceesary "imcsmb" attribute from "imc". To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.25.4.1 src/sys/arch/x86/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/files.pci diff -u src/sys/arch/x86/pci/files.pci:1.25 src/sys/arch/x86/pci/files.pci:1.25.4.1 --- src/sys/arch/x86/pci/files.pci:1.25 Wed Oct 14 10:19:11 2020 +++ src/sys/arch/x86/pci/files.pci Tue Mar 23 01:25:48 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.25 2020/10/14 10:19:11 ryo Exp $ +# $NetBSD: files.pci,v 1.25.4.1 2021/03/23 01:25:48 thorpej Exp $ device aapic attach aapic at pci @@ -83,7 +83,7 @@ file arch/x86/pci/fwhrng.c fwhrng needs # Intel Integrated Memory Controller and associated SMBus # (Experimental) -device imc {}: imcsmb +device imc {} attach imc at pci file arch/x86/pci/imcsmb/imc.c imc
CVS commit: [thorpej-cfargs] src/sys/arch/usermode/conf
Module Name:src Committed By: thorpej Date: Tue Mar 23 01:17:35 UTC 2021 Modified Files: src/sys/arch/usermode/conf [thorpej-cfargs]: files.usermode Log Message: Remove unneeded interface attributes from vatapi. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.21.4.1 src/sys/arch/usermode/conf/files.usermode Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/conf/files.usermode diff -u src/sys/arch/usermode/conf/files.usermode:1.21 src/sys/arch/usermode/conf/files.usermode:1.21.4.1 --- src/sys/arch/usermode/conf/files.usermode:1.21 Wed Oct 21 13:31:52 2020 +++ src/sys/arch/usermode/conf/files.usermode Tue Mar 23 01:17:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.usermode,v 1.21 2020/10/21 13:31:52 christos Exp $ +# $NetBSD: files.usermode,v 1.21.4.1 2021/03/23 01:17:35 thorpej Exp $ maxpartitions 8 maxusers 8 16 64 @@ -48,7 +48,7 @@ include "dev/scsipi/files.scsipi" #attach vscsi at thunkbus with vscsi_thunkbus #file atch/usermode/dev/vscsi_thunkbus.c vscsi_thunkbus -device vatapi { } : atapi, atapibus +device vatapi: atapi attach vatapi at thunkbus with vatapi_thunkbus file arch/usermode/dev/vatapi.c vatapi_thunkbus
CVS commit: [thorpej-cfargs] src/sys/arch/sparc/conf
Module Name:src Committed By: thorpej Date: Mon Mar 22 23:52:45 UTC 2021 Modified Files: src/sys/arch/sparc/conf [thorpej-cfargs]: files.sparc Log Message: Remove unneeded interface attribute from mspcic; it carries "pcibus" already, which is all that's required. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.162.4.1 src/sys/arch/sparc/conf/files.sparc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/conf/files.sparc diff -u src/sys/arch/sparc/conf/files.sparc:1.162 src/sys/arch/sparc/conf/files.sparc:1.162.4.1 --- src/sys/arch/sparc/conf/files.sparc:1.162 Wed Oct 21 13:31:52 2020 +++ src/sys/arch/sparc/conf/files.sparc Mon Mar 22 23:52:45 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc,v 1.162 2020/10/21 13:31:52 christos Exp $ +# $NetBSD: files.sparc,v 1.162.4.1 2021/03/22 23:52:45 thorpej Exp $ # @(#)files.sparc 8.1 (Berkeley) 7/19/93 # sparc-specific configuration info @@ -24,7 +24,7 @@ attach msiiep at mainbus include "dev/i2o/files.i2o" include "dev/pci/files.pci" -device mspcic {}: pcibus +device mspcic: pcibus attach mspcic at msiiep file arch/sparc/sparc/msiiep.c msiiep | mspcic file arch/sparc/sparc/pci_machdep.c msiiep | mspcic
CVS commit: [thorpej-cfargs] src/sys/arch/macppc/conf
Module Name:src Committed By: thorpej Date: Mon Mar 22 23:14:15 UTC 2021 Modified Files: src/sys/arch/macppc/conf [thorpej-cfargs]: files.macppc Log Message: Remove meningless "ki2c" attribute on the ki2c device declaration line. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.115.4.1 src/sys/arch/macppc/conf/files.macppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/conf/files.macppc diff -u src/sys/arch/macppc/conf/files.macppc:1.115 src/sys/arch/macppc/conf/files.macppc:1.115.4.1 --- src/sys/arch/macppc/conf/files.macppc:1.115 Sat Aug 8 22:37:19 2020 +++ src/sys/arch/macppc/conf/files.macppc Mon Mar 22 23:14:15 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.macppc,v 1.115 2020/08/08 22:37:19 macallan Exp $ +# $NetBSD: files.macppc,v 1.115.4.1 2021/03/22 23:14:15 thorpej Exp $ # # macppc-specific configuration info @@ -284,7 +284,7 @@ defflag opt_macppc.h PB3400_CARDBUS_HACK file arch/macppc/macppc/rbus_machdep.c cardbus # Keywest I2C -device ki2c: i2cbus, ki2c +device ki2c: i2cbus attach ki2c at obio, uni_n file arch/macppc/dev/ki2c.c ki2c defflag opt_ki2c.h KI2C_DEBUG
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Mon Mar 22 17:21:09 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c src/sys/sys [thorpej-cfargs]: device.h Log Message: Temporarily continue to provide config_found_ia(). To generate a diff of this commit: cvs rdiff -u -r1.277.2.4 -r1.277.2.5 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.167.2.2 -r1.167.2.3 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.4 src/sys/kern/subr_autoconf.c:1.277.2.5 --- src/sys/kern/subr_autoconf.c:1.277.2.4 Mon Mar 22 02:01:02 2021 +++ src/sys/kern/subr_autoconf.c Mon Mar 22 17:21:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.4 2021/03/22 02:01:02 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.5 2021/03/22 17:21:09 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.4 2021/03/22 02:01:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.5 2021/03/22 17:21:09 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1219,15 +1219,16 @@ config_vfound(device_t parent, void *aux return NULL; } -#if 0 +/* XXX GC */ device_t config_found_ia(device_t parent, const char *ifattr, void *aux, cfprint_t print) { - return config_found_sm_loc(parent, ifattr, NULL, aux, print, NULL); + return config_found(parent, aux, print, + CFARG_IATTR, ifattr, + CFARG_EOL); } -#endif device_t config_found(device_t parent, void *aux, cfprint_t print, cfarg_t tag, ...) Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.167.2.2 src/sys/sys/device.h:1.167.2.3 --- src/sys/sys/device.h:1.167.2.2 Sun Mar 21 21:09:16 2021 +++ src/sys/sys/device.h Mon Mar 22 17:21:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.167.2.2 2021/03/21 21:09:16 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.167.2.3 2021/03/22 17:21:09 thorpej Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -582,6 +582,7 @@ int config_stdsubmatch(device_t, cfdata_ cfdata_t config_search(device_t, void *, cfarg_t, ...); cfdata_t config_rootsearch(cfsubmatch_t, const char *, void *); device_t config_found(device_t, void *, cfprint_t, cfarg_t, ...); +device_t config_found_ia(device_t, const char *, void *, cfprint_t); /* XXX */ device_t config_rootfound(const char *, void *); device_t config_attach_loc(device_t, cfdata_t, const int *, void *, cfprint_t); device_t config_attach(device_t, cfdata_t, void *, cfprint_t);
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Mon Mar 22 16:47:13 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: twa.c Log Message: Fix missing comma. To generate a diff of this commit: cvs rdiff -u -r1.58.10.2 -r1.58.10.3 src/sys/dev/pci/twa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/twa.c diff -u src/sys/dev/pci/twa.c:1.58.10.2 src/sys/dev/pci/twa.c:1.58.10.3 --- src/sys/dev/pci/twa.c:1.58.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/twa.c Mon Mar 22 16:47:13 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: twa.c,v 1.58.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: twa.c,v 1.58.10.3 2021/03/22 16:47:13 thorpej Exp $ */ /* $wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $ */ /*- @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.58.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.58.10.3 2021/03/22 16:47:13 thorpej Exp $"); //#define TWA_DEBUG @@ -1010,7 +1010,7 @@ twa_request_bus_scan(device_t self, cons sc->sc_units[unit].td_dev = config_found(sc->twa_dv, &twaa, twa_print, -CFARG_SUBMATCH, config_stdsubmatch +CFARG_SUBMATCH, config_stdsubmatch, CFARG_IATTR, attr, CFARG_LOCATORS, locs, CFARG_EOL);
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Mon Mar 22 16:23:46 UTC 2021 Modified Files: src/sys/arch/acorn32/mainbus [thorpej-cfargs]: pioc.c src/sys/arch/acorn32/podulebus [thorpej-cfargs]: podulebus.c src/sys/arch/algor/dev [thorpej-cfargs]: mainbus.c src/sys/arch/alpha/mcbus [thorpej-cfargs]: mcbus.c src/sys/arch/alpha/sableio [thorpej-cfargs]: sableio.c src/sys/arch/alpha/tlsb [thorpej-cfargs]: gbus.c tlsb.c src/sys/arch/arm/at91 [thorpej-cfargs]: at91bus.c src/sys/arch/arm/clps711x [thorpej-cfargs]: clpssoc.c src/sys/arch/arm/ep93xx [thorpej-cfargs]: epsoc.c src/sys/arch/arm/marvell [thorpej-cfargs]: mvsoc.c src/sys/arch/arm/nxp [thorpej-cfargs]: imx6_usb.c src/sys/arch/dreamcast/dev/maple [thorpej-cfargs]: maple.c src/sys/arch/emips/ebus [thorpej-cfargs]: ebus.c src/sys/arch/epoc32/windermere [thorpej-cfargs]: windermere.c src/sys/arch/evbmips/alchemy [thorpej-cfargs]: obio.c src/sys/arch/evbmips/malta/dev [thorpej-cfargs]: mainbus.c src/sys/arch/evbmips/sbmips [thorpej-cfargs]: zbbus.c src/sys/arch/evbppc/mpc85xx [thorpej-cfargs]: autoconf.c src/sys/arch/evbppc/pmppc [thorpej-cfargs]: mainbus.c src/sys/arch/evbppc/walnut/dev [thorpej-cfargs]: pbus.c src/sys/arch/hp300/dev [thorpej-cfargs]: dio.c frodo.c src/sys/arch/hpcsh/dev/hd64461 [thorpej-cfargs]: hd64461pcmcia.c src/sys/arch/hpcsh/dev/hd64465 [thorpej-cfargs]: hd64465pcmcia.c src/sys/arch/hppa/dev [thorpej-cfargs]: astro.c gecko.c phantomas.c uturn.c src/sys/arch/hppa/gsc [thorpej-cfargs]: gscbus.c src/sys/arch/hppa/hppa [thorpej-cfargs]: mainbus.c src/sys/arch/i386/pnpbios [thorpej-cfargs]: pnpbios.c src/sys/arch/mips/alchemy [thorpej-cfargs]: aubus.c src/sys/arch/mips/alchemy/dev [thorpej-cfargs]: aupsc.c src/sys/arch/mips/atheros [thorpej-cfargs]: arbus.c src/sys/arch/mips/cavium [thorpej-cfargs]: octeon_bootbus.c octeon_iobus.c src/sys/arch/mips/sibyte/dev [thorpej-cfargs]: sbobio.c sbscd.c sbsmbus.c src/sys/arch/pmax/ibus [thorpej-cfargs]: ibus.c src/sys/arch/powerpc/booke/dev [thorpej-cfargs]: pq3duart.c src/sys/arch/powerpc/ibm4xx/dev [thorpej-cfargs]: exb.c opb.c src/sys/arch/sbmips/sbmips [thorpej-cfargs]: zbbus.c src/sys/arch/sgimips/gio [thorpej-cfargs]: gio.c src/sys/arch/sgimips/hpc [thorpej-cfargs]: hpc.c src/sys/arch/sparc/dev [thorpej-cfargs]: bootbus.c src/sys/arch/sparc64/dev [thorpej-cfargs]: sab.c src/sys/arch/sun3/sun3 [thorpej-cfargs]: obio.c src/sys/arch/sun3/sun3x [thorpej-cfargs]: obio.c src/sys/dev/ata [thorpej-cfargs]: ata_raid.c src/sys/dev/cardbus [thorpej-cfargs]: cardbus.c src/sys/dev/eisa [thorpej-cfargs]: eisa.c src/sys/dev/hdaudio [thorpej-cfargs]: hdaudio.c src/sys/dev/hil [thorpej-cfargs]: hil.c src/sys/dev/i2c [thorpej-cfargs]: i2c.c ihidev.c src/sys/dev/i2o [thorpej-cfargs]: iop.c src/sys/dev/ic [thorpej-cfargs]: aac.c cac.c i82365.c icp.c mfi.c mlx.c tcic2.c src/sys/dev/ieee1394 [thorpej-cfargs]: firewire.c src/sys/dev/isa [thorpej-cfargs]: isa.c src/sys/dev/isapnp [thorpej-cfargs]: isapnp.c src/sys/dev/marvell [thorpej-cfargs]: gt.c if_gfe.c if_mvgbe.c src/sys/dev/mca [thorpej-cfargs]: edc_mca.c mca.c src/sys/dev/pci [thorpej-cfargs]: amr.c mfii.c mpii.c pci.c puc.c twa.c twe.c src/sys/dev/pci/cxgb [thorpej-cfargs]: cxgb_main.c src/sys/dev/pcmcia [thorpej-cfargs]: pcmcia.c pcmcom.c src/sys/dev/spi [thorpej-cfargs]: spi.c src/sys/dev/tc [thorpej-cfargs]: ioasic_subr.c tc.c tcds.c zs_ioasic.c src/sys/dev/usb [thorpej-cfargs]: u3g.c uark.c ubsa.c uchcom.c uftdi.c ugensa.c uhidev.c uhmodem.c uipaq.c umcs.c umct.c umodem_common.c uplcom.c uslsa.c uvisor.c uvscom.c Log Message: Audit CFARG_IATTR in config_found() calls, and remove it in situations where the interface attribute is not ambiguous. To generate a diff of this commit: cvs rdiff -u -r1.18.52.3 -r1.18.52.4 src/sys/arch/acorn32/mainbus/pioc.c cvs rdiff -u -r1.30.2.1 -r1.30.2.2 src/sys/arch/acorn32/podulebus/podulebus.c cvs rdiff -u -r1.28.4.1 -r1.28.4.2 src/sys/arch/algor/dev/mainbus.c cvs rdiff -u -r1.22.62.1 -r1.22.62.2 src/sys/arch/alpha/mcbus/mcbus.c cvs rdiff -u -r1.13.68.1 -r1.13.68.2 src/sys/arch/alpha/sableio/sableio.c cvs rdiff -u -r1.22.68.1 -r1.22.68.2 src/sys/arch/alpha/tlsb/gbus.c cvs rdiff -u -r1.38.44.1 -r1.38.44.2 src/sys/arch/alpha/tlsb/tlsb.c cvs rdiff -u -r1.27.4.3 -r1.27.4.4 src/sys/arch/arm/at91/at91bus.c cvs rdiff -u -r1.1.54.1 -r1.1.54.2 src/sys/arch/arm/clps711x/clpssoc.c cvs rdiff -u -r1.13.52.3 -r1.13.52.4 src/sys/arch/arm/ep93xx/epsoc.c cvs rdif
CVS commit: [thorpej-cfargs] src/sys/dev/marvell
Module Name:src Committed By: thorpej Date: Mon Mar 22 14:50:30 UTC 2021 Modified Files: src/sys/dev/marvell [thorpej-cfargs]: files.discovery Log Message: No need to define interface attributes separately from the devices that carry them if they are specific to that device; just declare the interface on the device directly. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.46.1 src/sys/dev/marvell/files.discovery Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/marvell/files.discovery diff -u src/sys/dev/marvell/files.discovery:1.22 src/sys/dev/marvell/files.discovery:1.22.46.1 --- src/sys/dev/marvell/files.discovery:1.22 Fri Sep 6 00:56:12 2013 +++ src/sys/dev/marvell/files.discovery Mon Mar 22 14:50:30 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.discovery,v 1.22 2013/09/06 00:56:12 matt Exp $ +# $NetBSD: files.discovery,v 1.22.46.1 2021/03/22 14:50:30 thorpej Exp $ # # Config file and device description for machine-independent support for # the Marvell (formerly Galileo Technology) Discovery system controllers. @@ -23,8 +23,7 @@ defparam opt_marvell.h GT_MPSC_FREQUENCY defparam opt_marvell.h GT_MPP_WATCHDOG defflag opt_marvell.h GT_DEVBUS GT_ECC GT_COMM GT_WATCHDOG -define gt { [unit = -1], [offset = -1], [irq = -1] } -device gt: gt +device gt { [unit = -1], [offset = -1], [irq = -1] } file dev/marvell/gt.c gt # PCI Interface @@ -38,8 +37,7 @@ file dev/marvell/mvpex.c mvpex & (mvpex attach mvpex at gt with mvpex_gt # Fast ethernet -define gfec { [port = -1], [irq = -1] } -device gfec: gfec +device gfec { [port = -1], [irq = -1] } attach gfec at gt device gfe: ether, ifnet, arp, mii attach gfe at gfec @@ -50,8 +48,7 @@ device gtmpsc: tty attach gtmpsc at gt file dev/marvell/gtmpsc.c gtmpsc needs-flag -define obio { [offset = -1], [size = 0], [irq = -1] } -device obio: obio +device obio { [offset = -1], [size = 0], [irq = -1] } attach obio at gt file dev/marvell/obio.c obio @@ -60,8 +57,7 @@ attach mvsata at gt with mvsata_gt file dev/marvell/mvsata_mv.c mvsata_gt | mvsata_mbus # Gigabit Ethernet Controller Interface -define mvgbec { [port = -1], [irq = -1] } -device mvgbec: mvgbec +device mvgbec { [port = -1], [irq = -1] } attach mvgbec at gt with mvgbec_gt device mvgbe: ether, ifnet, arp, mii attach mvgbe at mvgbec
CVS commit: [thorpej-cfargs] src/sys/dev/ieee1394
Module Name:src Committed By: thorpej Date: Mon Mar 22 14:39:14 UTC 2021 Modified Files: src/sys/dev/ieee1394 [thorpej-cfargs]: files.ieee1394 Log Message: sbp does not need its own (unused) interface attribute; it already carries the "scsi" interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.168.1 src/sys/dev/ieee1394/files.ieee1394 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ieee1394/files.ieee1394 diff -u src/sys/dev/ieee1394/files.ieee1394:1.10 src/sys/dev/ieee1394/files.ieee1394:1.10.168.1 --- src/sys/dev/ieee1394/files.ieee1394:1.10 Sun Apr 30 12:11:58 2006 +++ src/sys/dev/ieee1394/files.ieee1394 Mon Mar 22 14:39:14 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.ieee1394,v 1.10 2006/04/30 12:11:58 kiyohara Exp $ +# $NetBSD: files.ieee1394,v 1.10.168.1 2021/03/22 14:39:14 thorpej Exp $ file dev/ieee1394/fwohci.c fwohci @@ -15,6 +15,6 @@ device fwip: arp, ieee1394, ifnet attach fwip at ieee1394if file dev/ieee1394/if_fwip.c fwip -device sbp { }: scsi +device sbp: scsi attach sbp at ieee1394if file dev/ieee1394/sbp.c sbp
CVS commit: [thorpej-cfargs] src/sys/arch/evbppc/conf
Module Name:src Committed By: thorpej Date: Mon Mar 22 03:06:01 UTC 2021 Modified Files: src/sys/arch/evbppc/conf [thorpej-cfargs]: files.pmppc Log Message: mainbus does not need to carry the "pcibus" interface attribute; PCI busses do not attach to mainbus, they attach to cpc@mainbus, and cpc already carries the "pcibus" interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.28.1 src/sys/arch/evbppc/conf/files.pmppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbppc/conf/files.pmppc diff -u src/sys/arch/evbppc/conf/files.pmppc:1.7 src/sys/arch/evbppc/conf/files.pmppc:1.7.28.1 --- src/sys/arch/evbppc/conf/files.pmppc:1.7 Sat Feb 18 05:08:47 2017 +++ src/sys/arch/evbppc/conf/files.pmppc Mon Mar 22 03:06:01 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.pmppc,v 1.7 2017/02/18 05:08:47 rin Exp $ +# $NetBSD: files.pmppc,v 1.7.28.1 2021/03/22 03:06:01 thorpej Exp $ # # maxpartitions 16 @@ -32,7 +32,7 @@ file dev/md_root.c memory_disk_hooks # System bus types # define mainbus { [addr=-1], [irq=-1] } -device mainbus: mainbus, pcibus +device mainbus: mainbus attach mainbus at root device cpu attach cpu at mainbus
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sun Mar 21 19:06:19 UTC 2021 Modified Files: src/sys/arch/x86/pci [thorpej-cfargs]: amdnb_misc.c amdsmn.c src/sys/dev/audio [thorpej-cfargs]: audio.c src/sys/dev/i2c [thorpej-cfargs]: i2c.c src/sys/dev/isa [thorpej-cfargs]: pcppi.c Log Message: In "rescan" routines, always pass locators and the interface attribute straight through to config_search(). Also, for devices that carry only one interface attribute, no need to do an ifattr_match(), because rescan_with_cfdata() will have already validated that the parent is eligible, which includes an interface attribute check. To generate a diff of this commit: cvs rdiff -u -r1.3.14.2 -r1.3.14.3 src/sys/arch/x86/pci/amdnb_misc.c cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/sys/arch/x86/pci/amdsmn.c cvs rdiff -u -r1.91.2.1 -r1.91.2.2 src/sys/dev/audio/audio.c cvs rdiff -u -r1.77.2.1 -r1.77.2.2 src/sys/dev/i2c/i2c.c cvs rdiff -u -r1.45.22.1 -r1.45.22.2 src/sys/dev/isa/pcppi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/amdnb_misc.c diff -u src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.2 src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.3 --- src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.2 Sun Mar 21 17:35:48 2021 +++ src/sys/arch/x86/pci/amdnb_misc.c Sun Mar 21 19:06:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdnb_misc.c,v 1.3.14.2 2021/03/21 17:35:48 thorpej Exp $ */ +/* $NetBSD: amdnb_misc.c,v 1.3.14.3 2021/03/21 19:06:19 thorpej Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3.14.2 2021/03/21 17:35:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3.14.3 2021/03/21 19:06:19 thorpej Exp $"); #include #include @@ -158,9 +158,6 @@ amdnb_misc_rescan(device_t self, const c { struct amdnb_misc_softc *sc = device_private(self); - if (!ifattr_match(ifattr, "amdnb_miscbus")) - return 0; - config_search(self, &sc->sc_pa, CFARG_SUBMATCH, amdnb_misc_search, CFARG_IATTR, ifattr, Index: src/sys/arch/x86/pci/amdsmn.c diff -u src/sys/arch/x86/pci/amdsmn.c:1.10.4.1 src/sys/arch/x86/pci/amdsmn.c:1.10.4.2 --- src/sys/arch/x86/pci/amdsmn.c:1.10.4.1 Sat Mar 20 19:33:39 2021 +++ src/sys/arch/x86/pci/amdsmn.c Sun Mar 21 19:06:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdsmn.c,v 1.10.4.1 2021/03/20 19:33:39 thorpej Exp $ */ +/* $NetBSD: amdsmn.c,v 1.10.4.2 2021/03/21 19:06:19 thorpej Exp $ */ /*- * Copyright (c) 2017, 2019 Conrad Meyer @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.1 2021/03/20 19:33:39 thorpej Exp $ "); +__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.2 2021/03/21 19:06:19 thorpej Exp $ "); /* * Driver for the AMD Family 15h (model 60+) and 17h CPU @@ -153,13 +153,14 @@ amdsmn_attach(device_t parent, device_t } static int -amdsmn_rescan(device_t self, const char *ifattr, const int *flags) +amdsmn_rescan(device_t self, const char *ifattr, const int *locators) { struct amdsmn_softc *sc = device_private(self); config_search(self, &sc->pa, CFARG_SUBMATCH, amdsmn_misc_search, CFARG_IATTR, ifattr, + CFARG_LOCATORS, locators, CFARG_EOL); return 0; Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.91.2.1 src/sys/dev/audio/audio.c:1.91.2.2 --- src/sys/dev/audio/audio.c:1.91.2.1 Sat Mar 20 19:33:40 2021 +++ src/sys/dev/audio/audio.c Sun Mar 21 19:06:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.91.2.1 2021/03/20 19:33:40 thorpej Exp $ */ +/* $NetBSD: audio.c,v 1.91.2.2 2021/03/21 19:06:19 thorpej Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.1 2021/03/20 19:33:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.2 2021/03/21 19:06:19 thorpej Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -1410,16 +1410,14 @@ audiosearch(device_t parent, cfdata_t cf } static int -audiorescan(device_t self, const char *ifattr, const int *flags) +audiorescan(device_t self, const char *ifattr, const int *locators) { struct audio_softc *sc = device_private(self); - if (!ifattr_match(ifattr, "audio")) - return 0; - config_search(sc->sc_dev, NULL, CFARG_SUBMATCH, audiosearch, - CFARG_IATTR, "audio", + CFARG_IATTR, ifattr, + CFARG_LOCATORS, locators, CFARG_EOL); return 0; Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.77.2.1 src/sys/dev/i2c/i2c.c:1.77.2.2 --- src/sys/dev/i2c/i2c.c:1.77.2.1 Sat Mar 20 19:33:40 2021 +++ src/sys/dev/i2c/i2c.c Sun Mar 21 19:06:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.77.2.1 2021/03/20 19:33:40 thorpej Exp $ */ +/* $NetBSD: i2c.c,v 1.77.2.2 2021/03/21 19:06:19 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif
CVS commit: [thorpej-cfargs] src/sys/dev/gpio
Module Name:src Committed By: thorpej Date: Sun Mar 21 18:03:32 UTC 2021 Modified Files: src/sys/dev/gpio [thorpej-cfargs]: gpio.c Log Message: Remove a now-unused variable. To generate a diff of this commit: cvs rdiff -u -r1.64.10.3 -r1.64.10.4 src/sys/dev/gpio/gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.64.10.3 src/sys/dev/gpio/gpio.c:1.64.10.4 --- src/sys/dev/gpio/gpio.c:1.64.10.3 Sun Mar 21 17:35:48 2021 +++ src/sys/dev/gpio/gpio.c Sun Mar 21 18:03:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.64.10.3 2021/03/21 17:35:48 thorpej Exp $ */ +/* $NetBSD: gpio.c,v 1.64.10.4 2021/03/21 18:03:32 thorpej Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.3 2021/03/21 17:35:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.4 2021/03/21 18:03:32 thorpej Exp $"); /* * General Purpose Input/Output framework. @@ -189,7 +189,6 @@ gpio_childdetached(device_t self, device static int gpio_rescan(device_t self, const char *ifattr, const int *locators) { - struct gpio_softc *sc = device_private(self); config_search(self, NULL, CFARG_SUBMATCH, gpio_search,
CVS commit: [thorpej-cfargs] src/sys/kern
Module Name:src Committed By: thorpej Date: Sun Mar 21 17:58:40 UTC 2021 Modified Files: src/sys/kern [thorpej-cfargs]: subr_autoconf.c Log Message: In config_search(), we already asserted that either an interface attribute is not specified, or the specified attribute is carried by the parent. Add an additional assertion: That an interface attribute is specified or that the parent has fewer than 2 interface attributes (i.e. lack of interface attribute specification would be ambiguous). Yes, "fewer than 2". Zero interface attributes doesn't really make sense, because a device cannot then be a parent of another device by definition. But cfparent_match() would already catch this situation gracefully, and there is obviously no ambiguity when a device has no interface attributes. To generate a diff of this commit: cvs rdiff -u -r1.277.2.1 -r1.277.2.2 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.277.2.1 src/sys/kern/subr_autoconf.c:1.277.2.2 --- src/sys/kern/subr_autoconf.c:1.277.2.1 Sat Mar 20 19:33:41 2021 +++ src/sys/kern/subr_autoconf.c Sun Mar 21 17:58:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.277.2.1 2021/03/20 19:33:41 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.277.2.2 2021/03/21 17:58:40 thorpej Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.1 2021/03/20 19:33:41 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.2 2021/03/21 17:58:40 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -809,6 +809,23 @@ cfdriver_get_iattr(const struct cfdriver return 0; } +#if defined(DIAGNOSTIC) +static int +cfdriver_iattr_count(const struct cfdriver *cd) +{ + const struct cfiattrdata * const *cpp; + int i; + + if (cd->cd_attrs == NULL) + return 0; + + for (i = 0, cpp = cd->cd_attrs; *cpp; cpp++) { + i++; + } + return i; +} +#endif /* DIAGNOSTIC */ + /* * Lookup an interface attribute description by name. * If the driver is given, consider only its supported attributes. @@ -1071,6 +1088,7 @@ config_vsearch(device_t parent, void *au KASSERT(config_initialized); KASSERT(!ifattr || cfdriver_get_iattr(parent->dv_cfdriver, ifattr)); + KASSERT(ifattr || cfdriver_iattr_count(parent->dv_cfdriver) < 2); m.fn = fn; m.parent = parent;
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sun Mar 21 17:35:49 UTC 2021 Modified Files: src/sys/arch/acorn32/eb7500atx [thorpej-cfargs]: rsbus.c src/sys/arch/acorn32/mainbus [thorpej-cfargs]: pioc.c src/sys/arch/amiga/clockport [thorpej-cfargs]: clockport.c src/sys/arch/arm/at91 [thorpej-cfargs]: at91bus.c src/sys/arch/arm/broadcom [thorpej-cfargs]: bcm53xx_ccb.c src/sys/arch/arm/ep93xx [thorpej-cfargs]: epsoc.c src/sys/arch/arm/gemini [thorpej-cfargs]: gemini_lpc.c src/sys/arch/arm/imx [thorpej-cfargs]: imx23_ahb.c imx23_apbh.c imx23_apbx.c imx23_usb.c imx31_ahb.c imx31_aips.c imx51_axi.c imx51_usb.c src/sys/arch/arm/iomd [thorpej-cfargs]: vidc20.c src/sys/arch/arm/ixp12x0 [thorpej-cfargs]: ixpsip.c src/sys/arch/arm/mainbus [thorpej-cfargs]: mainbus.c src/sys/arch/arm/mpcore [thorpej-cfargs]: mpcore_axi.c mpcore_pmr.c src/sys/arch/arm/omap [thorpej-cfargs]: omap2_gpmc.c omap2_l3i.c omap2_obio.c omap_emifs.c omap_ocp.c omap_tipb.c omapl1x_tipb.c src/sys/arch/arm/s3c2xx0 [thorpej-cfargs]: s3c2410.c s3c2410_extint.c s3c2410_spi.c s3c2440.c s3c2440_extint.c s3c2440_i2s.c s3c2440_spi.c s3c2800.c src/sys/arch/arm/sa11x0 [thorpej-cfargs]: sa11x0.c src/sys/arch/arm/xscale [thorpej-cfargs]: ixp425_ixme.c ixp425_npe.c ixp425_sip.c pxa2x0.c src/sys/arch/arm/zynq [thorpej-cfargs]: zynq_axi.c src/sys/arch/atari/vme [thorpej-cfargs]: vme.c src/sys/arch/cesfic/cesfic [thorpej-cfargs]: autoconf.c src/sys/arch/cobalt/cobalt [thorpej-cfargs]: mainbus.c src/sys/arch/dreamcast/dev/g1 [thorpej-cfargs]: g1bus.c src/sys/arch/dreamcast/dev/g2 [thorpej-cfargs]: g2bus.c src/sys/arch/epoc32/epoc32 [thorpej-cfargs]: external.c src/sys/arch/evbarm/adi_brh [thorpej-cfargs]: obio.c src/sys/arch/evbarm/g42xxeb [thorpej-cfargs]: gb225.c obio.c src/sys/arch/evbarm/gumstix [thorpej-cfargs]: gxio.c src/sys/arch/evbarm/hdl_g [thorpej-cfargs]: obio.c src/sys/arch/evbarm/iq80310 [thorpej-cfargs]: obio.c src/sys/arch/evbarm/iq80321 [thorpej-cfargs]: obio.c src/sys/arch/evbarm/iyonix [thorpej-cfargs]: obio.c src/sys/arch/evbarm/lubbock [thorpej-cfargs]: obio.c sacc_obio.c src/sys/arch/evbsh3/evbsh3 [thorpej-cfargs]: mainbus.c src/sys/arch/hp300/dev [thorpej-cfargs]: hpib.c src/sys/arch/hp300/hp300 [thorpej-cfargs]: autoconf.c src/sys/arch/hpcarm/dev [thorpej-cfargs]: ipaq_atmelgpio.c ipaq_saip.c j720ssp.c nbppcon.c sacc_hpcarm.c uda1341.c src/sys/arch/hpcmips/dev [thorpej-cfargs]: plum.c plumiobus.c ucb1200.c src/sys/arch/hpcmips/tx [thorpej-cfargs]: tx39sib.c tx39spi.c tx39uart.c txcsbus.c txsim.c src/sys/arch/hpcmips/vr [thorpej-cfargs]: vrc4173bcu.c vrip.c src/sys/arch/i386/pnpbios [thorpej-cfargs]: pnpbios.c src/sys/arch/iyonix/iyonix [thorpej-cfargs]: obio.c src/sys/arch/landisk/dev [thorpej-cfargs]: obio.c src/sys/arch/mac68k/mac68k [thorpej-cfargs]: mainbus.c src/sys/arch/mac68k/obio [thorpej-cfargs]: obio.c src/sys/arch/mips/ralink [thorpej-cfargs]: ralink_mainbus.c src/sys/arch/mips/rmi [thorpej-cfargs]: rmixl_iobus.c rmixl_mainbus.c rmixl_obio.c rmixl_usbi.c src/sys/arch/mips/sibyte/dev [thorpej-cfargs]: sbgbus.c src/sys/arch/mipsco/obio [thorpej-cfargs]: obio.c src/sys/arch/mmeye/mmeye [thorpej-cfargs]: mainbus.c src/sys/arch/news68k/dev [thorpej-cfargs]: hb.c src/sys/arch/news68k/news68k [thorpej-cfargs]: mainbus.c src/sys/arch/newsmips/dev [thorpej-cfargs]: hb.c src/sys/arch/next68k/dev [thorpej-cfargs]: intio.c src/sys/arch/next68k/next68k [thorpej-cfargs]: mainbus.c src/sys/arch/playstation2/dev [thorpej-cfargs]: sbus.c src/sys/arch/playstation2/playstation2 [thorpej-cfargs]: mainbus.c src/sys/arch/powerpc/booke/dev [thorpej-cfargs]: pq3obio.c src/sys/arch/prep/pnpbus [thorpej-cfargs]: pnpbus.c src/sys/arch/rs6000/mca [thorpej-cfargs]: ioplanar.c src/sys/arch/sandpoint/sandpoint [thorpej-cfargs]: eumb.c src/sys/arch/sgimips/gio [thorpej-cfargs]: gio.c src/sys/arch/sgimips/ioc [thorpej-cfargs]: ioc.c src/sys/arch/sgimips/mace [thorpej-cfargs]: mace.c src/sys/arch/sgimips/sgimips [thorpej-cfargs]: mainbus.c src/sys/arch/sh3/dev [thorpej-cfargs]: adc.c shb.c src/sys/arch/sparc/dev [thorpej-cfargs]: obio.c src/sys/arch/sun2/sun2 [thorpej-cfargs]: mbio.c mbmem.c obio.c obmem.c src/sys/arch/sun3/sun3 [thorpej-cfargs]: obmem.c vme.c src/sys/arch/sun3/sun3x [thorpej-cfargs]: vme.c src/sys/arch/vax/vsa [thorpej-cfargs]: vsbus.c src/sys/arch/x68k/dev [thorpej-cfargs]:
CVS commit: [thorpej-cfargs] src/sys/arch/sandpoint/conf
Module Name:src Committed By: thorpej Date: Sun Mar 21 16:32:00 UTC 2021 Modified Files: src/sys/arch/sandpoint/conf [thorpej-cfargs]: files.sandpoint Log Message: eumb does not need to carry the "mainbus" interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.31.62.1 src/sys/arch/sandpoint/conf/files.sandpoint Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sandpoint/conf/files.sandpoint diff -u src/sys/arch/sandpoint/conf/files.sandpoint:1.31 src/sys/arch/sandpoint/conf/files.sandpoint:1.31.62.1 --- src/sys/arch/sandpoint/conf/files.sandpoint:1.31 Sat Jan 14 19:39:25 2012 +++ src/sys/arch/sandpoint/conf/files.sandpoint Sun Mar 21 16:32:00 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.sandpoint,v 1.31 2012/01/14 19:39:25 phx Exp $ +# $NetBSD: files.sandpoint,v 1.31.62.1 2021/03/21 16:32:00 thorpej Exp $ # # Motorola's "SandPoint" evaluation board and multiplied descendents. # @@ -52,7 +52,7 @@ device nhpow: sysmon_power, sysmon_taskq attach nhpow at mainbus file arch/sandpoint/sandpoint/nhpow.c nhpow -device eumb { [ unit = -1 ] }: mainbus +device eumb { [ unit = -1 ] } attach eumb at mainbus file arch/sandpoint/sandpoint/eumb.c eumb
CVS commit: [thorpej-cfargs] src/sys/arch/cobalt/conf
Module Name:src Committed By: thorpej Date: Sat Mar 20 23:50:16 UTC 2021 Modified Files: src/sys/arch/cobalt/conf [thorpej-cfargs]: files.cobalt Log Message: There is no need to have the "pcibus" interface attribute on mainbus; PCI bus instances to not attach there. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.16.1 src/sys/arch/cobalt/conf/files.cobalt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cobalt/conf/files.cobalt diff -u src/sys/arch/cobalt/conf/files.cobalt:1.41 src/sys/arch/cobalt/conf/files.cobalt:1.41.16.1 --- src/sys/arch/cobalt/conf/files.cobalt:1.41 Mon Apr 9 20:16:16 2018 +++ src/sys/arch/cobalt/conf/files.cobalt Sat Mar 20 23:50:16 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.cobalt,v 1.41 2018/04/09 20:16:16 christos Exp $ +# $NetBSD: files.cobalt,v 1.41.16.1 2021/03/20 23:50:16 thorpej Exp $ maxpartitions 16 @@ -7,7 +7,7 @@ maxusers 2 8 64 file arch/mips/mips/mips3_clock.c file arch/mips/mips/mips3_clockintr.c -device mainbus {[addr = -1], [level = -1], [irq = -1]}: pcibus +device mainbus {[addr = -1], [level = -1], [irq = -1]} attach mainbus at root file arch/cobalt/cobalt/mainbus.c mainbus
CVS commit: [thorpej-cfargs] src/sys/arch
Module Name:src Committed By: thorpej Date: Sat Mar 20 20:49:43 UTC 2021 Modified Files: src/sys/arch/hpcmips/dev [thorpej-cfargs]: plum.c plumiobus.c ucb1200.c src/sys/arch/hpcmips/tx [thorpej-cfargs]: tx39sib.c tx39spi.c tx39uart.c txcsbus.c txsim.c src/sys/arch/hpcmips/vr [thorpej-cfargs]: vrc4173bcu.c vrip.c src/sys/arch/mips/rmi [thorpej-cfargs]: rmixl_mainbus.c Log Message: Don't pass the autoconfig print routine as the aux pointer to the indirect search routine. That argument slot is meant for "attach args" structures, not function pointers. Besides, no one actually used it anyway. To generate a diff of this commit: cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/arch/hpcmips/dev/plum.c cvs rdiff -u -r1.16.2.1 -r1.16.2.2 src/sys/arch/hpcmips/dev/plumiobus.c cvs rdiff -u -r1.19.52.1 -r1.19.52.2 src/sys/arch/hpcmips/dev/ucb1200.c cvs rdiff -u -r1.21.52.1 -r1.21.52.2 src/sys/arch/hpcmips/tx/tx39sib.c cvs rdiff -u -r1.5.52.1 -r1.5.52.2 src/sys/arch/hpcmips/tx/tx39spi.c cvs rdiff -u -r1.15.52.1 -r1.15.52.2 src/sys/arch/hpcmips/tx/tx39uart.c cvs rdiff -u -r1.22.52.1 -r1.22.52.2 src/sys/arch/hpcmips/tx/txcsbus.c cvs rdiff -u -r1.17.52.1 -r1.17.52.2 src/sys/arch/hpcmips/tx/txsim.c cvs rdiff -u -r1.24.28.1 -r1.24.28.2 src/sys/arch/hpcmips/vr/vrc4173bcu.c cvs rdiff -u -r1.37.52.1 -r1.37.52.2 src/sys/arch/hpcmips/vr/vrip.c cvs rdiff -u -r1.4.68.1 -r1.4.68.2 src/sys/arch/mips/rmi/rmixl_mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hpcmips/dev/plum.c diff -u src/sys/arch/hpcmips/dev/plum.c:1.18.2.1 src/sys/arch/hpcmips/dev/plum.c:1.18.2.2 --- src/sys/arch/hpcmips/dev/plum.c:1.18.2.1 Sat Mar 20 19:33:35 2021 +++ src/sys/arch/hpcmips/dev/plum.c Sat Mar 20 20:49:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: plum.c,v 1.18.2.1 2021/03/20 19:33:35 thorpej Exp $ */ +/* $NetBSD: plum.c,v 1.18.2.2 2021/03/20 20:49:43 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: plum.c,v 1.18.2.1 2021/03/20 19:33:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: plum.c,v 1.18.2.2 2021/03/20 20:49:43 thorpej Exp $"); #include #include @@ -112,7 +112,7 @@ plum_attach(device_t parent, device_t se * attach first. */ sc->sc_pri = 2; - config_search(self, plum_print, + config_search(self, NULL, CFARG_SUBMATCH, plum_search, CFARG_IATTR, "plumif", CFARG_EOL); @@ -121,7 +121,7 @@ plum_attach(device_t parent, device_t se * Other plum module. */ sc->sc_pri = 1; - config_search(self, plum_print, + config_search(self, NULL, CFARG_SUBMATCH, plum_search, CFARG_IATTR, "plumif", CFARG_EOL); Index: src/sys/arch/hpcmips/dev/plumiobus.c diff -u src/sys/arch/hpcmips/dev/plumiobus.c:1.16.2.1 src/sys/arch/hpcmips/dev/plumiobus.c:1.16.2.2 --- src/sys/arch/hpcmips/dev/plumiobus.c:1.16.2.1 Sat Mar 20 19:33:35 2021 +++ src/sys/arch/hpcmips/dev/plumiobus.c Sat Mar 20 20:49:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: plumiobus.c,v 1.16.2.1 2021/03/20 19:33:35 thorpej Exp $ */ +/* $NetBSD: plumiobus.c,v 1.16.2.2 2021/03/20 20:49:43 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: plumiobus.c,v 1.16.2.1 2021/03/20 19:33:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: plumiobus.c,v 1.16.2.2 2021/03/20 20:49:43 thorpej Exp $"); #define PLUMIOBUSDEBUG @@ -163,7 +163,7 @@ plumiobus_attach(device_t parent, device plumiobus_dump(sc); #endif - config_search(self, plumiobus_print, + config_search(self, NULL, CFARG_SUBMATCH, plumiobus_search, CFARG_IATTR, "plumiobusif", CFARG_EOL); Index: src/sys/arch/hpcmips/dev/ucb1200.c diff -u src/sys/arch/hpcmips/dev/ucb1200.c:1.19.52.1 src/sys/arch/hpcmips/dev/ucb1200.c:1.19.52.2 --- src/sys/arch/hpcmips/dev/ucb1200.c:1.19.52.1 Sat Mar 20 19:33:35 2021 +++ src/sys/arch/hpcmips/dev/ucb1200.c Sat Mar 20 20:49:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ucb1200.c,v 1.19.52.1 2021/03/20 19:33:35 thorpej Exp $ */ +/* $NetBSD: ucb1200.c,v 1.19.52.2 2021/03/20 20:49:43 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ucb1200.c,v 1.19.52.1 2021/03/20 19:33:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucb1200.c,v 1.19.52.2 2021/03/20 20:49:43 thorpej Exp $"); #include #include @@ -133,7 +133,7 @@ ucb1200_attach(device_t parent, device_t (void)ucb1200_check_id(reg, 1); printf("\n"); - config_search(self, ucb1200_print, + config_search(self, NULL, CFARG_SUBMATCH, ucb1200_search, CFARG_IATTR, "ucbif", CFARG_EOL); Index: src/sys/arch/hpcmips/tx/tx39sib.c diff -u src/sys/arch/hpcmips/tx/tx39sib.c:1.21.52.1 src/sys/arch/hpcmips/tx/tx39sib.c:1.21.52.2 --- src/sys/arch/hpcmips/tx/tx39sib.c:1.21.52.1 Sat Mar
CVS commit: [thorpej-cfargs] src/sys
Module Name:src Committed By: thorpej Date: Sat Mar 20 20:47:53 UTC 2021 Modified Files: src/sys/arch/arm/xscale [thorpej-cfargs]: pxa2x0.c src/sys/arch/zaurus/dev [thorpej-cfargs]: zssp.c src/sys/dev/gpio [thorpej-cfargs]: gpio.c Log Message: No need to pass the parent softc down to the indirect submatch routine; it's available from the parent device_t there. To generate a diff of this commit: cvs rdiff -u -r1.22.52.1 -r1.22.52.2 src/sys/arch/arm/xscale/pxa2x0.c cvs rdiff -u -r1.13.62.1 -r1.13.62.2 src/sys/arch/zaurus/dev/zssp.c cvs rdiff -u -r1.64.10.1 -r1.64.10.2 src/sys/dev/gpio/gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/xscale/pxa2x0.c diff -u src/sys/arch/arm/xscale/pxa2x0.c:1.22.52.1 src/sys/arch/arm/xscale/pxa2x0.c:1.22.52.2 --- src/sys/arch/arm/xscale/pxa2x0.c:1.22.52.1 Sat Mar 20 19:33:32 2021 +++ src/sys/arch/arm/xscale/pxa2x0.c Sat Mar 20 20:47:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0.c,v 1.22.52.1 2021/03/20 19:33:32 thorpej Exp $ */ +/* $NetBSD: pxa2x0.c,v 1.22.52.2 2021/03/20 20:47:53 thorpej Exp $ */ /* * Copyright (c) 2002, 2005 Genetec Corporation. All rights reserved. @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pxa2x0.c,v 1.22.52.1 2021/03/20 19:33:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0.c,v 1.22.52.2 2021/03/20 20:47:53 thorpej Exp $"); #include "pxaintc.h" #include "pxagpio.h" @@ -230,7 +230,7 @@ pxaip_attach(device_t parent, device_t s /* * Attach all other devices */ - config_search(self, sc, + config_search(self, NULL, CFARG_SUBMATCH, pxaip_search, CFARG_IATTR, "pxaip", CFARG_EOL); @@ -239,7 +239,7 @@ pxaip_attach(device_t parent, device_t s static int pxaip_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { - struct pxaip_softc *sc = aux; + struct pxaip_softc *sc = device_private(parent); struct pxaip_attach_args aa; aa.pxa_iot = sc->sc_bust; Index: src/sys/arch/zaurus/dev/zssp.c diff -u src/sys/arch/zaurus/dev/zssp.c:1.13.62.1 src/sys/arch/zaurus/dev/zssp.c:1.13.62.2 --- src/sys/arch/zaurus/dev/zssp.c:1.13.62.1 Sat Mar 20 19:33:39 2021 +++ src/sys/arch/zaurus/dev/zssp.c Sat Mar 20 20:47:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: zssp.c,v 1.13.62.1 2021/03/20 19:33:39 thorpej Exp $ */ +/* $NetBSD: zssp.c,v 1.13.62.2 2021/03/20 20:47:53 thorpej Exp $ */ /* $OpenBSD: zaurus_ssp.c,v 1.6 2005/04/08 21:58:49 uwe Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zssp.c,v 1.13.62.1 2021/03/20 19:33:39 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zssp.c,v 1.13.62.2 2021/03/20 20:47:53 thorpej Exp $"); #include #include @@ -144,7 +144,7 @@ zssp_attach(device_t parent, device_t se zssp_init(); /* Attach all devices */ - config_search(self, sc, + config_search(self, NULL, CFARG_SUBMATCH, zssp_search, CFARG_IATTR, "zssp", CFARG_EOL); Index: src/sys/dev/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.64.10.1 src/sys/dev/gpio/gpio.c:1.64.10.2 --- src/sys/dev/gpio/gpio.c:1.64.10.1 Sat Mar 20 19:33:40 2021 +++ src/sys/dev/gpio/gpio.c Sat Mar 20 20:47:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.64.10.1 2021/03/20 19:33:40 thorpej Exp $ */ +/* $NetBSD: gpio.c,v 1.64.10.2 2021/03/20 20:47:53 thorpej Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.1 2021/03/20 19:33:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.2 2021/03/20 20:47:53 thorpej Exp $"); /* * General Purpose Input/Output framework. @@ -191,7 +191,7 @@ gpio_rescan(device_t self, const char *i { struct gpio_softc *sc = device_private(self); - config_search(self, sc, + config_search(self, NULL, CFARG_SUBMATCH, gpio_search, CFARG_IATTR, ifattr, CFARG_LOCATORS, locators, @@ -272,7 +272,7 @@ gpio_search(device_t parent, cfdata_t cf struct gpio_attach_args ga; size_t namlen; - ga.ga_gpio = aux; + ga.ga_gpio = device_private(parent); ga.ga_offset = cf->cf_loc[GPIOCF_OFFSET]; ga.ga_mask = cf->cf_loc[GPIOCF_MASK]; ga.ga_flags = cf->cf_loc[GPIOCF_FLAG];