X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fiommu%2Famd_iommu.c;h=1d84be17ff2167253d0df115f1ff6ead90657666;hb=0c4513be3d01a854867446ee793748409cc0ebdf;hp=c6f3c7e046840d4b6de11c9c3c06c91e25f14431;hpb=83ed9c13e37e352b5a16caca01798c2766d91c29;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index c6f3c7e04684..1d84be17ff21 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -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;