Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-25 Thread Will Deacon
On Fri, Nov 22, 2013 at 05:35:58PM +, Stephen Warren wrote: > On 11/22/2013 12:41 AM, Grant Likely wrote: > > It seems more that IOMMU attachment is closer to being a property of the > > bus rather than a property of the device itself. In that context it > > would make more sense for the bus

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-25 Thread Will Deacon
On Fri, Nov 22, 2013 at 05:35:58PM +, Stephen Warren wrote: On 11/22/2013 12:41 AM, Grant Likely wrote: It seems more that IOMMU attachment is closer to being a property of the bus rather than a property of the device itself. In that context it would make more sense for the bus device

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-22 Thread Stephen Warren
On 11/22/2013 12:41 AM, Grant Likely wrote: > On Thu, 21 Nov 2013 12:04:18 -0700, Stephen Warren > wrote: >> On 11/21/2013 06:15 AM, Grant Likely wrote: >>> On Tue, 19 Nov 2013 11:33:06 +0200, Hiroshi Doyu wrote: IOMMU devices on the bus need to be poplulated first, then iommu master

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-22 Thread Stephen Warren
On 11/22/2013 12:41 AM, Grant Likely wrote: On Thu, 21 Nov 2013 12:04:18 -0700, Stephen Warren swar...@wwwdotorg.org wrote: On 11/21/2013 06:15 AM, Grant Likely wrote: On Tue, 19 Nov 2013 11:33:06 +0200, Hiroshi Doyu hd...@nvidia.com wrote: IOMMU devices on the bus need to be poplulated

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-21 Thread Grant Likely
On Thu, 21 Nov 2013 12:04:18 -0700, Stephen Warren wrote: > On 11/21/2013 06:15 AM, Grant Likely wrote: > > On Tue, 19 Nov 2013 11:33:06 +0200, Hiroshi Doyu wrote: > >> IOMMU devices on the bus need to be poplulated first, then iommu > >> master devices are done later. > >> > >> With

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-21 Thread Grant Likely
On Thu, 21 Nov 2013 12:04:18 -0700, Stephen Warren swar...@wwwdotorg.org wrote: On 11/21/2013 06:15 AM, Grant Likely wrote: On Tue, 19 Nov 2013 11:33:06 +0200, Hiroshi Doyu hd...@nvidia.com wrote: IOMMU devices on the bus need to be poplulated first, then iommu master devices are done

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-20 Thread Stephen Warren
On 11/20/2013 07:03 AM, Hiroshi Doyu wrote: > Thierry Reding wrote @ Wed, 20 Nov 2013 14:14:48 > +0100: (Yes, what Thierry said) > >>> Does the above mean the following? >>> >>> int of_iommu_attach(struct device *dev) >>> { >>> int i; >>> struct of_phandle_args args; >>> >>>

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-20 Thread Hiroshi Doyu
Thierry Reding wrote @ Wed, 20 Nov 2013 14:14:48 +0100: > > Does the above mean the following? > > > > int of_iommu_attach(struct device *dev) > > { > > int i; > > struct of_phandle_args args; > > > > of_property_for_each_phandle_with_args(dev->of_node, "iommus", > >

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-20 Thread Thierry Reding
On Wed, Nov 20, 2013 at 04:17:08AM +0100, Hiroshi Doyu wrote: > Stephen Warren wrote @ Tue, 19 Nov 2013 22:22:47 > +0100: > > > On 11/19/2013 05:03 AM, Hiroshi Doyu wrote: > > > Hi Thierry, > > > > > > Thierry Reding wrote @ Tue, 19 Nov 2013 > > > 11:25:07 +0100: > > > > > >> From earlier

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-20 Thread Thierry Reding
On Wed, Nov 20, 2013 at 04:17:08AM +0100, Hiroshi Doyu wrote: Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 19 Nov 2013 22:22:47 +0100: On 11/19/2013 05:03 AM, Hiroshi Doyu wrote: Hi Thierry, Thierry Reding thierry.red...@gmail.com wrote @ Tue, 19 Nov 2013 11:25:07 +0100:

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-20 Thread Hiroshi Doyu
Thierry Reding thierry.red...@gmail.com wrote @ Wed, 20 Nov 2013 14:14:48 +0100: Does the above mean the following? int of_iommu_attach(struct device *dev) { int i; struct of_phandle_args args; of_property_for_each_phandle_with_args(dev-of_node, iommus,

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-20 Thread Stephen Warren
On 11/20/2013 07:03 AM, Hiroshi Doyu wrote: Thierry Reding thierry.red...@gmail.com wrote @ Wed, 20 Nov 2013 14:14:48 +0100: (Yes, what Thierry said) Does the above mean the following? int of_iommu_attach(struct device *dev) { int i; struct of_phandle_args args;

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-19 Thread Hiroshi Doyu
Stephen Warren wrote @ Tue, 19 Nov 2013 22:22:47 +0100: > On 11/19/2013 05:03 AM, Hiroshi Doyu wrote: > > Hi Thierry, > > > > Thierry Reding wrote @ Tue, 19 Nov 2013 11:25:07 > > +0100: > > > >> From earlier discussions I thought the goal was to actually defer this > >> until all nodes

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-19 Thread Stephen Warren
On 11/19/2013 05:03 AM, Hiroshi Doyu wrote: > Hi Thierry, > > Thierry Reding wrote @ Tue, 19 Nov 2013 11:25:07 > +0100: > >> From earlier discussions I thought the goal was to actually defer this >> until all nodes referred to by the iommus property were actually >> registered. The above only

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-19 Thread Stephen Warren
On 11/19/2013 05:03 AM, Hiroshi Doyu wrote: Hi Thierry, Thierry Reding thierry.red...@gmail.com wrote @ Tue, 19 Nov 2013 11:25:07 +0100: From earlier discussions I thought the goal was to actually defer this until all nodes referred to by the iommus property were actually registered.

Re: [PATCHv5 2/9] driver/core: populate devices in order for IOMMUs

2013-11-19 Thread Hiroshi Doyu
Stephen Warren swar...@wwwdotorg.org wrote @ Tue, 19 Nov 2013 22:22:47 +0100: On 11/19/2013 05:03 AM, Hiroshi Doyu wrote: Hi Thierry, Thierry Reding thierry.red...@gmail.com wrote @ Tue, 19 Nov 2013 11:25:07 +0100: From earlier discussions I thought the goal was to actually defer