diff options
| author | Joerg Roedel <joerg.roedel@amd.com> | 2012-01-26 13:40:53 -0500 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-07-11 06:15:45 -0400 |
| commit | 0ff64f80e075ae036a4c80c7d7752b1e07fed792 (patch) | |
| tree | ac1bbe189cfe6908d0bdceaa3042ddd767b98187 /include/linux | |
| parent | 0cd76dd13bdd2f7f02a2dc931e808e92b191082f (diff) | |
iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute
Implement the attribute itself and add the code for the
AMD IOMMU driver.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iommu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 0eef096183e8..f7df4aa527f3 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -37,11 +37,18 @@ struct iommu_domain; | |||
| 37 | typedef int (*iommu_fault_handler_t)(struct iommu_domain *, | 37 | typedef int (*iommu_fault_handler_t)(struct iommu_domain *, |
| 38 | struct device *, unsigned long, int, void *); | 38 | struct device *, unsigned long, int, void *); |
| 39 | 39 | ||
| 40 | struct iommu_domain_geometry { | ||
| 41 | dma_addr_t aperture_start; /* First address that can be mapped */ | ||
| 42 | dma_addr_t aperture_end; /* Last address that can be mapped */ | ||
| 43 | bool force_aperture; /* DMA only allowed in mappable range? */ | ||
| 44 | }; | ||
| 45 | |||
| 40 | struct iommu_domain { | 46 | struct iommu_domain { |
| 41 | struct iommu_ops *ops; | 47 | struct iommu_ops *ops; |
| 42 | void *priv; | 48 | void *priv; |
| 43 | iommu_fault_handler_t handler; | 49 | iommu_fault_handler_t handler; |
| 44 | void *handler_token; | 50 | void *handler_token; |
| 51 | struct iommu_domain_geometry geometry; | ||
| 45 | }; | 52 | }; |
| 46 | 53 | ||
| 47 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 | 54 | #define IOMMU_CAP_CACHE_COHERENCY 0x1 |
| @@ -49,6 +56,7 @@ struct iommu_domain { | |||
| 49 | 56 | ||
| 50 | enum iommu_attr { | 57 | enum iommu_attr { |
| 51 | DOMAIN_ATTR_MAX, | 58 | DOMAIN_ATTR_MAX, |
| 59 | DOMAIN_ATTR_GEOMETRY, | ||
| 52 | }; | 60 | }; |
| 53 | 61 | ||
| 54 | #ifdef CONFIG_IOMMU_API | 62 | #ifdef CONFIG_IOMMU_API |
