Skip to content

Commit

Permalink
Merge branches 'iommu-api/2.6.36' and 'amd-iommu/2.6.36' into iommu/2…
Browse files Browse the repository at this point in the history
….6.36
  • Loading branch information
Joerg Roedel committed Jul 27, 2010
3 parents b37fa16 + 323f99c + 80a506b commit 7a42c4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,11 @@ static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
static int amd_iommu_domain_has_cap(struct iommu_domain *domain,
unsigned long cap)
{
switch (cap) {
case IOMMU_CAP_CACHE_COHERENCY:
return 1;
}

return 0;
}

Expand Down Expand Up @@ -2609,8 +2614,7 @@ int __init amd_iommu_init_passthrough(void)

pt_domain->mode |= PAGE_MODE_NONE;

while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {

for_each_pci_dev(dev) {
if (!check_device(&dev->dev))
continue;

Expand Down
2 changes: 2 additions & 0 deletions drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain,

if (cap == IOMMU_CAP_CACHE_COHERENCY)
return dmar_domain->iommu_snooping;
if (cap == IOMMU_CAP_INTR_REMAP)
return intr_remapping_enabled;

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions include/linux/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct iommu_domain {
};

#define IOMMU_CAP_CACHE_COHERENCY 0x1
#define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */

struct iommu_ops {
int (*domain_init)(struct iommu_domain *domain);
Expand Down

0 comments on commit 7a42c4f

Please sign in to comment.