]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/amd_iommu.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / arch / x86 / kernel / amd_iommu.c
index 8c3deb027d3acf66408732bb998a62c7a0eb9f48..74697408576f4b2e1f5bfaa5ede78247d34e455f 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/scatterlist.h>
 #include <linux/iommu-helper.h>
 #include <asm/proto.h>
-#include <asm/gart.h>
+#include <asm/iommu.h>
 #include <asm/amd_iommu_types.h>
 #include <asm/amd_iommu.h>
 
@@ -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;
@@ -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))