Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106311
b: refs/heads/master
c: 3a61ec3
h: refs/heads/master
i:
  106309: 505b7ac
  106307: 9acd919
  106303: e4002b2
v: v3
  • Loading branch information
Joerg Roedel authored and Ingo Molnar committed Jul 26, 2008
1 parent dd7000c commit 3fe8d92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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: 1ca9fda4b2f3413e4bc748b983f5585629ca0560
refs/heads/master: 3a61ec387c9092dfc91a5959145d36835a72fc4c
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ static int get_device_resources(struct device *dev,
_bdf = calc_devid(pcidev->bus->number, pcidev->devfn);

/* device not translated by any IOMMU in the system? */
if (_bdf >= amd_iommu_last_bdf) {
if (_bdf > amd_iommu_last_bdf) {
*iommu = NULL;
*domain = NULL;
*bdf = 0xffff;
Expand Down Expand Up @@ -1085,7 +1085,7 @@ void prealloc_protection_domains(void)

while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
devid = (dev->bus->number << 8) | dev->devfn;
if (devid >= amd_iommu_last_bdf)
if (devid > amd_iommu_last_bdf)
continue;
devid = amd_iommu_alias_table[devid];
if (domain_for_device(devid))
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ static int __init init_exclusion_range(struct ivmd_header *m)
set_device_exclusion_range(m->devid, m);
break;
case ACPI_IVMD_TYPE_ALL:
for (i = 0; i < amd_iommu_last_bdf; ++i)
for (i = 0; i <= amd_iommu_last_bdf; ++i)
set_device_exclusion_range(i, m);
break;
case ACPI_IVMD_TYPE_RANGE:
Expand Down Expand Up @@ -934,7 +934,7 @@ int __init amd_iommu_init(void)
/*
* let all alias entries point to itself
*/
for (i = 0; i < amd_iommu_last_bdf; ++i)
for (i = 0; i <= amd_iommu_last_bdf; ++i)
amd_iommu_alias_table[i] = i;

/*
Expand Down

0 comments on commit 3fe8d92

Please sign in to comment.