Commit e17c6deb authored by Joerg Roedel's avatar Joerg Roedel
Browse files

Merge branches 'arm/mediatek', 'arm/msm', 'arm/renesas', 'arm/rockchip',...

Merge branches 'arm/mediatek', 'arm/msm', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'x86/vt-d' and 'x86/amd' into next
Loading
+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@ properties:
              - renesas,ipmmu-r8a77990 # R-Car E3
              - renesas,ipmmu-r8a77995 # R-Car D3
              - renesas,ipmmu-r8a779a0 # R-Car V3U
      - items:
          - enum:
              - renesas,ipmmu-r8a779f0 # R-Car S4-8
          - const: renesas,rcar-gen4-ipmmu-vmsa  # R-Car Gen4

  reg:
    maxItems: 1
+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 −3
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ extern irqreturn_t amd_iommu_int_thread(int irq, void *data);
extern irqreturn_t amd_iommu_int_handler(int irq, void *data);
extern void amd_iommu_apply_erratum_63(u16 devid);
extern void amd_iommu_restart_event_logging(struct amd_iommu *iommu);
extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
extern int amd_iommu_init_devices(void);
extern void amd_iommu_uninit_devices(void);
extern void amd_iommu_init_notifier(void);
@@ -117,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);

+14 −4
Original line number Diff line number Diff line
@@ -671,7 +671,7 @@ void amd_iommu_restart_event_logging(struct amd_iommu *iommu)
 * This function resets the command buffer if the IOMMU stopped fetching
 * commands from it.
 */
void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu)
static void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu)
{
	iommu_feature_disable(iommu, CONTROL_CMDBUF_EN);

@@ -990,6 +990,7 @@ static bool copy_device_table(void)
				get_order(dev_table_size));
	if (old_dev_tbl_cpy == NULL) {
		pr_err("Failed to allocate memory for copying old device table!\n");
		memunmap(old_devtb);
		return false;
	}

@@ -1020,6 +1021,7 @@ static bool copy_device_table(void)
			if ((int_ctl != DTE_IRQ_REMAP_INTCTL) ||
			    (int_tab_len != DTE_INTTABLEN)) {
				pr_err("Wrong old irq remapping flag: %#x\n", devid);
				memunmap(old_devtb);
				return false;
			}

@@ -1953,9 +1955,11 @@ static int __init amd_iommu_init_pci(void)

	for_each_iommu(iommu) {
		ret = iommu_init_pci(iommu);
		if (ret)
			break;

		if (ret) {
			pr_err("IOMMU%d: Failed to initialize IOMMU Hardware (error=%d)!\n",
			       iommu->index, ret);
			goto out;
		}
		/* Need to setup range after PCI init */
		iommu_set_cwwb_range(iommu);
	}
@@ -1971,6 +1975,11 @@ static int __init amd_iommu_init_pci(void)
	 * active.
	 */
	ret = amd_iommu_init_api();
	if (ret) {
		pr_err("IOMMU: Failed to initialize IOMMU-API interface (error=%d)!\n",
		       ret);
		goto out;
	}

	init_device_table_dma();

@@ -1980,6 +1989,7 @@ static int __init amd_iommu_init_pci(void)
	if (!ret)
		print_iommu_info();

out:
	return ret;
}

+12 −11
Original line number Diff line number Diff line
@@ -2221,8 +2221,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);

@@ -2275,13 +2274,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,
@@ -2290,9 +2282,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,
	}
};

/*****************************************************************************
Loading