Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-02-20 Thread Thomas Bogendoerfer
On Wed, 20 Feb 2019 07:10:56 -0800 Christoph Hellwig wrote: > On Mon, Feb 18, 2019 at 11:58:07AM +0100, Thomas Bogendoerfer wrote: > > This of course will break SH7786. To fix both cases how about making > > dma_pfn_offset > > > > a signed long ? > > Yes, making it signed sounds like a good ide

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-02-20 Thread Christoph Hellwig
On Mon, Feb 18, 2019 at 11:58:07AM +0100, Thomas Bogendoerfer wrote: > This of course will break SH7786. To fix both cases how about making > dma_pfn_offset > > a signed long ? Yes, making it signed sounds like a good idea.

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-02-18 Thread Thomas Bogendoerfer
On Mon, 28 Jan 2019 05:32:15 -0800 Christoph Hellwig wrote: > Note that we could probably fix these by just switching IP27 and > other users of the bridge chip to use the dma_pfn_offset field > in struct device and stop overriding these functions. during my final round of tests for v2 of the pat

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-01-30 Thread Christoph Hellwig
On Wed, Jan 30, 2019 at 06:25:20PM +0100, Thomas Bogendoerfer wrote: > > and it's already there:-) Each struct device has a field numa_node and > pci_bus has > contains a struct device. arm64 is already using it only not so nice part is > the > usage of pcibios_root_bridge_prepare() to set the n

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-01-30 Thread Thomas Bogendoerfer
On Wed, 30 Jan 2019 01:17:06 -0800 Christoph Hellwig wrote: > 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

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-01-30 Thread Christoph Hellwig
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 meth

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-01-29 Thread Thomas Bogendoerfer
On Mon, 28 Jan 2019 05:32:15 -0800 Christoph Hellwig wrote: > > +#ifdef CONFIG_NUMA > > +int pcibus_to_node(struct pci_bus *bus) > > +{ > > + struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); > > + > > + return bc->nasid; > > +} > > +EXPORT_SYMBOL(pcibus_to_node); > > +#endif /* CONFIG_N

Re: [PATCH 6/7] MIPS: SGI-IP27: use generic PCI driver

2019-01-28 Thread Christoph Hellwig
On Thu, Jan 24, 2019 at 06:47:27PM +0100, Thomas Bogendoerfer wrote: > Converted bridge code to a platform driver using the PCI generic driver > framework and use adding platform devices during xtalk scan. This allows > easier sharing bridge drvier for other SGI platforms like IP30 (Octane) and Ty