From patchwork Mon Jul 8 19:00:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 11035675 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 C530914F6 for ; Mon, 8 Jul 2019 19:01:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B479D28449 for ; Mon, 8 Jul 2019 19:01:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A803F285E2; Mon, 8 Jul 2019 19:01:03 +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 59A5A28653 for ; Mon, 8 Jul 2019 19:01:03 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=1z7o2xCTBB2DHnblrtmgHchAiLFDv0FPnhoh9qhu0pg=; b=qAb ILTj6/1Ayzwmqv2wbzCYwbcN2bgMFo6H6PhAVbVFluPfG2myP2lzZ7HIKCCxw4g84y0zRqY7KxVJO MDLi8qmQ4St4Fo0mHjfQXQq1woT/eCGDAujF6DvW1lnb1JnZ4O4C7f3d0KRt6gRT5QiD2WojxkyGB x55NtJXOMjutVF4v9JDAxyiy4i56amTtlCDHKCiDbBH1P5EHMY+nUulmM/MYdfIMRuGEfylq1NN63 sdos1EPXbdBC//3Q9w3/pWn/tOrINbtxmHa0DPuRP158Y2MR087fQmGUOE1Zp3vjW1wv4C46KJ4YN oZY9He+VISaU2xw0JxBrnKGU7+rPu0g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hkYsk-0004jW-8u; Mon, 08 Jul 2019 19:00:58 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hkYsg-0004iu-15 for linux-arm-kernel@lists.infradead.org; Mon, 08 Jul 2019 19:00:55 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9E7FD60FEB; Mon, 8 Jul 2019 19:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1562612453; bh=3cZ120rfFscLjFKv5nknwSkEb05XjN6zsQhL+0Uk7mA=; h=From:To:Cc:Subject:Date:From; b=g1j6LoPaI/+wTOsEw8t+ilntBs99VUFNL2oAqVgkWMt7JpF/I6zD4AusUlN+gbTIN KhIxdl59ekJSr0ovtRKdFugLystTw/kd7nrVGV8R3ZBHh0CeNToUU3E2WnXHeBLywI On01R9Eygl+8egTxC+YzUsCatNy0mC1kglBnJ6Nw= Received: from jcrouse1-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7647C60E3F; Mon, 8 Jul 2019 19:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1562612452; bh=3cZ120rfFscLjFKv5nknwSkEb05XjN6zsQhL+0Uk7mA=; h=From:To:Cc:Subject:Date:From; b=RlxX3GiGklNIZkgVbwds5vGc/pv3hVX+zqgSNP+HNfsm24k64LSUODh3aC3fMWjJL X0hcGZee8Nkg+jE3I1wgIg51HApyOTNFneQmhTD8a5DQnMbqfk4jLyPETtxuDtki4E Q9prYAIIOOnhj6gIaNiBYZLNVn2siZMldjiyVJXw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7647C60E3F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [RESEND PATCH v2 0/3] iommu/arm-smmu: Split pagetable support Date: Mon, 8 Jul 2019 13:00:44 -0600 Message-Id: <1562612447-19856-1-git-send-email-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190708_120054_100031_5B9F676F X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , jean-philippe.brucker@arm.com, linux-arm-msm@vger.kernel.org, Joerg Roedel , dianders@chromium.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, hoegsberg@google.com, linux-arm-kernel@lists.infradead.org, Zhen Lei , Robin Murphy , Will Deacon , Alyssa Rosenzweig , baolu.lu@linux.intel.com MIME-Version: 1.0 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 (RESEND because I fat fingered a email address and I didn't want everybody to get a bunch of SMTP errors) This series implements split pagetable support for arm-smmu-v2 devices. You have seen this code before as part of [1] but I split it apart from the other features to make it easier to review / merge. This series adds a new format type to io-pgtable-arm to enable TTBR0 and TTBR1. Because of the way that the registers are mixed up it makes the most sense to enable them together instead of trying to create two different pagetables and merge them together later in the arm-smmu drive. This will be used later by the drm/msm driver to enable split pagetables as part of the effort to implement per-context pagetables [2]. Thanks, Jordan [1] https://patchwork.freedesktop.org/series/57441/ [2] https://patchwork.freedesktop.org/patch/307616/?series=57441&rev=3 Jordan Crouse (3): iommu: Add DOMAIN_ATTR_SPLIT_TABLES iommu/io-pgtable-arm: Add support for AARCH64 split pagetables iommu/arm-smmu: Add support for DOMAIN_ATTR_SPLIT_TABLES drivers/iommu/arm-smmu.c | 16 ++- drivers/iommu/io-pgtable-arm.c | 261 +++++++++++++++++++++++++++++++++++++---- drivers/iommu/io-pgtable.c | 1 + include/linux/io-pgtable.h | 2 + include/linux/iommu.h | 1 + 5 files changed, 256 insertions(+), 25 deletions(-)