Commit 067e95fc authored by Joerg Roedel's avatar Joerg Roedel
Browse files

Merge branch 'core' into x86/vt-d

parents f266c11b 5b61343b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
		 * or equal to the system's PAGE_SIZE, with a preference if
		 * both are equal.
		 */
		pgsize_bitmap = tdev->iommu.domain->ops->pgsize_bitmap;
		pgsize_bitmap = tdev->iommu.domain->pgsize_bitmap;
		if (pgsize_bitmap & PAGE_SIZE) {
			tdev->iommu.pgshift = PAGE_SHIFT;
		} else {
+1 −2
Original line number Diff line number Diff line
@@ -116,8 +116,7 @@ void amd_iommu_domain_clr_pt_root(struct protection_domain *domain)


extern bool translation_pre_enabled(struct amd_iommu *iommu);
extern bool amd_iommu_is_attach_deferred(struct iommu_domain *domain,
					 struct device *dev);
extern bool amd_iommu_is_attach_deferred(struct device *dev);
extern int __init add_special_device(u8 type, u8 id, u16 *devid,
				     bool cmd_line);

+12 −11
Original line number Diff line number Diff line
@@ -2215,8 +2215,7 @@ static void amd_iommu_get_resv_regions(struct device *dev,
	list_add_tail(&region->list, head);
}

bool amd_iommu_is_attach_deferred(struct iommu_domain *domain,
				  struct device *dev)
bool amd_iommu_is_attach_deferred(struct device *dev)
{
	struct iommu_dev_data *dev_data = dev_iommu_priv_get(dev);

@@ -2269,13 +2268,6 @@ static int amd_iommu_def_domain_type(struct device *dev)
const struct iommu_ops amd_iommu_ops = {
	.capable = amd_iommu_capable,
	.domain_alloc = amd_iommu_domain_alloc,
	.domain_free  = amd_iommu_domain_free,
	.attach_dev = amd_iommu_attach_device,
	.detach_dev = amd_iommu_detach_device,
	.map = amd_iommu_map,
	.iotlb_sync_map	= amd_iommu_iotlb_sync_map,
	.unmap = amd_iommu_unmap,
	.iova_to_phys = amd_iommu_iova_to_phys,
	.probe_device = amd_iommu_probe_device,
	.release_device = amd_iommu_release_device,
	.probe_finalize = amd_iommu_probe_finalize,
@@ -2284,9 +2276,18 @@ const struct iommu_ops amd_iommu_ops = {
	.put_resv_regions = generic_iommu_put_resv_regions,
	.is_attach_deferred = amd_iommu_is_attach_deferred,
	.pgsize_bitmap	= AMD_IOMMU_PGSIZES,
	.def_domain_type = amd_iommu_def_domain_type,
	.default_domain_ops = &(const struct iommu_domain_ops) {
		.attach_dev	= amd_iommu_attach_device,
		.detach_dev	= amd_iommu_detach_device,
		.map		= amd_iommu_map,
		.unmap		= amd_iommu_unmap,
		.iotlb_sync_map	= amd_iommu_iotlb_sync_map,
		.iova_to_phys	= amd_iommu_iova_to_phys,
		.flush_iotlb_all = amd_iommu_flush_iotlb_all,
		.iotlb_sync	= amd_iommu_iotlb_sync,
	.def_domain_type = amd_iommu_def_domain_type,
		.free		= amd_iommu_domain_free,
	}
};

/*****************************************************************************
+1 −1
Original line number Diff line number Diff line
@@ -537,7 +537,7 @@ static int ppr_notifier(struct notifier_block *nb, unsigned long e, void *data)
	ret = NOTIFY_DONE;

	/* In kdump kernel pci dev is not initialized yet -> send INVALID */
	if (amd_iommu_is_attach_deferred(NULL, &pdev->dev)) {
	if (amd_iommu_is_attach_deferred(&pdev->dev)) {
		amd_iommu_complete_ppr(pdev, iommu_fault->pasid,
				       PPR_INVALID, tag);
		goto out;
+11 −9
Original line number Diff line number Diff line
@@ -765,15 +765,6 @@ static void apple_dart_get_resv_regions(struct device *dev,

static const struct iommu_ops apple_dart_iommu_ops = {
	.domain_alloc = apple_dart_domain_alloc,
	.domain_free = apple_dart_domain_free,
	.attach_dev = apple_dart_attach_dev,
	.detach_dev = apple_dart_detach_dev,
	.map_pages = apple_dart_map_pages,
	.unmap_pages = apple_dart_unmap_pages,
	.flush_iotlb_all = apple_dart_flush_iotlb_all,
	.iotlb_sync = apple_dart_iotlb_sync,
	.iotlb_sync_map = apple_dart_iotlb_sync_map,
	.iova_to_phys = apple_dart_iova_to_phys,
	.probe_device = apple_dart_probe_device,
	.release_device = apple_dart_release_device,
	.device_group = apple_dart_device_group,
@@ -782,6 +773,17 @@ static const struct iommu_ops apple_dart_iommu_ops = {
	.get_resv_regions = apple_dart_get_resv_regions,
	.put_resv_regions = generic_iommu_put_resv_regions,
	.pgsize_bitmap = -1UL, /* Restricted during dart probe */
	.default_domain_ops = &(const struct iommu_domain_ops) {
		.attach_dev	= apple_dart_attach_dev,
		.detach_dev	= apple_dart_detach_dev,
		.map_pages	= apple_dart_map_pages,
		.unmap_pages	= apple_dart_unmap_pages,
		.flush_iotlb_all = apple_dart_flush_iotlb_all,
		.iotlb_sync	= apple_dart_iotlb_sync,
		.iotlb_sync_map	= apple_dart_iotlb_sync_map,
		.iova_to_phys	= apple_dart_iova_to_phys,
		.free		= apple_dart_domain_free,
	}
};

static irqreturn_t apple_dart_irq(int irq, void *dev)
Loading