On Tue, Jan 29, 2019 at 04:24:45PM +0100, Thomas Bogendoerfer wrote: > > From an abstraction point of view this doesn't really belong into > > a bridge driver as it is a global exported function. I guess we can > > keep it here with a fixme comment, but we should probably move this > > into a method call instead. > > or put the nodeid into the bus struct ? Doesn't sound to bad to me, you'll just have to update a fair amount of arch implementations. > I'm all for it. I looked at the examples for using dma_pfn_offset and the > only one coming close to usefull for me is arch/sh/drivers/pci/pcie-sh7786.c > It overloads pcibios_bus_add_device() to set dma_pfn_offset, which doesn't > look much nicer. What about having a dma_pfn_offset in struct pci_bus > which all device inherit from ? Or add a add_dev callback, similar to what I did for a previous series that we didn't end up needing after all: http://git.infradead.org/users/hch/misc.git/commitdiff/06d9b4fc7deed336edc1292fe2e661729e98ec39