diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-11-24 11:26:43 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-11-27 08:20:30 -0500 |
commit | 87a64d523825351a23743e69949c2a8c2077cecf (patch) | |
tree | 33398f4791851e441d83852407ca843c7d427fb7 /arch | |
parent | 98fc5a693bbdda498a556654c70d1e31a186c988 (diff) |
x86/amd-iommu: Remove iommu parameter from dma_ops_domain_alloc
This function doesn't use the parameter anymore so it can be
removed.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index d10195b685a7..17e83ecb8b22 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -1188,7 +1188,7 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom) | |||
1188 | * It also intializes the page table and the address allocator data | 1188 | * It also intializes the page table and the address allocator data |
1189 | * structures required for the dma_ops interface | 1189 | * structures required for the dma_ops interface |
1190 | */ | 1190 | */ |
1191 | static struct dma_ops_domain *dma_ops_domain_alloc(struct amd_iommu *iommu) | 1191 | static struct dma_ops_domain *dma_ops_domain_alloc(void) |
1192 | { | 1192 | { |
1193 | struct dma_ops_domain *dma_dom; | 1193 | struct dma_ops_domain *dma_dom; |
1194 | 1194 | ||
@@ -1443,7 +1443,7 @@ static int device_change_notifier(struct notifier_block *nb, | |||
1443 | dma_domain = find_protection_domain(devid); | 1443 | dma_domain = find_protection_domain(devid); |
1444 | if (dma_domain) | 1444 | if (dma_domain) |
1445 | goto out; | 1445 | goto out; |
1446 | dma_domain = dma_ops_domain_alloc(iommu); | 1446 | dma_domain = dma_ops_domain_alloc(); |
1447 | if (!dma_domain) | 1447 | if (!dma_domain) |
1448 | goto out; | 1448 | goto out; |
1449 | dma_domain->target_dev = devid; | 1449 | dma_domain->target_dev = devid; |
@@ -2085,7 +2085,6 @@ static void prealloc_protection_domains(void) | |||
2085 | { | 2085 | { |
2086 | struct pci_dev *dev = NULL; | 2086 | struct pci_dev *dev = NULL; |
2087 | struct dma_ops_domain *dma_dom; | 2087 | struct dma_ops_domain *dma_dom; |
2088 | struct amd_iommu *iommu; | ||
2089 | u16 devid; | 2088 | u16 devid; |
2090 | 2089 | ||
2091 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 2090 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
@@ -2100,10 +2099,7 @@ static void prealloc_protection_domains(void) | |||
2100 | 2099 | ||
2101 | devid = get_device_id(&dev->dev); | 2100 | devid = get_device_id(&dev->dev); |
2102 | 2101 | ||
2103 | iommu = amd_iommu_rlookup_table[devid]; | 2102 | dma_dom = dma_ops_domain_alloc(); |
2104 | if (!iommu) | ||
2105 | continue; | ||
2106 | dma_dom = dma_ops_domain_alloc(iommu); | ||
2107 | if (!dma_dom) | 2103 | if (!dma_dom) |
2108 | continue; | 2104 | continue; |
2109 | init_unity_mappings_for_device(dma_dom, devid); | 2105 | init_unity_mappings_for_device(dma_dom, devid); |
@@ -2139,7 +2135,7 @@ int __init amd_iommu_init_dma_ops(void) | |||
2139 | * protection domain will be assigned to the default one. | 2135 | * protection domain will be assigned to the default one. |
2140 | */ | 2136 | */ |
2141 | for_each_iommu(iommu) { | 2137 | for_each_iommu(iommu) { |
2142 | iommu->default_dom = dma_ops_domain_alloc(iommu); | 2138 | iommu->default_dom = dma_ops_domain_alloc(); |
2143 | if (iommu->default_dom == NULL) | 2139 | if (iommu->default_dom == NULL) |
2144 | return -ENOMEM; | 2140 | return -ENOMEM; |
2145 | iommu->default_dom->domain.flags |= PD_DEFAULT_MASK; | 2141 | iommu->default_dom->domain.flags |= PD_DEFAULT_MASK; |