Hi Varun,

On Sat, Mar 08, 2014 at 07:05:40PM +0000, Varun Sethi wrote:
> Currently the ARM SMMU driver only considers the bus master devices in the 
> device
> tree. The master device and stream ID information is maintained per SMMU. 
> Currently
> there is no mechanism for representing this information in case of PCI or hot
> plugged devices.
> 
> This RFC patch proposes a mechanism for representing this information for hot
> plugged/PCI devices.
> 
> Patch doesn't contain the add_device callback modification for hot plug 
> devices.
> This would be bus specific and would be responsible for populating the hot 
> plug
> devices masters list for the SMMU.
> 
> Signed-off-by: Varun Sethi <varun.se...@freescale.com>
> ---
>  drivers/iommu/arm-smmu.c |   93 
> ++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 90 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
> index 1d9ab39..6c10df4 100644
> --- a/drivers/iommu/arm-smmu.c
> +++ b/drivers/iommu/arm-smmu.c
> @@ -327,6 +327,9 @@ struct arm_smmu_master {
>        * SMMU chain.
>        */
>       struct rb_node                  node;
> +     /* Following fields correspond to the hot plug masters */
> +     struct list_head                        hotplug_masters_node;
> +     struct device                   *dev;

I'd much rather have one list for all masters. Distinguishing between
masters and `hotplug masters' is unnecessary.

> +static int is_device_hotplug(struct device *dev)
> +{
> +     return (dev->bus != &platform_bus_type) &&
> +              (dev->bus != &amba_bustype);
> +}

I'm not fond of this. Why not rework what we currently have so that it can
work for other (hotpluggable) buses?

Will
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to