Port-i386 archive

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

[PATCH] [RFC] i386/i386_mainbus: fix the build when MPBIOS and ACPI are disabled



I'm not entirely sure about this one, but anyhow:

...
/home/flag/bsd/netbsd/src/../obj.i386/tooldir.Linux-6.6.0-14-generic-x86_64/bin/i486--netbsdelf-ld -Map netbsd.map --cref -T netbsd.ldscript -Ttext c0100000 -e start -z noseparate-code -X -o netbsd ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o
/home/flag/bsd/netbsd/src/../obj.i386/tooldir.Linux-6.6.0-14-generic-x86_64/bin/i486--netbsdelf-ld: i386_mainbus.o: in function `i386_mainbus_childdetached':
/home/flag/bsd/netbsd/src/sys/arch/i386/i386/i386_mainbus.c:182: undefined reference to `mp_pci_childdetached'
...

In sys/arch/i386/i386/i386_mainbus.c::i386_mainbus_rescan(), mp_pci_scan() is
executed only if:

...
#if NACPICA > 0 && defined(ACPI_SCANPCI)
                if (npcibus == 0 && mpacpi_active)
                        npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint);
#endif
#if defined(MPBIOS) && defined(MPBIOS_SCANPCI)
                if (npcibus == 0 && mpbios_scanned != 0)
                        npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint);
#endif
...

hence follow the same condition during the unwind.

Signed-off-by: Paolo Pisati <p.pisati%gmail.com@localhost>
---
 sys/arch/i386/i386/i386_mainbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/arch/i386/i386/i386_mainbus.c b/sys/arch/i386/i386/i386_mainbus.c
index f6d2f24a593a..2834002e5989 100644
--- a/sys/arch/i386/i386/i386_mainbus.c
+++ b/sys/arch/i386/i386/i386_mainbus.c
@@ -178,7 +178,7 @@ i386_mainbus_childdetached(device_t self, device_t child)
 	if (sc->sc_pci == child)
 		sc->sc_pci = NULL;
 
-#if NPCI > 0
+#if NPCI > 0 && (defined(ACPI_SCANPCI) || defined(MPBIOS_SCANPCI))
 	mp_pci_childdetached(self, child);
 #endif
 }
-- 
2.34.1



Home | Main Index | Thread Index | Old Index