Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp762224ybf; Fri, 28 Feb 2020 07:11:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxcRUHQshdF6kv9Q9waef+4yj8a8bQIsqAcmkS7Kd9lOfP3dfEID3eGJmbeUIhdklmrkp/F X-Received: by 2002:aca:4ed7:: with SMTP id c206mr2304441oib.161.1582902685929; Fri, 28 Feb 2020 07:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582902685; cv=none; d=google.com; s=arc-20160816; b=bcsWBtGh+59zAMXTR/zFtDR+qPmPkeww5J1HKgoCXgIdwDdHqYzBUn1yFiV+QxTW4X d1uKZR8v72dUCeaZjFJhtfKGsoTkEuLMu+OCwEcSiUgXqMzTDPZCQfbSgye/Fs/3cZVs zLfVdTQnc/88+AJdzKDcFx5ceRVGJY6SBLjRVR++lRz57eHwxQGIiBfGrJbyOoEFBCfa LbF3HgFsyYNZaoSRvTB2e0HSG+hkXIT4LLdw38RSYunwkMhsM4UnP0IS0DNANobGxwhf cG42LJdCGQObKCMermYZF1+6cHZF4cTr8m3bG02jMvwkVxPYZJw0w3rQhonjhJ8nsSCJ 2zFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=HCOgVIoAFmUxspJKIDDeMLT+stXT57J0Qgb9yQF0UTQ=; b=WLzEtfoqaigJNT+j6BqquzjfHO5czQ74rNF3XwrOJVqu88d26YTPdAPdPX5gR0eGVz 7mk5SViIwJfGG3kOKjBWXbfdFP77TqEsvTSW8n7UvT3f37to8uVQFkl9bLKTuw9Seizf DvchhSMU3X+TpZ6uWt0neHoNgHeTX5MmvLXUk8Sixq1jQ8+oLRuNWnkgzyI6/hvGEGo1 MJTR+6Z2NAGuN9GSNzJOWB+SrtqyC22xOeNp1qGGyPQqtxVlhFkWiRkaXuo9pvSeZ98A Q76vaaq3vOxuzzgitgZ+7LUCULLEHI9Lnx7TkJWmK0pB9Z8jiQ7JpHEKzqqq/80GR/vR pvhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r67si1911317oie.145.2020.02.28.07.11.13; Fri, 28 Feb 2020 07:11:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727023AbgB1PIa (ORCPT + 99 others); Fri, 28 Feb 2020 10:08:30 -0500 Received: from 8bytes.org ([81.169.241.247]:56004 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726796AbgB1PIa (ORCPT ); Fri, 28 Feb 2020 10:08:30 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 8E595431; Fri, 28 Feb 2020 16:08:28 +0100 (CET) From: Joerg Roedel To: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, virtualization@lists.linux-foundation.org, Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Rob Clark , Sean Paul , Will Deacon , Robin Murphy , Joerg Roedel , Matthias Brugger , Thierry Reding , Jean-Philippe Brucker , Andy Gross , Bjorn Andersson Subject: [PATCH 00/14] iommu: Move iommu_fwspec out of 'struct device' Date: Fri, 28 Feb 2020 16:08:06 +0100 Message-Id: <20200228150820.15340-1-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, here is a patch-set to rename iommu_param to dev_iommu and establish it as a struct for generic per-device iommu-data. Also move the iommu_fwspec pointer from struct device into dev_iommu to have less iommu-related pointers in struct device. The bigger part of this patch-set moves the iommu_priv pointer from struct iommu_fwspec to dev_iommu, making is usable for iommu-drivers which do not use fwspecs. The changes for that were mostly straightforward, except for the arm-smmu (_not_ arm-smmu-v3) and the qcom iommu driver. Unfortunatly I don't have the hardware for those, so any testing of these drivers is greatly appreciated. I boot-tested these changes on arm-smmu-v3 enabled KVM VM. Please review. Regards, Joerg Joerg Roedel (14): ACPI/IORT: Remove direct access of dev->iommu_fwspec drm/msm/mdp5: Remove direct access of dev->iommu_fwspec iommu/tegra-gart: Remove direct access of dev->iommu_fwspec iommu/arm-smmu: Fix uninitilized variable warning iommu: Rename struct iommu_param to dev_iommu iommu: Move iommu_fwspec to struct dev_iommu iommu: Introduce accessors for iommu private data iommu/arm-smmu-v3: Use accessor functions for iommu private data iommu/arm-smmu: Use accessor functions for iommu private data iommu/renesas: Use accessor functions for iommu private data iommu/mediatek: Use accessor functions for iommu private data iommu/qcom: Use accessor functions for iommu private data iommu/virtio: Use accessor functions for iommu private data iommu: Move fwspec->iommu_priv to struct dev_iommu drivers/acpi/arm64/iort.c | 3 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- drivers/iommu/arm-smmu-v3.c | 10 ++-- drivers/iommu/arm-smmu.c | 58 +++++++++++----------- drivers/iommu/iommu.c | 31 ++++++------ drivers/iommu/ipmmu-vmsa.c | 7 +-- drivers/iommu/mtk_iommu.c | 13 +++-- drivers/iommu/mtk_iommu_v1.c | 14 +++--- drivers/iommu/qcom_iommu.c | 61 ++++++++++++++---------- drivers/iommu/tegra-gart.c | 2 +- drivers/iommu/virtio-iommu.c | 11 ++--- include/linux/device.h | 7 ++- include/linux/iommu.h | 29 ++++++++--- 13 files changed, 137 insertions(+), 111 deletions(-) -- 2.17.1