NetBSD/sys/arch/hpcmips/pci/pci_machdep.c
dyoung a33d02a149 Add to pci_bus_devorder() an argument that tells the number of slots
available in the devs array.  Change the type of the devs array from
char to uint8_t.  Treat the return value of pci_bus_devorder() as the
number of slots that it filled.

Don't use the __PCI_BUS_DEVORDER #definition to configure the kernel
but let the linker do it.  Make pci_bus_devorder() available on all
architectures by adding a default implementation that will DTRT on
all architectures but hpcmips, the only architecture to #define
__PCI_BUS_DEVORDER.  On hpcmips, adapt the implementation to the new
calling convention.

XXX I can compile an hpcmips GENERIC kernel, but I don't have a
XXX hpcmips box to test it on.
2011-08-24 20:27:35 +00:00

17 lines
374 B
C

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.1 2011/08/24 20:27:36 dyoung Exp $");
#include "opt_pci.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
int
pci_bus_devorder(pci_chipset_tag_t pc, int bus, uint8_t *devs, int maxdevs)
{
return (*pc->pc_bus_devorder)(pc, bus, devs, maxdevs);
}