Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169213
b: refs/heads/master
c: d07c1be
h: refs/heads/master
i:
  169211: 9130889
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Nov 10, 2009
1 parent 26699eb commit 33c1bdd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41855b77547fa18d90ed6a5d322983d3fdab1959
refs/heads/master: d07c1be0693e0902d743160b8b638585b808f8ac
9 changes: 9 additions & 0 deletions trunk/arch/x86/include/asm/x86_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ struct x86_init_timers {
void (*timer_init)(void);
};

/**
* struct x86_init_iommu - platform specific iommu setup
* @iommu_init: platform specific iommu setup
*/
struct x86_init_iommu {
int (*iommu_init)(void);
};

/**
* struct x86_init_ops - functions for platform specific setup
*
Expand All @@ -101,6 +109,7 @@ struct x86_init_ops {
struct x86_init_oem oem;
struct x86_init_paging paging;
struct x86_init_timers timers;
struct x86_init_iommu iommu;
};

/**
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ static int __init pci_iommu_init(void)
dma_debug_add_bus(&pci_bus_type);
#endif

x86_init.iommu.iommu_init();

calgary_iommu_init();

intel_iommu_init();
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/x86_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
void __cpuinit x86_init_noop(void) { }
void __init x86_init_uint_noop(unsigned int unused) { }
void __init x86_init_pgd_noop(pgd_t *unused) { }
int __init iommu_init_noop(void) { return 0; }

/*
* The platform setup functions are preset with the default functions
Expand Down Expand Up @@ -63,6 +64,10 @@ struct x86_init_ops x86_init __initdata = {
.tsc_pre_init = x86_init_noop,
.timer_init = hpet_time_init,
},

.iommu = {
.iommu_init = iommu_init_noop,
},
};

struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
Expand Down

0 comments on commit 33c1bdd

Please sign in to comment.