···7extern int force_iommu, no_iommu;8extern int iommu_detected;9extern int dmar_disabled;10-extern int forbid_dac;1112extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);13
···7extern int force_iommu, no_iommu;8extern int iommu_detected;9extern int dmar_disabled;01011extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);12
+16
arch/x86/kernel/pci-dma.c
···9#include <asm/calgary.h>10#include <asm/amd_iommu.h>110012struct dma_mapping_ops *dma_ops;13EXPORT_SYMBOL(dma_ops);14···293}294/* Must execute after PCI subsystem */295fs_initcall(pci_iommu_init);00000000000000
···9#include <asm/calgary.h>10#include <asm/amd_iommu.h>1112+static int forbid_dac __read_mostly;13+14struct dma_mapping_ops *dma_ops;15EXPORT_SYMBOL(dma_ops);16···291}292/* Must execute after PCI subsystem */293fs_initcall(pci_iommu_init);294+295+#ifdef CONFIG_PCI296+/* Many VIA bridges seem to corrupt data for DAC. Disable it here */297+298+static __devinit void via_no_dac(struct pci_dev *dev)299+{300+ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {301+ printk(KERN_INFO "PCI: VIA PCI bridge detected."302+ "Disabling DAC.\n");303+ forbid_dac = 1;304+ }305+}306+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);307+#endif
-14
drivers/pci/quirks.c
···43DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor);44DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor);4546-/* Many VIA bridges seem to corrupt data for DAC. Disable it here */47-int forbid_dac __read_mostly;48-EXPORT_SYMBOL(forbid_dac);49-50-static __devinit void via_no_dac(struct pci_dev *dev)51-{52- if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {53- dev_info(&dev->dev,54- "VIA PCI bridge detected. Disabling DAC.\n");55- forbid_dac = 1;56- }57-}58-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);59-60/* Deal with broken BIOS'es that neglect to enable passive release,61 which can cause problems in combination with the 82441FX/PPro MTRRs */62static void quirk_passive_release(struct pci_dev *dev)
···43DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor);44DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor);450000000000000046/* Deal with broken BIOS'es that neglect to enable passive release,47 which can cause problems in combination with the 82441FX/PPro MTRRs */48static void quirk_passive_release(struct pci_dev *dev)