From patchwork Tue Apr 30 00:29:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Murphy X-Patchwork-Id: 10922605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D13D933 for ; Tue, 30 Apr 2019 00:30:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B28B288DD for ; Tue, 30 Apr 2019 00:30:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EE33288E8; Tue, 30 Apr 2019 00:30:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 19802288DD for ; Tue, 30 Apr 2019 00:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=s76qTLhrG1zpmpKZKKcIyUT3GF2MLcu3Wf4yFHIRTk8=; b=jW91INn5qFSy11 pIdWTKFRVgXqV/eskOLEGZRVPIzXe6w13Q46daLxsGiQLG8jDvz/BogC+w72noInFvC2uw8zd+GsK EVV+dbinnSCcFIdvyJFrgWl1KqyOkOVTUu/+qE9aQbMpq2Ia9BB3DXSQaM5wGGAvCTWLg2fSLisSD IgA8Ui9UNr2GCc+Z4o5LDDIhBAz623FQH9jfXG9L0FsNgJGDFS6YEn+LLjoOPSxg2hb3UIF6gdfX5 hI9deG2HlykB0yOvWmckdXx5ro/DH5t8gWr1V8Y4POZ4RdjNbiA9pOYLR7mrXnmi3y603bXvJw4Hy 3AcsFKHqNJAJVQVLyxhA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLGfX-0000oL-86; Tue, 30 Apr 2019 00:30:47 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLGfO-0000f8-17 for linux-mediatek@lists.infradead.org; Tue, 30 Apr 2019 00:30:39 +0000 Received: by mail-ed1-x541.google.com with SMTP id n17so2095560edb.0 for ; Mon, 29 Apr 2019 17:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tmHyoZA3s8+eH8irHXDQwuHohJUycE2ziw5RpU+dlOU=; b=MOPfSeYvgFTPgmXOyqu5vdYm5hkSdQbjS+ZqEcO2RU+mAi+5MAMZoFxX3IpBDPLPQS +6cxB/pSPBzbPChynLlIkPp4j946qOnm4Ye/TMQhOEbAMuMfpeVVBcoKcz4+RJW8yx6/ Ved8pdw06sn2gpyLII0BLDY6t7Sg8N2naFdo6CAqbtTC39FR3o1Tc1kBC5kIorVz+Ak4 ako09dGNcEJDViNxWaT8wPfz1pEdUxqyVHmDsDi6DvZ163SxxHJc0/irfHhaluAhRXut fRdoOWoA4QNK2yK1oJ5SHB/z+IS3njGTe+Ft9ivlpb8yi+AAVdDoaUQ0ZqtYNO7vRck8 qUcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tmHyoZA3s8+eH8irHXDQwuHohJUycE2ziw5RpU+dlOU=; b=TjMv1jQcSHi8OKD8ZpQcDfPG9i6CDQbK160jFynkcEJVje3MWiybvZNcHWdkrC637+ L2lesWBguiMcCwjyknM7GZqkTdD7zipg6qFVe/NAkBGTRUPTVk2REAUMWd2uRnTW6W3F cKm/gUBtM0mxxuW2lTiUE2kexOCvRI08XRCfJQSf4DjVmmcCthzk4wRnXcghiK2qwXNN +SZ/muS/5rw0IEsvIReY2Ocl+6WQhL7gDjREFEKC6PxHsswuX2YKgQ4DbZAWol6e/EA2 HZ4A2Ez9+6ABAkpvDHgSNeh1pWDT9Zx8WrbBTDfDS0o2kqyXEpwZPiO9DVGhY5TJg+68 ZfNA== X-Gm-Message-State: APjAAAU2O9qI8X+pZ9q3Zx83qCLNyWCnrH33IBZoHnnW0I6U2hhTF72q Q4ZyV5fJgvOPIY90UYJkCvXr2g== X-Google-Smtp-Source: APXvYqxnysyX/Gy2Mv+d0SzufhcdmkrISFZgci8tZfFs0rMtqN5Lk2YDEgY4FPz5PnrMa8o5ipagUg== X-Received: by 2002:aa7:c88a:: with SMTP id p10mr41403077eds.145.1556584235673; Mon, 29 Apr 2019 17:30:35 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:a0:bc00:7d76:7b66:68:3b5f]) by smtp.gmail.com with ESMTPSA id a9sm9424163edt.93.2019.04.29.17.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 17:30:35 -0700 (PDT) From: Tom Murphy To: iommu@lists.linux-foundation.org Subject: [PATCH v2 0/4] iommu/amd: Convert the AMD iommu driver to the dma-iommu api Date: Tue, 30 Apr 2019 01:29:47 +0100 Message-Id: <20190430002952.18909-1-tmurphy@arista.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190429_173038_080178_DC61A5B7 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Will Deacon , David Brown , Thierry Reding , Marek Szyprowski , linux-s390@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Joerg Roedel , Krzysztof Kozlowski , Jonathan Hunter , linux-rockchip@lists.infradead.org, Kukjin Kim , Gerald Schaefer , Andy Gross , linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, Tom Murphy , Robin Murphy , linux-kernel@vger.kernel.org, murphyt7@tcd.ie, Rob Clark , David Woodhouse Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Convert the AMD iommu driver to the dma-iommu api. Remove the iova handling and reserve region code from the AMD iommu driver. Change-log: v2: -Rebase on top of this series: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-iommu-ops.3 -Add a gfp_t parameter to the iommu_ops::map function. -Made use of the reserve region code inside the dma-iommu api Tom Murphy (4): iommu: Add gfp parameter to iommu_ops::map iommu/dma-iommu: Handle deferred devices iommu/dma-iommu: Use the dev->coherent_dma_mask iommu/amd: Convert the AMD iommu driver to the dma-iommu api drivers/iommu/Kconfig | 1 + drivers/iommu/amd_iommu.c | 694 ++++----------------------------- drivers/iommu/arm-smmu-v3.c | 2 +- drivers/iommu/arm-smmu.c | 2 +- drivers/iommu/dma-iommu.c | 52 ++- drivers/iommu/exynos-iommu.c | 2 +- drivers/iommu/intel-iommu.c | 2 +- drivers/iommu/iommu.c | 43 +- drivers/iommu/ipmmu-vmsa.c | 2 +- drivers/iommu/msm_iommu.c | 2 +- drivers/iommu/mtk_iommu.c | 2 +- drivers/iommu/mtk_iommu_v1.c | 2 +- drivers/iommu/omap-iommu.c | 2 +- drivers/iommu/qcom_iommu.c | 2 +- drivers/iommu/rockchip-iommu.c | 2 +- drivers/iommu/s390-iommu.c | 2 +- drivers/iommu/tegra-gart.c | 2 +- drivers/iommu/tegra-smmu.c | 2 +- include/linux/iommu.h | 21 +- 19 files changed, 187 insertions(+), 652 deletions(-)