Skip to content

Commit

Permalink
iommu: Add function to query the default domain of a group
Browse files Browse the repository at this point in the history
This will be used to handle unity mappings in the iommu
drivers.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Joerg Roedel committed Jun 9, 2015
1 parent beed282 commit 6827ca8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,11 @@ struct iommu_group *iommu_group_get_for_dev(struct device *dev)
return group;
}

struct iommu_domain *iommu_group_default_domain(struct iommu_group *group)
{
return group->default_domain;
}

static int add_iommu_group(struct device *dev, void *data)
{
struct iommu_callback_data *cb = data;
Expand Down
1 change: 1 addition & 0 deletions include/linux/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ extern int iommu_group_unregister_notifier(struct iommu_group *group,
struct notifier_block *nb);
extern int iommu_group_id(struct iommu_group *group);
extern struct iommu_group *iommu_group_get_for_dev(struct device *dev);
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);
Expand Down

0 comments on commit 6827ca8

Please sign in to comment.