aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/pci_endpoint_test.c
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2023-05-11 01:42:12 -0300
committerJoerg Roedel <[email protected]>2023-05-23 08:15:57 +0200
commitd99be00f42eac9fc35a164f3f6c8c7a56b295aa9 (patch)
treea0575f349e1f37c65ccac10d53e257045e4a7450 /drivers/misc/pci_endpoint_test.c
parentfcbb0a4d738ce3ccc06d2c73ba227cce5094d885 (diff)
iommu: Consolidate the default_domain setup to one function
Make iommu_change_dev_def_domain() general enough to setup the initial default_domain or replace it with a new default_domain. Call the new function iommu_setup_default_domain() and make it the only place in the code that stores to group->default_domain. Consolidate the three copies of the default_domain setup sequence. The flow flow requires: - Determining the domain type to use - Checking if the current default domain is the same type - Allocating a domain - Doing iommu_create_device_direct_mappings() - Attaching it to devices - Store group->default_domain This adjusts the domain allocation from the prior patch to be able to detect if each of the allocation steps is already the domain we already have, which is a more robust version of what change default domain was already doing. Reviewed-by: Lu Baolu <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Tested-by: Niklas Schnelle <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'drivers/misc/pci_endpoint_test.c')
0 files changed, 0 insertions, 0 deletions