From c4c3193cc824f923b4f1e5b8c5ec27c32bbbcd8f Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 14 Dec 2006 17:36:13 +0000 Subject: Make pci subsystem aware of domains. Each host bridge gets assigned a unique domain number such that we can distinguish between busses with the same bus number that are behind different host bridges. Domains can be accessed by using different device nodes. ok deraadt@ --- sys/arch/macppc/pci/ht.c | 3 ++- sys/arch/macppc/pci/mpcpcibus.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/arch/macppc') diff --git a/sys/arch/macppc/pci/ht.c b/sys/arch/macppc/pci/ht.c index ba439b2056e..05d49099568 100644 --- a/sys/arch/macppc/pci/ht.c +++ b/sys/arch/macppc/pci/ht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ht.c,v 1.9 2006/03/13 20:10:49 brad Exp $ */ +/* $OpenBSD: ht.c,v 1.10 2006/12/14 17:36:12 kettenis Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -189,6 +189,7 @@ ht_attach(struct device *parent, struct device *self, void *aux) pba.pba_memt = sc->sc_memt; pba.pba_dmat = &pci_bus_dma_tag; pba.pba_pc = &sc->sc_pc; + pba.pba_domain = pci_ndomains++; pba.pba_bus = 0; pba.pba_bridgetag = NULL; diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c index 5408692ecb4..1bdf2215474 100644 --- a/sys/arch/macppc/pci/mpcpcibus.c +++ b/sys/arch/macppc/pci/mpcpcibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpcpcibus.c,v 1.35 2006/12/05 20:48:23 gwk Exp $ */ +/* $OpenBSD: mpcpcibus.c,v 1.36 2006/12/14 17:36:12 kettenis Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -444,6 +444,7 @@ mpcpcibrattach(struct device *parent, struct device *self, void *aux) pba.pba_iot = &sc->sc_iobus_space; pba.pba_memt = &sc->sc_membus_space; pba.pba_pc = &lcp->lc_pc; + pba.pba_domain = pci_ndomains++; pba.pba_bus = 0; pba.pba_bridgetag = NULL; -- cgit v1.2.3