On Tue, Jan 27, 2015 at 12:08:57AM +0000, Joerg Roedel wrote:
> From: Joerg Roedel <jroe...@suse.de>
> 
> This patch changes the behavior of the iommu_attach_device
> and iommu_detach_device functions. With this change these
> functions only work on devices that have their own group.
> For all other devices the iommu_group_attach/detach
> functions must be used.

I like this a lot. Currently, if somebody detaches a device from the ARM
SMMU, I end up detaching its group as well, which I've always found slightly
odd.

> Signed-off-by: Joerg Roedel <jroe...@suse.de>
> ---
>  drivers/iommu/iommu.c | 63 
> +++++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 59 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 8f33ddd3..b63a550 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -51,6 +51,7 @@ struct iommu_group {
>       void (*iommu_data_release)(void *iommu_data);
>       char *name;
>       int id;
> +     unsigned dev_cnt;

Is this actually used on a fast path, or can we just inspect the list of
devices on the group instead?

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

Reply via email to