Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'ppc/pamu', 'core' and 'arm...
[firefly-linux-kernel-4.4.55.git] / drivers / iommu / amd_iommu.c
index c6f3c7e046840d4b6de11c9c3c06c91e25f14431..1d84be17ff2167253d0df115f1ff6ead90657666 100644 (file)
@@ -46,6 +46,7 @@
 #include "amd_iommu_proto.h"
 #include "amd_iommu_types.h"
 #include "irq_remapping.h"
+#include "pci.h"
 
 #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28))
 
@@ -263,12 +264,6 @@ static bool check_device(struct device *dev)
        return true;
 }
 
-static void swap_pci_ref(struct pci_dev **from, struct pci_dev *to)
-{
-       pci_dev_put(*from);
-       *from = to;
-}
-
 static struct pci_bus *find_hosted_bus(struct pci_bus *bus)
 {
        while (!bus->self) {
@@ -3395,7 +3390,7 @@ static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova,
 }
 
 static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
-                                         unsigned long iova)
+                                         dma_addr_t iova)
 {
        struct protection_domain *domain = dom->priv;
        unsigned long offset_mask;