]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
driver core: Add iommu_group tracking to struct device
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 30 May 2012 20:18:41 +0000 (14:18 -0600)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 25 Jun 2012 11:47:20 +0000 (13:47 +0200)
IOMMU groups allow IOMMU drivers to represent DMA visibility
and isolation of devices.  Multiple devices may be grouped
together for the purposes of DMA.  Placing a pointer on
struct device enable easy access for things like streaming
DMA programming and drivers like VFIO.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
include/linux/device.h

index 161d96241b1b4da3b9a0909749709a33bcca33c5..d0e4d99405ae3ee5300e493f342528a485d2fc9f 100644 (file)
@@ -36,6 +36,7 @@ struct subsys_private;
 struct bus_type;
 struct device_node;
 struct iommu_ops;
+struct iommu_group;
 
 struct bus_attribute {
        struct attribute        attr;
@@ -687,6 +688,7 @@ struct device {
        const struct attribute_group **groups;  /* optional groups */
 
        void    (*release)(struct device *dev);
+       struct iommu_group      *iommu_group;
 };
 
 /* Get the wakeup routines, which depend on struct device */