Unverified Commit 6030edc2 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7874 [OLK-6.6] iommu/dma: Move iova_reserve_domain_addr to header dma-iommu.h

Merge Pull Request from: @leoliu-oc 
 
Move the declaration iova_reserve_domain_addr from public header linux/iommu.h to private header driver/iommu/dma-iommu.h to avoid the compilation errors when CONFIG_IOMMU_SUPPORT is not set.

And upper acpi_rmrr_andd_probe error printk log level.

### Issue
https://gitee.com/openeuler/kernel/issues/I9ROX6

### Test
Pass. The compilation test and functional test passed. 
 
Link:https://gitee.com/openeuler/kernel/pulls/7874

 

Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents f64d9d15 864b661e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ static inline void iommu_dma_set_pci_32bit_workaround(struct device *dev)
	dev->iommu->pci_32bit_workaround = !iommu_dma_forcedac;
}

int iova_reserve_domain_addr(struct iommu_domain *domain, dma_addr_t start, dma_addr_t end);

#else /* CONFIG_IOMMU_DMA */

static inline int iommu_dma_init_fq(struct iommu_domain *domain)
@@ -46,5 +48,11 @@ static inline void iommu_dma_set_pci_32bit_workaround(struct device *dev)
{
}

static inline int iova_reserve_domain_addr(struct iommu_domain *domain, dma_addr_t start,
					   dma_addr_t end)
{
	return -EINVAL;
}

#endif	/* CONFIG_IOMMU_DMA */
#endif	/* __DMA_IOMMU_H */
+2 −2
Original line number Diff line number Diff line
@@ -3631,13 +3631,13 @@ static inline int acpi_rmrr_andd_probe(struct device *dev)

	iommu = device_lookup_iommu(dev, &bus, &devfn);
	if (!iommu) {
		pr_info("dpoint-- cannot get acpi device corresponding iommu\n");
		pr_err("cannot get acpi device corresponding iommu\n");
		return -EINVAL;
	}

	pci_device = pci_get_domain_bus_and_slot(iommu->segment, bus, devfn);
	if (!pci_device) {
		pr_info("dpoint-- cannot get acpi devie corresponding pci_device\n");
		pr_err("cannot get acpi devie corresponding pci_device\n");
		return -EINVAL;
	}
	ret = acpi_rmrr_device_create_direct_mappings(iommu_get_domain_for_dev(&pci_device->dev),
+0 −2
Original line number Diff line number Diff line
@@ -953,8 +953,6 @@ static inline bool apply_zhaoxin_dmar_acpi_a_behavior(void)
	return false;
}

extern int iova_reserve_domain_addr(struct iommu_domain *domain, dma_addr_t start, dma_addr_t end);

int __acpi_rmrr_device_create_direct_mappings(struct iommu_domain *domain, struct device *dev);

static inline void iommu_flush_iotlb_all(struct iommu_domain *domain)