Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180085
b: refs/heads/master
c: f532509
h: refs/heads/master
i:
  180083: 8914086
v: v3
  • Loading branch information
Joerg Roedel committed Jan 22, 2010
1 parent 6b70a4d commit ccde23d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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: 2ca762790caf822f7b61430fbaffa3ae4219977f
refs/heads/master: f5325094379158e6b876ea0010c807bf7890ec8f
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/amd_iommu_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
extern int amd_iommu_init_devices(void);
extern void amd_iommu_uninit_devices(void);
extern void amd_iommu_init_notifier(void);
extern void amd_iommu_init_api(void);
#ifndef CONFIG_AMD_IOMMU_STATS

static inline void amd_iommu_stats_init(void) { }
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,12 @@ static struct dma_map_ops amd_iommu_dma_ops = {
/*
* The function which clues the AMD IOMMU driver into dma_ops.
*/

void __init amd_iommu_init_api(void)
{
register_iommu(&amd_iommu_ops);
}

int __init amd_iommu_init_dma_ops(void)
{
struct amd_iommu *iommu;
Expand Down Expand Up @@ -2256,8 +2262,6 @@ int __init amd_iommu_init_dma_ops(void)
/* Make the driver finally visible to the drivers */
dma_ops = &amd_iommu_dma_ops;

register_iommu(&amd_iommu_ops);

amd_iommu_stats_init();

return 0;
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,9 +1292,12 @@ static int __init amd_iommu_init(void)
ret = amd_iommu_init_passthrough();
else
ret = amd_iommu_init_dma_ops();

if (ret)
goto free;

amd_iommu_init_api();

amd_iommu_init_notifier();

enable_iommus();
Expand Down

0 comments on commit ccde23d

Please sign in to comment.