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/sparc64/dev/psycho.c | 3 ++- sys/arch/sparc64/dev/schizo.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64/dev') diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index f1a03025b8c..7ef0c4dd07f 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.47 2006/07/01 16:41:26 deraadt Exp $ */ +/* $OpenBSD: psycho.c,v 1.48 2006/12/14 17:36:12 kettenis Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -355,6 +355,7 @@ psycho_attach(struct device *parent, struct device *self, void *aux) /* get the bus-range for the psycho */ psycho_get_bus_range(sc->sc_node, psycho_br); + pba.pba_domain = pci_ndomains++; pba.pba_bus = psycho_br[0]; pba.pba_bridgetag = NULL; diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c index 3f38552102f..c5947838872 100644 --- a/sys/arch/sparc64/dev/schizo.c +++ b/sys/arch/sparc64/dev/schizo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schizo.c,v 1.36 2006/12/12 19:18:52 kettenis Exp $ */ +/* $OpenBSD: schizo.c,v 1.37 2006/12/14 17:36:12 kettenis Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -213,6 +213,7 @@ schizo_init(struct schizo_softc *sc, int busa) pbm->sp_pc->bushandle = pbm->sp_cfgh; pba.pba_busname = "pci"; + pba.pba_domain = pci_ndomains++; pba.pba_bus = busranges[0]; pba.pba_bridgetag = NULL; pba.pba_pc = pbm->sp_pc; -- cgit v1.2.3