Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91024
b: refs/heads/master
c: cb5867a
h: refs/heads/master
v: v3
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Apr 19, 2008
1 parent e156032 commit 7c6f61b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 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: f9c258de3494a5249a61fe110ece2082e5927468
refs/heads/master: cb5867a5d8ca20e16ddc3397c36ee9c2e4cba219
25 changes: 25 additions & 0 deletions trunk/arch/x86/kernel/pci-dma.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#include <linux/dma-mapping.h>
#include <linux/dmar.h>

#include <asm/gart.h>
#include <asm/calgary.h>

const struct dma_mapping_ops *dma_ops;
EXPORT_SYMBOL(dma_ops);
Expand All @@ -22,4 +26,25 @@ int dma_set_mask(struct device *dev, u64 mask)
}
EXPORT_SYMBOL(dma_set_mask);

static int __init pci_iommu_init(void)
{
#ifdef CONFIG_CALGARY_IOMMU
calgary_iommu_init();
#endif

intel_iommu_init();

#ifdef CONFIG_GART_IOMMU
gart_iommu_init();
#endif

no_iommu_init();
return 0;
}

void pci_iommu_shutdown(void)
{
gart_iommu_shutdown();
}
/* Must execute after PCI subsystem */
fs_initcall(pci_iommu_init);
23 changes: 0 additions & 23 deletions trunk/arch/x86/kernel/pci-dma_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,27 +339,6 @@ void __init pci_iommu_alloc(void)
#endif
}

static int __init pci_iommu_init(void)
{
#ifdef CONFIG_CALGARY_IOMMU
calgary_iommu_init();
#endif

intel_iommu_init();

#ifdef CONFIG_GART_IOMMU
gart_iommu_init();
#endif

no_iommu_init();
return 0;
}

void pci_iommu_shutdown(void)
{
gart_iommu_shutdown();
}

#ifdef CONFIG_PCI
/* Many VIA bridges seem to corrupt data for DAC. Disable it here */

Expand All @@ -372,5 +351,3 @@ static __devinit void via_no_dac(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
#endif
/* Must execute after PCI subsystem */
fs_initcall(pci_iommu_init);

0 comments on commit 7c6f61b

Please sign in to comment.