Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-07-13 Thread Benjamin Herrenschmidt
On Wed, 2014-06-25 at 09:20 +, David Laight wrote: > What are the sizes of the iommu table and the PE structure? > If the table is a round number of pages then you probably don't want > to embed it inside the PE structure. The problem isn't the table itself but the struct iommu_table which c

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread Alexey Kardashevskiy
On 06/25/2014 07:20 PM, David Laight wrote: > From: Wei Yang >> On Wed, Jun 25, 2014 at 02:12:34PM +1000, Alexey Kardashevskiy wrote: >>> On 06/25/2014 11:12 AM, Wei Yang wrote: On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: > On 06/10/2014 11:56 AM, Wei Yang wrote:

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread Wei Yang
On Wed, Jun 25, 2014 at 09:20:11AM +, David Laight wrote: >From: Wei Yang >> On Wed, Jun 25, 2014 at 02:12:34PM +1000, Alexey Kardashevskiy wrote: >> >On 06/25/2014 11:12 AM, Wei Yang wrote: >> >> On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: >> >>> On 06/10/2014 11:56 A

RE: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread David Laight
From: Wei Yang > On Wed, Jun 25, 2014 at 02:12:34PM +1000, Alexey Kardashevskiy wrote: > >On 06/25/2014 11:12 AM, Wei Yang wrote: > >> On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: > >>> On 06/10/2014 11:56 AM, Wei Yang wrote: > Current iommu_table of a PE is a static f

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread Wei Yang
On Wed, Jun 25, 2014 at 05:56:37PM +1000, Benjamin Herrenschmidt wrote: >On Wed, 2014-06-25 at 17:50 +1000, Alexey Kardashevskiy wrote: > >> > Yes, iommu_talbe's life time equals to PE lifetime, so when releasing a PE >> > we >> > need to release the iommu table. Currently, there is one function t

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread Wei Yang
On Wed, Jun 25, 2014 at 05:50:08PM +1000, Alexey Kardashevskiy wrote: >On 06/25/2014 03:27 PM, Wei Yang wrote: >> On Wed, Jun 25, 2014 at 02:12:34PM +1000, Alexey Kardashevskiy wrote: >>> On 06/25/2014 11:12 AM, Wei Yang wrote: On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wro

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread Benjamin Herrenschmidt
On Wed, 2014-06-25 at 17:50 +1000, Alexey Kardashevskiy wrote: > > Yes, iommu_talbe's life time equals to PE lifetime, so when releasing a PE > > we > > need to release the iommu table. Currently, there is one function to release > > the iommu table, iommu_free_table() which takes a pointer of th

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-25 Thread Alexey Kardashevskiy
On 06/25/2014 03:27 PM, Wei Yang wrote: > On Wed, Jun 25, 2014 at 02:12:34PM +1000, Alexey Kardashevskiy wrote: >> On 06/25/2014 11:12 AM, Wei Yang wrote: >>> On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: On 06/10/2014 11:56 AM, Wei Yang wrote: > Current iommu_table

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-24 Thread Wei Yang
On Wed, Jun 25, 2014 at 02:12:34PM +1000, Alexey Kardashevskiy wrote: >On 06/25/2014 11:12 AM, Wei Yang wrote: >> On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: >>> On 06/10/2014 11:56 AM, Wei Yang wrote: Current iommu_table of a PE is a static field. This will have a pr

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-24 Thread Alexey Kardashevskiy
On 06/25/2014 11:12 AM, Wei Yang wrote: > On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: >> On 06/10/2014 11:56 AM, Wei Yang wrote: >>> Current iommu_table of a PE is a static field. This will have a problem when >>> iommu_free_table is called. >> >> What kind of problem? Thi

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-24 Thread Wei Yang
On Tue, Jun 24, 2014 at 08:06:32PM +1000, Alexey Kardashevskiy wrote: >On 06/10/2014 11:56 AM, Wei Yang wrote: >> Current iommu_table of a PE is a static field. This will have a problem when >> iommu_free_table is called. > >What kind of problem? This table is per PE and PE is not going anywhere. >

Re: [RFC PATCH V3 06/17] ppc/pnv: allocate pe->iommu_table dynamically

2014-06-24 Thread Alexey Kardashevskiy
On 06/10/2014 11:56 AM, Wei Yang wrote: > Current iommu_table of a PE is a static field. This will have a problem when > iommu_free_table is called. What kind of problem? This table is per PE and PE is not going anywhere. > > This patch allocate iommu_table dynamically. > > Signed-off-by: Wei