diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-04-08 12:20:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:57 -0400 |
commit | cb5867a5d8ca20e16ddc3397c36ee9c2e4cba219 (patch) | |
tree | ab6e1e7bc608574b9f8d7266a7f86321a53d4235 /arch/x86/kernel | |
parent | f9c258de3494a5249a61fe110ece2082e5927468 (diff) |
x86: move initialization functions to pci-dma.c
initcalls that triggers the various possibiities for
dma subsys are moved to pci-dma.c.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 25 | ||||
-rw-r--r-- | arch/x86/kernel/pci-dma_64.c | 23 |
2 files changed, 25 insertions, 23 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 37a558a96153..6b77fd872a7a 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -1,4 +1,8 @@ | |||
1 | #include <linux/dma-mapping.h> | 1 | #include <linux/dma-mapping.h> |
2 | #include <linux/dmar.h> | ||
3 | |||
4 | #include <asm/gart.h> | ||
5 | #include <asm/calgary.h> | ||
2 | 6 | ||
3 | const struct dma_mapping_ops *dma_ops; | 7 | const struct dma_mapping_ops *dma_ops; |
4 | EXPORT_SYMBOL(dma_ops); | 8 | EXPORT_SYMBOL(dma_ops); |
@@ -22,4 +26,25 @@ int dma_set_mask(struct device *dev, u64 mask) | |||
22 | } | 26 | } |
23 | EXPORT_SYMBOL(dma_set_mask); | 27 | EXPORT_SYMBOL(dma_set_mask); |
24 | 28 | ||
29 | static int __init pci_iommu_init(void) | ||
30 | { | ||
31 | #ifdef CONFIG_CALGARY_IOMMU | ||
32 | calgary_iommu_init(); | ||
33 | #endif | ||
34 | |||
35 | intel_iommu_init(); | ||
36 | |||
37 | #ifdef CONFIG_GART_IOMMU | ||
38 | gart_iommu_init(); | ||
39 | #endif | ||
25 | 40 | ||
41 | no_iommu_init(); | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | void pci_iommu_shutdown(void) | ||
46 | { | ||
47 | gart_iommu_shutdown(); | ||
48 | } | ||
49 | /* Must execute after PCI subsystem */ | ||
50 | fs_initcall(pci_iommu_init); | ||
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c index 9ef18bfad2ad..42021300964a 100644 --- a/arch/x86/kernel/pci-dma_64.c +++ b/arch/x86/kernel/pci-dma_64.c | |||
@@ -339,27 +339,6 @@ void __init pci_iommu_alloc(void) | |||
339 | #endif | 339 | #endif |
340 | } | 340 | } |
341 | 341 | ||
342 | static int __init pci_iommu_init(void) | ||
343 | { | ||
344 | #ifdef CONFIG_CALGARY_IOMMU | ||
345 | calgary_iommu_init(); | ||
346 | #endif | ||
347 | |||
348 | intel_iommu_init(); | ||
349 | |||
350 | #ifdef CONFIG_GART_IOMMU | ||
351 | gart_iommu_init(); | ||
352 | #endif | ||
353 | |||
354 | no_iommu_init(); | ||
355 | return 0; | ||
356 | } | ||
357 | |||
358 | void pci_iommu_shutdown(void) | ||
359 | { | ||
360 | gart_iommu_shutdown(); | ||
361 | } | ||
362 | |||
363 | #ifdef CONFIG_PCI | 342 | #ifdef CONFIG_PCI |
364 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ | 343 | /* Many VIA bridges seem to corrupt data for DAC. Disable it here */ |
365 | 344 | ||
@@ -372,5 +351,3 @@ static __devinit void via_no_dac(struct pci_dev *dev) | |||
372 | } | 351 | } |
373 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); | 352 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac); |
374 | #endif | 353 | #endif |
375 | /* Must execute after PCI subsystem */ | ||
376 | fs_initcall(pci_iommu_init); | ||