]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/amd_iommu.c
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[linux-2.6] / arch / x86 / kernel / amd_iommu.c
index dec10e1a397c2fa9dac7c6890846acdf42af76e6..c25210e6ac888e94224b460e6eb82f3c556d7616 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>
 
@@ -664,7 +664,7 @@ static int get_device_resources(struct device *dev,
        BUG_ON(!dev || dev->bus != &pci_bus_type || !dev->dma_mask);
 
        pcidev = to_pci_dev(dev);
-       _bdf = (pcidev->bus->number << 8) | pcidev->devfn;
+       _bdf = calc_devid(pcidev->bus->number, pcidev->devfn);
 
        /* device not translated by any IOMMU in the system? */
        if (_bdf >= amd_iommu_last_bdf) {