diff options
author | Weidong Han <weidong.han@intel.com> | 2008-12-08 09:17:15 +0800 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 14:02:17 +0100 |
commit | 3b5410e735b093060b96664230c6f9f4fe80b251 (patch) | |
tree | c22013c6b7a8524ff786243a6be89a81dbab7b2d /drivers | |
parent | d71a2f33ac466a437f316e7bb024d0175a7f3cd9 (diff) | |
download | op-kernel-dev-3b5410e735b093060b96664230c6f9f4fe80b251.zip op-kernel-dev-3b5410e735b093060b96664230c6f9f4fe80b251.tar.gz |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 65aa1d4..22ad885 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) return (pte->val & 3) != 0; } +/* devices under the same p2p bridge are owned in one domain */ +#define DOMAIN_FLAG_P2P_MULTIPLE_DEVICES (1 < 0) + struct dmar_domain { int id; /* domain id */ struct intel_iommu *iommu; /* back pointer to owning iommu */ @@ -214,8 +217,7 @@ struct dmar_domain { /* adjusted guest address width, 0 is level 2 30-bit */ int agaw; -#define DOMAIN_FLAG_MULTIPLE_DEVICES 1 - int flags; + int flags; /* flags to find out type of domain */ }; /* PCI domain-device relationship */ @@ -1574,7 +1576,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) info->dev = NULL; info->domain = domain; /* This domain is shared by devices under p2p bridge */ - domain->flags |= DOMAIN_FLAG_MULTIPLE_DEVICES; + domain->flags |= DOMAIN_FLAG_P2P_MULTIPLE_DEVICES; /* pcie-to-pci bridge already has a domain, uses it */ found = NULL; |