On Thu, 27 May 2010, David Young wrote: > On Fri, May 28, 2010 at 01:29:52AM +0900, Izumi Tsutsui wrote: > > > You could use bus_space_tag_create() in MD code such as if_ne_mb.c and > > > dev/sbus/stp4020.c, but I don't know if it will be worth it. The code > > > would look more consistent with MI code. > > > > How can you switch multiple MD bus_space_tag_t types in MI API? > > I am not sure that I understand your question. > > To support bus_space_tag_create(9), an architecture's MD > bus_space_tag_t type will change in an MD way. That is why I say that > bus_space_tag_create(9) is an MI API with an MD implementation. > > It may help for you to have a look at the documentation for > pci_chipset_tag_create(9), since bus_space_tag_create(9) works > analogously. I have not written the corresponding documentation for > bus_space_tag_create(9), sorry.
The pci_chipset_tag has always been a problem with sparc64 as well. The number of hoops we needed to jump through to get the PCI code to work was huge. I think you're using a poor example and trying to generalize it. Look at the sparc64 PCI code first, then think about it, then try to apply it to generic bus_space. Eduardo