Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-03-10 Thread Wei Yang
On Tue, Mar 10, 2015 at 09:47:37PM -0500, Bjorn Helgaas wrote: >On Mon, Mar 02, 2015 at 03:50:37PM +0800, Wei Yang wrote: >> On Tue, Feb 24, 2015 at 02:46:53AM -0600, Bjorn Helgaas wrote: >> >On Tue, Feb 24, 2015 at 02:34:35AM -0600, Bjorn Helgaas wrote: >> >> From: Wei Yang >> >> >> >> Current i

Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-03-10 Thread Bjorn Helgaas
On Mon, Mar 02, 2015 at 03:50:37PM +0800, Wei Yang wrote: > On Tue, Feb 24, 2015 at 02:46:53AM -0600, Bjorn Helgaas wrote: > >On Tue, Feb 24, 2015 at 02:34:35AM -0600, Bjorn Helgaas wrote: > >> From: Wei Yang > >> > >> Current iommu_table of a PE is a static field. This will have a problem > >>

Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-03-02 Thread Wei Yang
On Mon, Mar 02, 2015 at 06:56:19PM +1100, Benjamin Herrenschmidt wrote: >On Mon, 2015-03-02 at 15:50 +0800, Wei Yang wrote: >> > >> >Is there a hotplug remove path where we should also be calling >> >iommu_free_table()? >> >> When VF is not introduced, no one calls this on powernv platform. >> >>

Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-03-01 Thread Benjamin Herrenschmidt
On Mon, 2015-03-02 at 15:50 +0800, Wei Yang wrote: > > > >Is there a hotplug remove path where we should also be calling > >iommu_free_table()? > > When VF is not introduced, no one calls this on powernv platform. > > Each PCI bus is a PE and it has its own iommu table, even a device is > hotplug

Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-03-01 Thread Wei Yang
On Tue, Feb 24, 2015 at 02:46:53AM -0600, Bjorn Helgaas wrote: >On Tue, Feb 24, 2015 at 02:34:35AM -0600, Bjorn Helgaas wrote: >> From: Wei Yang >> >> Current iommu_table of a PE is a static field. This will have a problem >> when iommu_free_table() is called. >> >> Allocate iommu_table dynamic

Re: [PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-02-24 Thread Bjorn Helgaas
On Tue, Feb 24, 2015 at 02:34:35AM -0600, Bjorn Helgaas wrote: > From: Wei Yang > > Current iommu_table of a PE is a static field. This will have a problem > when iommu_free_table() is called. > > Allocate iommu_table dynamically. I'd like a little more explanation about why we're calling iomm

[PATCH v12 14/21] powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically

2015-02-24 Thread Bjorn Helgaas
From: Wei Yang Current iommu_table of a PE is a static field. This will have a problem when iommu_free_table() is called. Allocate iommu_table dynamically. Signed-off-by: Wei Yang Signed-off-by: Bjorn Helgaas --- arch/powerpc/include/asm/iommu.h |3 +++ arch/powerpc/platforms/p