···1111extern int iommu_detected;1212extern void iommu_dma_init(void);1313extern void machvec_init(const char *name);1414-extern int forbid_dac;15141615#endif
-7
arch/ia64/kernel/pci-dma.c
···8989{9090 struct dma_mapping_ops *ops = get_dma_ops(dev);91919292-#ifdef CONFIG_PCI9393- if (mask > 0xffffffff && forbid_dac > 0) {9494- dev_info(dev, "Disallowing DAC for device\n");9595- return 0;9696- }9797-#endif9898-9992 if (ops->dma_supported_op)10093 return ops->dma_supported_op(dev, mask);10194
-1
arch/x86/include/asm/iommu.h
···77extern int force_iommu, no_iommu;88extern int iommu_detected;99extern int dmar_disabled;1010-extern int forbid_dac;11101211extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);1312
+16
arch/x86/kernel/pci-dma.c
···99#include <asm/calgary.h>1010#include <asm/amd_iommu.h>11111212+static int forbid_dac __read_mostly;1313+1214struct dma_mapping_ops *dma_ops;1315EXPORT_SYMBOL(dma_ops);1416···293291}294292/* Must execute after PCI subsystem */295293fs_initcall(pci_iommu_init);294294+295295+#ifdef CONFIG_PCI296296+/* Many VIA bridges seem to corrupt data for DAC. Disable it here */297297+298298+static __devinit void via_no_dac(struct pci_dev *dev)299299+{300300+ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {301301+ printk(KERN_INFO "PCI: VIA PCI bridge detected."302302+ "Disabling DAC.\n");303303+ forbid_dac = 1;304304+ }305305+}306306+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);307307+#endif
-14
drivers/pci/quirks.c
···4343DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor);4444DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor);45454646-/* Many VIA bridges seem to corrupt data for DAC. Disable it here */4747-int forbid_dac __read_mostly;4848-EXPORT_SYMBOL(forbid_dac);4949-5050-static __devinit void via_no_dac(struct pci_dev *dev)5151-{5252- if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {5353- dev_info(&dev->dev,5454- "VIA PCI bridge detected. Disabling DAC.\n");5555- forbid_dac = 1;5656- }5757-}5858-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);5959-6046/* Deal with broken BIOS'es that neglect to enable passive release,6147 which can cause problems in combination with the 82441FX/PPro MTRRs */6248static void quirk_passive_release(struct pci_dev *dev)