Index: acpi.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi.c,v retrieving revision 1.297 diff -p -u -r1.297 acpi.c --- acpi.c 27 Feb 2022 21:22:09 -0000 1.297 +++ acpi.c 31 May 2022 20:11:30 -0000 @@ -698,10 +698,12 @@ acpi_build_tree(struct acpi_softc *sc) (void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, UINT32_MAX, acpi_make_devnode, acpi_make_devnode_post, &awc, NULL); +#if NPCI > 0 /* * Scan the internal namespace. */ (void)acpi_pcidev_scan(sc->sc_root); +#endif } static void Index: acpi_power.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_power.c,v retrieving revision 1.35 diff -p -u -r1.35 acpi_power.c --- acpi_power.c 1 Jun 2017 02:45:09 -0000 1.35 +++ acpi_power.c 31 May 2022 20:11:30 -0000 @@ -58,6 +58,8 @@ #include __KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.35 2017/06/01 02:45:09 chs Exp $"); +#include "pci.h" + #include #include #include @@ -670,7 +672,6 @@ void acpi_power_add(struct acpi_devnode *ad) { const char *str = NULL; - device_t dev; int err; KASSERT(ad != NULL && ad->ad_root != NULL); @@ -682,12 +683,14 @@ acpi_power_add(struct acpi_devnode *ad) if (ad->ad_device != NULL) str = device_xname(ad->ad_device); +#if NPCI > 0 else { - dev = acpi_pcidev_find_dev(ad); + device_t dev = acpi_pcidev_find_dev(ad); if (dev != NULL) str = device_xname(dev); } +#endif if (str == NULL) return; Index: acpi_verbose.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_verbose.c,v retrieving revision 1.20 diff -p -u -r1.20 acpi_verbose.c --- acpi_verbose.c 20 Dec 2021 11:17:40 -0000 1.20 +++ acpi_verbose.c 31 May 2022 20:11:30 -0000 @@ -67,6 +67,8 @@ #include __KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.20 2021/12/20 11:17:40 skrll Exp $"); +#include "pci.h" + #include #include #include @@ -515,6 +517,7 @@ acpi_print_tree(struct acpi_devnode *ad, if (ad->ad_device != NULL) aprint_normal(" <%s>", device_xname(ad->ad_device)); +#if NPCI > 0 if (ad->ad_pciinfo != NULL) { aprint_normal(" (PCI)"); @@ -539,6 +542,7 @@ acpi_print_tree(struct acpi_devnode *ad, if (dev != NULL) aprint_normal(" <%s>", device_xname(dev)); } +#endif aprint_normal("\n"); Index: acpi_wakedev.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpi_wakedev.c,v retrieving revision 1.28 diff -p -u -r1.28 acpi_wakedev.c --- acpi_wakedev.c 20 Dec 2021 11:17:40 -0000 1.28 +++ acpi_wakedev.c 31 May 2022 20:11:30 -0000 @@ -29,6 +29,8 @@ #include __KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.28 2021/12/20 11:17:40 skrll Exp $"); +#include "pci.h" + #include #include #include @@ -210,7 +212,6 @@ acpi_wakedev_add(struct acpi_devnode *ad { struct acpi_wakedev *aw; const char *str = NULL; - device_t dev; int err; KASSERT(ad != NULL && ad->ad_wakedev != NULL); @@ -228,12 +229,14 @@ acpi_wakedev_add(struct acpi_devnode *ad if (ad->ad_device != NULL) str = device_xname(ad->ad_device); +#if NPCI > 0 else { - dev = acpi_pcidev_find_dev(ad); + device_t dev = acpi_pcidev_find_dev(ad); if (dev != NULL) str = device_xname(dev); } +#endif if (str == NULL) return; Index: acpica/OsdHardware.c =================================================================== RCS file: /cvsroot/src/sys/dev/acpi/acpica/OsdHardware.c,v retrieving revision 1.13 diff -p -u -r1.13 OsdHardware.c --- acpica/OsdHardware.c 31 Dec 2021 17:22:15 -0000 1.13 +++ acpica/OsdHardware.c 31 May 2022 20:11:30 -0000 @@ -46,6 +46,8 @@ #include __KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.13 2021/12/31 17:22:15 riastradh Exp $"); +#include "pci.h" + #include #include @@ -210,6 +212,7 @@ ACPI_STATUS AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, UINT64 *Value, UINT32 Width) { +#if NPCI > 0 pci_chipset_tag_t pc; pcitag_t tag; pcireg_t tmp; @@ -240,6 +243,9 @@ AcpiOsReadPciConfiguration(ACPI_PCI_ID * } return AE_OK; +#else + return AE_BAD_PARAMETER; +#endif } /* @@ -251,6 +257,7 @@ ACPI_STATUS AcpiOsWritePciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, ACPI_INTEGER Value, UINT32 Width) { +#if NPCI > 0 pci_chipset_tag_t pc; pcitag_t tag; pcireg_t tmp; @@ -282,4 +289,7 @@ AcpiOsWritePciConfiguration(ACPI_PCI_ID pci_conf_write(pc, tag, Register & ~3, tmp); return AE_OK; +#else + return AE_BAD_PARAMETER; +#endif }