Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264413
b: refs/heads/master
c: c0771df
h: refs/heads/master
i:
  264411: 598596e
v: v3
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Oct 14, 2011
1 parent 6309e2e commit dfd75d0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 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: 6fbcfb3e467adb414e235eeefaeaf51ad12f2461
refs/heads/master: c0771df8d5297bfb9c4fbe8ada085a49cb22ec4f
25 changes: 15 additions & 10 deletions trunk/drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ static int dmar_forcedac;
static int intel_iommu_strict;
static int intel_iommu_superpage = 1;

int intel_iommu_gfx_mapped;
EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);

#define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1))
static DEFINE_SPINLOCK(device_domain_lock);
static LIST_HEAD(device_domain_list);
Expand Down Expand Up @@ -3226,28 +3229,30 @@ static void __init init_no_remapping_devices(void)
}
}

if (dmar_map_gfx)
return;

for_each_drhd_unit(drhd) {
int i;
if (drhd->ignored || drhd->include_all)
continue;

for (i = 0; i < drhd->devices_cnt; i++)
if (drhd->devices[i] &&
!IS_GFX_DEVICE(drhd->devices[i]))
!IS_GFX_DEVICE(drhd->devices[i]))
break;

if (i < drhd->devices_cnt)
continue;

/* bypass IOMMU if it is just for gfx devices */
drhd->ignored = 1;
for (i = 0; i < drhd->devices_cnt; i++) {
if (!drhd->devices[i])
continue;
drhd->devices[i]->dev.archdata.iommu = DUMMY_DEVICE_DOMAIN_INFO;
/* This IOMMU has *only* gfx devices. Either bypass it or
set the gfx_mapped flag, as appropriate */
if (dmar_map_gfx) {
intel_iommu_gfx_mapped = 1;
} else {
drhd->ignored = 1;
for (i = 0; i < drhd->devices_cnt; i++) {
if (!drhd->devices[i])
continue;
drhd->devices[i]->dev.archdata.iommu = DUMMY_DEVICE_DOMAIN_INFO;
}
}
}
}
Expand Down

0 comments on commit dfd75d0

Please sign in to comment.