aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWeidong Han <weidong.han@intel.com>2008-12-07 20:17:15 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2009-01-03 08:02:17 -0500
commit3b5410e735b093060b96664230c6f9f4fe80b251 (patch)
treec22013c6b7a8524ff786243a6be89a81dbab7b2d /drivers
parentd71a2f33ac466a437f316e7bb024d0175a7f3cd9 (diff)
change P2P domain flags
Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/intel-iommu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 65aa1d427f43..22ad8851b3e0 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -200,6 +200,9 @@ static inline bool dma_pte_present(struct dma_pte *pte)
200 return (pte->val & 3) != 0; 200 return (pte->val & 3) != 0;
201} 201}
202 202
203/* devices under the same p2p bridge are owned in one domain */
204#define DOMAIN_FLAG_P2P_MULTIPLE_DEVICES (1 < 0)
205
203struct dmar_domain { 206struct dmar_domain {
204 int id; /* domain id */ 207 int id; /* domain id */
205 struct intel_iommu *iommu; /* back pointer to owning iommu */ 208 struct intel_iommu *iommu; /* back pointer to owning iommu */
@@ -214,8 +217,7 @@ struct dmar_domain {
214 /* adjusted guest address width, 0 is level 2 30-bit */ 217 /* adjusted guest address width, 0 is level 2 30-bit */
215 int agaw; 218 int agaw;
216 219
217#define DOMAIN_FLAG_MULTIPLE_DEVICES 1 220 int flags; /* flags to find out type of domain */
218 int flags;
219}; 221};
220 222
221/* PCI domain-device relationship */ 223/* PCI domain-device relationship */
@@ -1574,7 +1576,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw)
1574 info->dev = NULL; 1576 info->dev = NULL;
1575 info->domain = domain; 1577 info->domain = domain;
1576 /* This domain is shared by devices under p2p bridge */ 1578 /* This domain is shared by devices under p2p bridge */
1577 domain->flags |= DOMAIN_FLAG_MULTIPLE_DEVICES; 1579 domain->flags |= DOMAIN_FLAG_P2P_MULTIPLE_DEVICES;
1578 1580
1579 /* pcie-to-pci bridge already has a domain, uses it */ 1581 /* pcie-to-pci bridge already has a domain, uses it */
1580 found = NULL; 1582 found = NULL;