Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174840
b: refs/heads/master
c: 5d990b6
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wright authored and Jesse Barnes committed Dec 5, 2009
1 parent 896bd9a commit ae88a57
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 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: b26a34aa4792b3db2500b8a98cb7702765c1a92e
refs/heads/master: 5d990b627537e59a3a2f039ff588a4750e9c1a6a
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,8 @@ void __init amd_iommu_detect(void)
gart_iommu_aperture_disabled = 1;
gart_iommu_aperture = 0;
#endif
/* Make sure ACS will be enabled */
pci_request_acs();
}
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/page-flags.h>
#include <linux/highmem.h>
#include <linux/console.h>
#include <linux/pci.h>

#include <xen/xen.h>
#include <xen/interface/xen.h>
Expand Down Expand Up @@ -1170,7 +1171,11 @@ asmlinkage void __init xen_start_kernel(void)
add_preferred_console("xenboot", 0, NULL);
add_preferred_console("tty", 0, NULL);
add_preferred_console("hvc", 0, NULL);
} else {
/* Make sure ACS will be enabled */
pci_request_acs();
}


xen_raw_console_write("about to get started...\n");

Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/pci/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,11 @@ void __init detect_intel_iommu(void)
#endif
#ifdef CONFIG_DMAR
if (ret && !no_iommu && !iommu_detected && !swiotlb &&
!dmar_disabled)
!dmar_disabled) {
iommu_detected = 1;
/* Make sure ACS will be enabled */
pci_request_acs();
}
#endif
}
early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,16 @@ void pci_enable_ari(struct pci_dev *dev)
bridge->ari_enabled = 1;
}

static int pci_acs_enable;

/**
* pci_request_acs - ask for ACS to be enabled if supported
*/
void pci_request_acs(void)
{
pci_acs_enable = 1;
}

/**
* pci_enable_acs - enable ACS if hardware support it
* @dev: the PCI device
Expand All @@ -1560,6 +1570,9 @@ void pci_enable_acs(struct pci_dev *dev)
u16 cap;
u16 ctrl;

if (!pci_acs_enable)
return;

if (!pci_is_pcie(dev))
return;

Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#include <linux/module.h>
#include <linux/cpumask.h>
#include <linux/pci-aspm.h>
#include <linux/iommu.h>
#include <acpi/acpi_hest.h>
#include <xen/xen.h>
#include "pci.h"

#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
Expand Down Expand Up @@ -1029,8 +1027,7 @@ static void pci_init_capabilities(struct pci_dev *dev)
pci_iov_init(dev);

/* Enable ACS P2P upstream forwarding */
if (iommu_found() || xen_initial_domain())
pci_enable_acs(dev);
pci_enable_acs(dev);
}

void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1328,5 +1328,7 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
return !!pci_pcie_cap(dev);
}

void pci_request_acs(void);

#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */

0 comments on commit ae88a57

Please sign in to comment.