mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
iommu: Add generic_device_group() function
This function can be used as a device_group call-back and just allocates one iommu-group per device. Signed-off-by: Joerg Roedel <[email protected]>
This commit is contained in:
parent
5e62292bad
commit
6eab556a40
2 changed files with 17 additions and 0 deletions
|
|
@ -727,6 +727,21 @@ static int get_pci_alias_or_group(struct pci_dev *pdev, u16 alias, void *opaque)
|
|||
return data->group != NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic device_group call-back function. It just allocates one
|
||||
* iommu-group per device.
|
||||
*/
|
||||
struct iommu_group *generic_device_group(struct device *dev)
|
||||
{
|
||||
struct iommu_group *group;
|
||||
|
||||
group = iommu_group_alloc();
|
||||
if (IS_ERR(group))
|
||||
return NULL;
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use standard PCI bus topology, isolation features, and DMA alias quirks
|
||||
* to find or create an IOMMU group for a device.
|
||||
|
|
|
|||
Loading…
Reference in a new issue