From patchwork Thu Apr 11 18:47:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Murphy X-Patchwork-Id: 10896615 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 23E841669 for ; Thu, 11 Apr 2019 18:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09BD128CE5 for ; Thu, 11 Apr 2019 18:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1FF128CE8; Thu, 11 Apr 2019 18:48:40 +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 8994D28CE5 for ; Thu, 11 Apr 2019 18:48:40 +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=eTxGCAy2BKSe/vGFyr5cA3TTLfFgwx0IKx74/Qobevc=; b=hBvmg359GIlWQB ochZlipfq1IHlHXSYw6pG5/Qwil8g+TjxqZ9XCotngYJxYXRiiAf8EJEu8/b2vT3q6JUx1KoBIySP iR9Jb47bYSdP4WWkDv9zgnxpwHNFVxfAYfVXgudq15lICYb5t+i6CzpQIQ+J26l/IAQgi8PWVMqK+ Cd4mH+bHjCal9rVtdBaaS9IlpMUSAUcpiPrITegnME9xVMmUmqSNzzgQ1QKWbkWMAcai8BKldBqoi Wo/y/k5oy/dcPKHad4PhW6jO3vWaw0SFHZ9bc8Y8hE8VSlEJxgdYMXc3CI9BndbSWLmggohVtbLMA EL6PPmKGMWKhxdIPaJww==; 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 1hEekV-0001iX-K9; Thu, 11 Apr 2019 18:48:35 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEekS-0001hY-7C for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2019 18:48:33 +0000 Received: by mail-ed1-x542.google.com with SMTP id w3so6121933edu.10 for ; Thu, 11 Apr 2019 11:48:31 -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=cBtAcqUe2/+GOz+Tww7cmmfM8WqU2iJOHg5iA/UrduI=; b=LZd9RpxbPNh8wdp84QXHEpMLI91fVRjDJTUTlZe8ZP5xqaukHdb/Vc768qVV8Y1yks vaaroQZV7xe6vXloA3mk+xG5x0zvGBDbYWF0BWJnuN82P1QIchiw4tQG0Wk4Vpon1fJN tqXk3aD4JBb35Iq1jcAm8IUuDWT9iIgJM4BBW32gAQXBl8Pncg2hAciW3TLwvIECtZPq 55gnsjYhasEqTvNh41oAZ5XJyUupyw0BXjZnj+UO7saF2fDZYeCahLz9NJWZ1teMcjtw niwLWLoJMYfrFf2z8XjdSsm7iBNOX5yVfCatMP0xD46vR1r6IZTOue7XAnuvVOnOeANT hHbg== 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=cBtAcqUe2/+GOz+Tww7cmmfM8WqU2iJOHg5iA/UrduI=; b=ddxvqFNwc6Uxn5XCgOWuSz4ZJmLf10SWWflbH/5YMJ3+fH8KYS1ywFUjx/yWREJJue RzEh9SUNfT5hEK6W/95w+zviXGlNrZWrWiM3SnkcwwFv026xQYZWVr9R4u0ofkSSm8zB USss6vAiXXLyq/YdQCBgTIS1ZU0PvECgR/eSdqyD90Y4lWaKBSr6vFfeDEf80h6bJyjM H4mfYfDr+P2YLS4pQQVs8Yt63K+vrW9hZk/807VbNcRX00NRyWR8wuXJzc331VQrMoMa qHBeSkHRYEdNhfvPKu/xsCdd9D3VaFtToSiIU0zTPYXeQ1yF/IouXtmpa8Nn8xBb65sa BlWw== X-Gm-Message-State: APjAAAWeH3btiVpY+WOk6n6IJZbYVR0GQKy81DS7vqH554sUZ7XwNGw3 fhGNwfmy5o1E5As5chFwiM1cyw== X-Google-Smtp-Source: APXvYqwQliYaTEetalcCwzYv+n0HpwRJdoNN5cySsZXKL/GejBbg1SKdoEvi00jzkezuKeMc/dmhIA== X-Received: by 2002:a50:e844:: with SMTP id k4mr32014345edn.249.1555008510116; Thu, 11 Apr 2019 11:48:30 -0700 (PDT) Received: from localhost.localdomain ([80.233.32.123]) by smtp.gmail.com with ESMTPSA id b10sm1285130edi.28.2019.04.11.11.48.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 11:48:29 -0700 (PDT) From: Tom Murphy To: iommu@lists.linux-foundation.org Subject: [PATCH 0/9] iommu/amd: Convert the AMD iommu driver to the dma-iommu api Date: Thu, 11 Apr 2019 19:47:29 +0100 Message-Id: <20190411184741.27540-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-20190411_114832_266496_993932EC X-CRM114-Status: GOOD ( 12.14 ) X-BeenThere: linux-arm-kernel@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 , jamessewart@arista.com, Will Deacon , David Brown , Marek Szyprowski , linux-samsung-soc@vger.kernel.org, dima@arista.com, Joerg Roedel , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Andy Gross , Marc Zyngier , linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Tom Murphy , linux-kernel@vger.kernel.org, murphyt7@tcd.ie, Rob Clark , Robin Murphy Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Convert the AMD iommu driver to the dma-iommu api and remove the iova handling code from the AMD iommu driver. Tom Murphy (9): iommu/dma-iommu: Add iommu_map_atomic iommu/dma-iommu: Add function to flush any cached not present IOTLB entries iommu/dma-iommu: Add iommu_dma_copy_reserved_iova, iommu_dma_apply_resv_region to the dma-iommu api iommu/dma-iommu: Add iommu_dma_map_page_coherent iommu/amd: Implement .flush_np_cache iommu/amd: Implement map_atomic iommu/amd: Use the dma-iommu api iommu/amd: Clean up unused functions iommu/amd: Add allocated domain to global list earlier drivers/iommu/Kconfig | 1 + drivers/iommu/amd_iommu.c | 468 ++++++++------------------------- drivers/iommu/arm-smmu-v3.c | 1 + drivers/iommu/arm-smmu.c | 1 + drivers/iommu/dma-iommu.c | 68 ++++- drivers/iommu/exynos-iommu.c | 1 + drivers/iommu/iommu.c | 46 +++- drivers/iommu/ipmmu-vmsa.c | 1 + drivers/iommu/mtk_iommu.c | 1 + drivers/iommu/qcom_iommu.c | 1 + drivers/iommu/rockchip-iommu.c | 1 + include/linux/dma-iommu.h | 10 + include/linux/iommu.h | 25 ++ 13 files changed, 253 insertions(+), 372 deletions(-)