Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-07 Thread Benjamin Herrenschmidt
On Tue, 2017-03-07 at 05:52 +0100, Greg Kroah-Hartman wrote: > On Mon, Mar 06, 2017 at 04:35:48PM -0800, Bart Van Assche wrote: > > The dma mapping operations of several architectures and also of > > several I/O MMU implementations need to translate a struct > > device pointer into a struct pci_dev

Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-07 Thread Bart Van Assche
On Tue, 2017-03-07 at 05:52 +0100, Greg Kroah-Hartman wrote: > Somehow all other subsystems work just fine, don't instantly think that > the driver core needs to bend to the will of the IB code, because you > are somehow "special". Hint, you aren't :) Hi Greg, In another e-mail Parav compared IB

Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-07 Thread gre...@linuxfoundation.org
On Tue, Mar 07, 2017 at 04:54:58PM +, Bart Van Assche wrote: > On Tue, 2017-03-07 at 05:52 +0100, Greg Kroah-Hartman wrote: > > Somehow all other subsystems work just fine, don't instantly think that > > the driver core needs to bend to the will of the IB code, because you > > are somehow "spec

RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-07 Thread Parav Pandit
li...@armlinux.org.uk; h...@zytor.com; mi...@redhat.com; > dw...@infradead.org; bhelg...@google.com; dledf...@redhat.com; > b...@kernel.crashing.org > Subject: Re: [PATCH 1/2] device: Stop requiring that struct device is > embedded in struct pci_dev > > On Tue, Mar 07, 2017 at

Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-07 Thread gre...@linuxfoundation.org
On Tue, Mar 07, 2017 at 02:44:28AM +, Bart Van Assche wrote: > On Tue, 2017-03-07 at 02:41 +, Parav Pandit wrote: > > Compilation would break when CONFIG_PCI is not defined for some embedded > > platforms. > > More than that, including specific pci_dev structure pointer in generic > > str

RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-07 Thread Parav Pandit
ernel.org; linux-r...@vger.kernel.org; > seb...@linux.vnet.ibm.com; li...@armlinux.org.uk; h...@zytor.com; > mi...@redhat.com; dw...@infradead.org; bhelg...@google.com; > dledf...@redhat.com; b...@kernel.crashing.org > Subject: Re: [PATCH 1/2] device: Stop requiring that struct device is > embed

Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-06 Thread Bart Van Assche
On Tue, 2017-03-07 at 05:08 +, Parav Pandit wrote: > I replied with pseudo code in previous reply to Bart to bring back dma_device > member in the ib_device. > dma_device member was already present in near past of few weeks. > It should be able to work using it without performance impact and w

RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-06 Thread Parav Pandit
el.org; Bjorn Helgaas > ; Benjamin Herrenschmidt > ; David Woodhouse ; > H . Peter Anvin ; Ingo Molnar ; > Russell King > Subject: Re: [PATCH 1/2] device: Stop requiring that struct device is > embedded in struct pci_dev > > On Mon, Mar 06, 2017 at 04:35:48PM -0800, Bart Van As

Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-06 Thread Greg Kroah-Hartman
On Mon, Mar 06, 2017 at 04:35:48PM -0800, Bart Van Assche wrote: > The dma mapping operations of several architectures and also of > several I/O MMU implementations need to translate a struct > device pointer into a struct pci_dev pointer. This translation > is performed by to_pci_dev(). That macro

RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-06 Thread Parav Pandit
Hi Bart, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Bart Van Assche > Sent: Monday, March 6, 2017 6:36 PM > To: Doug Ledford > Cc: Greg Kroah-Hartman ; Sebastian Ott > ; Parav Pandit ; linux- > r...@vger.kernel.o

Re: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-06 Thread Bart Van Assche
On Tue, 2017-03-07 at 02:41 +, Parav Pandit wrote: > Compilation would break when CONFIG_PCI is not defined for some embedded > platforms. > More than that, including specific pci_dev structure pointer in generic > structure such as device just doesn't sound right. > I tested equivalent patch

RE: [PATCH 1/2] device: Stop requiring that struct device is embedded in struct pci_dev

2017-03-06 Thread Parav Pandit
Hi Bart, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Bart Van Assche > Sent: Monday, March 6, 2017 6:36 PM > To: Doug Ledford > Cc: Greg Kroah-Hartman ; Sebastian Ott > ; Parav Pandit ; linux- > r...@vger.kernel.o