Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316575
b: refs/heads/master
c: b9b1ce7
h: refs/heads/master
i:
  316573: e8b0af3
  316571: 10b6753
  316567: f5ac893
  316559: b02d816
  316543: 097bd31
v: v3
  • Loading branch information
Joerg Roedel committed Jul 17, 2012
1 parent a4cd34c commit 5ac7f0e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62410eeb40ef355fa47f63886542f4dacef13ba9
refs/heads/master: b9b1ce707d81ec63c04e4fd8c34699ada950e6dc
27 changes: 20 additions & 7 deletions trunk/drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1627,8 +1627,6 @@ int __init amd_iommu_init_hardware(void)

enable_iommus();

amd_iommu_init_notifier();

register_syscore_ops(&amd_iommu_syscore_ops);

return ret;
Expand Down Expand Up @@ -1669,6 +1667,25 @@ static bool detect_ivrs(void)
return true;
}

static int amd_iommu_init_dma(void)
{
int ret;

if (iommu_pass_through)
ret = amd_iommu_init_passthrough();
else
ret = amd_iommu_init_dma_ops();

if (ret)
return ret;

amd_iommu_init_api();

amd_iommu_init_notifier();

return 0;
}

/*
* This is the core init function for AMD IOMMU hardware in the system.
* This function is called from the generic x86 DMA layer initialization
Expand All @@ -1690,11 +1707,7 @@ static int __init amd_iommu_init(void)
if (ret)
goto free;

if (iommu_pass_through)
ret = amd_iommu_init_passthrough();
else
ret = amd_iommu_init_dma_ops();

ret = amd_iommu_init_dma();
if (ret)
goto free;

Expand Down

0 comments on commit 5ac7f0e

Please sign in to comment.