提交 7876a83f 编写于 作者: C Christoph Hellwig 提交者: Joerg Roedel

iommu: remove iommu_domain_{get,set}_attr

Remove the now unused iommu attr infrastructure.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NWill Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210401155256.298656-21-hch@lst.deSigned-off-by: NJoerg Roedel <jroedel@suse.de>
上级 4fc52b81
...@@ -2665,32 +2665,6 @@ static int __init iommu_init(void) ...@@ -2665,32 +2665,6 @@ static int __init iommu_init(void)
} }
core_initcall(iommu_init); core_initcall(iommu_init);
int iommu_domain_get_attr(struct iommu_domain *domain,
enum iommu_attr attr, void *data)
{
if (!domain->ops->domain_get_attr)
return -EINVAL;
return domain->ops->domain_get_attr(domain, attr, data);
}
EXPORT_SYMBOL_GPL(iommu_domain_get_attr);
int iommu_domain_set_attr(struct iommu_domain *domain,
enum iommu_attr attr, void *data)
{
int ret = 0;
switch (attr) {
default:
if (domain->ops->domain_set_attr == NULL)
return -EINVAL;
ret = domain->ops->domain_set_attr(domain, attr, data);
}
return ret;
}
EXPORT_SYMBOL_GPL(iommu_domain_set_attr);
int iommu_enable_nesting(struct iommu_domain *domain) int iommu_enable_nesting(struct iommu_domain *domain)
{ {
if (domain->type != IOMMU_DOMAIN_UNMANAGED) if (domain->type != IOMMU_DOMAIN_UNMANAGED)
......
...@@ -96,20 +96,6 @@ enum iommu_cap { ...@@ -96,20 +96,6 @@ enum iommu_cap {
IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */ IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */
}; };
/*
* Following constraints are specifc to FSL_PAMUV1:
* -aperture must be power of 2, and naturally aligned
* -number of windows must be power of 2, and address space size
* of each window is determined by aperture size / # of windows
* -the actual size of the mapped region of a window must be power
* of 2 starting with 4KB and physical address must be naturally
* aligned.
*/
enum iommu_attr {
DOMAIN_ATTR_MAX,
};
/* These are the possible reserved region types */ /* These are the possible reserved region types */
enum iommu_resv_type { enum iommu_resv_type {
/* Memory regions which must be mapped 1:1 at all times */ /* Memory regions which must be mapped 1:1 at all times */
...@@ -205,8 +191,6 @@ struct iommu_iotlb_gather { ...@@ -205,8 +191,6 @@ struct iommu_iotlb_gather {
* @probe_finalize: Do final setup work after the device is added to an IOMMU * @probe_finalize: Do final setup work after the device is added to an IOMMU
* group and attached to the groups domain * group and attached to the groups domain
* @device_group: find iommu group for a particular device * @device_group: find iommu group for a particular device
* @domain_get_attr: Query domain attributes
* @domain_set_attr: Change domain attributes
* @enable_nesting: Enable nesting * @enable_nesting: Enable nesting
* @set_pgtable_quirks: Set io page table quirks (IO_PGTABLE_QUIRK_*) * @set_pgtable_quirks: Set io page table quirks (IO_PGTABLE_QUIRK_*)
* @get_resv_regions: Request list of reserved regions for a device * @get_resv_regions: Request list of reserved regions for a device
...@@ -257,10 +241,6 @@ struct iommu_ops { ...@@ -257,10 +241,6 @@ struct iommu_ops {
void (*release_device)(struct device *dev); void (*release_device)(struct device *dev);
void (*probe_finalize)(struct device *dev); void (*probe_finalize)(struct device *dev);
struct iommu_group *(*device_group)(struct device *dev); struct iommu_group *(*device_group)(struct device *dev);
int (*domain_get_attr)(struct iommu_domain *domain,
enum iommu_attr attr, void *data);
int (*domain_set_attr)(struct iommu_domain *domain,
enum iommu_attr attr, void *data);
int (*enable_nesting)(struct iommu_domain *domain); int (*enable_nesting)(struct iommu_domain *domain);
int (*set_pgtable_quirks)(struct iommu_domain *domain, int (*set_pgtable_quirks)(struct iommu_domain *domain,
unsigned long quirks); unsigned long quirks);
...@@ -509,10 +489,6 @@ extern int iommu_page_response(struct device *dev, ...@@ -509,10 +489,6 @@ extern int iommu_page_response(struct device *dev,
extern int iommu_group_id(struct iommu_group *group); extern int iommu_group_id(struct iommu_group *group);
extern struct iommu_domain *iommu_group_default_domain(struct iommu_group *); extern struct iommu_domain *iommu_group_default_domain(struct iommu_group *);
extern int iommu_domain_get_attr(struct iommu_domain *domain, enum iommu_attr,
void *data);
extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr,
void *data);
int iommu_enable_nesting(struct iommu_domain *domain); int iommu_enable_nesting(struct iommu_domain *domain);
int iommu_set_pgtable_quirks(struct iommu_domain *domain, int iommu_set_pgtable_quirks(struct iommu_domain *domain,
unsigned long quirks); unsigned long quirks);
...@@ -883,18 +859,6 @@ static inline int iommu_group_id(struct iommu_group *group) ...@@ -883,18 +859,6 @@ static inline int iommu_group_id(struct iommu_group *group)
return -ENODEV; return -ENODEV;
} }
static inline int iommu_domain_get_attr(struct iommu_domain *domain,
enum iommu_attr attr, void *data)
{
return -EINVAL;
}
static inline int iommu_domain_set_attr(struct iommu_domain *domain,
enum iommu_attr attr, void *data)
{
return -EINVAL;
}
static inline int iommu_set_pgtable_quirks(struct iommu_domain *domain, static inline int iommu_set_pgtable_quirks(struct iommu_domain *domain,
unsigned long quirks) unsigned long quirks)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册