linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: iommu@lists.linux-foundation.org
Cc: robin.murphy@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, Sean Paul <sean@poorly.run>,
	dri-devel@lists.freedesktop.org, Sam Ravnborg <sam@ravnborg.org>,
	Fritz Koenig <frkoenig@google.com>,
	David Airlie <airlied@linux.ie>, Joerg Roedel <joro@8bytes.org>,
	Allison Randal <allison@lohutok.net>,
	AngeloGioacchino Del Regno <kholk11@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Douglas Anderson <dianders@chromium.org>,
	Rob Clark <robdclark@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
	Wen Yang <wen.yang99@zte.com.cn>,
	Alexios Zavras <alexios.zavras@intel.com>,
	Jeykumar Sankaran <jsanka@codeaurora.org>,
	zhengbin <zhengbin13@huawei.com>,
	linux-kernel@vger.kernel.org,
	Brian Masney <masneyb@onstation.org>,
	Drew Davenport <ddavenport@chromium.org>,
	Georgi Djakov <georgi.djakov@linaro.org>,
	freedreno@lists.freedesktop.org,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH v3 0/5] iommu/arm-smmu: Split pagetable support for arm-smmu-v2
Date: Mon, 16 Dec 2019 09:37:46 -0700	[thread overview]
Message-ID: <1576514271-15687-1-git-send-email-jcrouse@codeaurora.org> (raw)

Another refresh to support split pagetables for Adreno GPUs as part of an
incremental process to enable per-context pagetables.

In order to support per-context pagetables the GPU needs to enable split tables
so that we can store global buffers in the TTBR1 space leaving the GPU free to
program the TTBR0 register with the address of a context specific pagetable.

This patchset adds split pagetable support if requested by the domain owner
via the DOMAIN_ATTR_SPLIT_TABLES attribute. If the attribute is non zero at
attach time, the implementation will set up the TTBR0 and TTBR1 spaces with
identical configurations and program the domain pagetable into the TTBR1
register. The TTBR0 register will be unused.

The driver can determine if split pagetables were programmed by querying
DOMAIN_ATTR_SPLIT_TABLES after attaching. The domain geometry will also be
updated to reflect the virtual address space for the TTBR1 range.

These patches are on based on top of linux-next-20191216 with [1], [2], and [3]
from Robin on the iommu list.

Change log:

v3: Remove the implementation specific and make split pagetable support
part of the generic configuration

[1] https://lists.linuxfoundation.org/pipermail/iommu/2019-October/039718.html
[2] https://lists.linuxfoundation.org/pipermail/iommu/2019-October/039719.html
[3] https://lists.linuxfoundation.org/pipermail/iommu/2019-October/039720.html


Jordan Crouse (5):
  iommu: Add DOMAIN_ATTR_SPLIT_TABLES
  iommu/arm-smmu: Add support for split pagetables
  drm/msm: Attach the IOMMU device during initialization
  drm/msm: Refactor address space initialization
  drm/msm/a6xx: Support split pagetables

 drivers/gpu/drm/msm/adreno/a2xx_gpu.c    | 16 ++++++++++
 drivers/gpu/drm/msm/adreno/a3xx_gpu.c    |  1 +
 drivers/gpu/drm/msm/adreno/a4xx_gpu.c    |  1 +
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c    |  1 +
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c    | 51 ++++++++++++++++++++++++++++++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.c  | 23 ++++++++++----
 drivers/gpu/drm/msm/adreno/adreno_gpu.h  |  8 +++++
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c  | 18 ++++-------
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 18 +++++------
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c |  4 ---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 18 +++++------
 drivers/gpu/drm/msm/msm_drv.h            |  8 ++---
 drivers/gpu/drm/msm/msm_gem_vma.c        | 37 +++++------------------
 drivers/gpu/drm/msm/msm_gpu.c            | 49 ++----------------------------
 drivers/gpu/drm/msm/msm_gpu.h            |  4 +--
 drivers/gpu/drm/msm/msm_gpummu.c         |  6 ----
 drivers/gpu/drm/msm/msm_iommu.c          | 18 ++++++-----
 drivers/gpu/drm/msm/msm_mmu.h            |  1 -
 drivers/iommu/arm-smmu.c                 | 40 +++++++++++++++++++++----
 drivers/iommu/arm-smmu.h                 | 45 ++++++++++++++++++++++++----
 include/linux/iommu.h                    |  1 +
 21 files changed, 215 insertions(+), 153 deletions(-)

-- 
2.7.4

             reply	other threads:[~2019-12-16 16:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16 16:37 Jordan Crouse [this message]
2019-12-16 16:37 ` [PATCH v3 1/5] iommu: Add DOMAIN_ATTR_SPLIT_TABLES Jordan Crouse
2020-01-09 14:36   ` Will Deacon
2019-12-16 16:37 ` [PATCH v3 2/5] iommu/arm-smmu: Add support for split pagetables Jordan Crouse
2020-01-09 14:33   ` Will Deacon
2020-01-09 19:25     ` Jordan Crouse
2020-01-21 14:36   ` Robin Murphy
2020-01-21 17:11     ` Jordan Crouse
2020-01-21 18:54       ` Robin Murphy
2020-01-21 14:47   ` Robin Murphy
2019-12-16 16:37 ` [PATCH v3 3/5] drm/msm: Attach the IOMMU device during initialization Jordan Crouse
2019-12-16 16:37 ` [PATCH v3 4/5] drm/msm: Refactor address space initialization Jordan Crouse
2020-01-06 21:59   ` [Freedreno] " Jordan Crouse
2019-12-16 16:37 ` [PATCH v3 5/5] drm/msm/a6xx: Support split pagetables Jordan Crouse
2019-12-16 17:43   ` Rob Clark
2019-12-24  2:57   ` smasetty
2020-01-06 21:57     ` Jordan Crouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1576514271-15687-1-git-send-email-jcrouse@codeaurora.org \
    --to=jcrouse@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=ben.dooks@codethink.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=ddavenport@chromium.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=frkoenig@google.com \
    --cc=georgi.djakov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jeffrey.l.hugo@gmail.com \
    --cc=joro@8bytes.org \
    --cc=jsanka@codeaurora.org \
    --cc=kholk11@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masneyb@onstation.org \
    --cc=robdclark@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=tglx@linutronix.de \
    --cc=wen.yang99@zte.com.cn \
    --cc=will@kernel.org \
    --cc=zhengbin13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).