All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Isaac J. Manjarres" <isaacm@codeaurora.org>
To: iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, freedreno@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org
Cc: "Isaac J. Manjarres" <isaacm@codeaurora.org>,
	will@kernel.org, joro@8bytes.org, pdaly@codeaurora.org,
	pratikp@codeaurora.org, kernel-team@android.com,
	robin.murphy@arm.com
Subject: [RFC PATCH v2 0/7] iommu: Permit modular builds of io-pgtable drivers
Date: Mon, 21 Dec 2020 16:44:29 -0800	[thread overview]
Message-ID: <1608597876-32367-1-git-send-email-isaacm@codeaurora.org> (raw)

The goal of the Generic Kernel Image (GKI) effort is to have a common
kernel image that works across multiple Android devices. This involves
generating a kernel image that has core features integrated into it,
while SoC specific functionality can be added to the kernel for the
device as a module.

Along with modularizing IOMMU drivers, this also means building the
io-pgtable code as modules, which allows for SoC vendors to only include
the io-pgtable implementations that they use. For example, GKI for arm64
must include support for both the IOMMU ARM LPAE/V7S formats at the
moment. Having the code for both formats as modules allows SoC vendors
to only provide the page table format that they use, along with their
IOMMU driver.

Main changes since v1:

1) Retain io-pgtable.c as part of the core kernel

The patches are split into 4 parts:

1) Modularizing io-pgtable-arm[-v7s].c, while leaving the io-pgtable.c
code as part of the core kernel, requires removing the references to
the ARM LPAE and ARM V7S io-pgtable init functions, and using a
dynamic method for formats to register their io-pgtable init functions.

The reason for defining an io_pgtable_init_fns_node structure is to
not have the data structures used to store the init functions seep into
the io-pgtable fmt drivers. Doing so allows for changing the internal
data structure used to keep track of the init functions, without impacting
the client data structures.

2) Taking references to the io-pgtable format drivers to ensure that they
cannot be unloaded while in use.

3) Adding pre MODULE_SOFTDEP() dependencies to drivers in the kernel
that are tristate, and invoke [alloc/free]_io_pgtable_ops(). This makes
it so that the io-pgtable format drivers are loaded before the driver
that needs them.

4) Changing the Kconfig options for the ARM LPAE nad ARM V7S to tristate.

Thanks in advance for the feedback,

Isaac J. Manjarres

Isaac J. Manjarres (7):
  iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration
  iommu/io-pgtable: Add refcounting for io-pgtable format modules
  iommu/arm-smmu: Add dependency on io-pgtable format modules
  iommu/arm-smmu-v3: Add dependency on io-pgtable-arm format module
  drm/msm: Add dependency on io-pgtable-arm format module
  drm/panfrost: Add dependency on io-pgtable-arm format module
  iommu/io-pgtable-arm: Allow building modular io-pgtable fmts

 drivers/gpu/drm/msm/msm_drv.c               |   1 +
 drivers/gpu/drm/panfrost/panfrost_drv.c     |   1 +
 drivers/iommu/Kconfig                       |   4 +-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   1 +
 drivers/iommu/arm/arm-smmu/arm-smmu.c       |   1 +
 drivers/iommu/io-pgtable-arm-v7s.c          |  37 +++++++++-
 drivers/iommu/io-pgtable-arm.c              |  97 +++++++++++++++++++-------
 drivers/iommu/io-pgtable.c                  | 104 +++++++++++++++++++++++-----
 include/linux/io-pgtable.h                  |  53 +++++++++-----
 9 files changed, 236 insertions(+), 63 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


WARNING: multiple messages have this Message-ID (diff)
From: "Isaac J. Manjarres" <isaacm@codeaurora.org>
To: iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, freedreno@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org
Cc: "Isaac J. Manjarres" <isaacm@codeaurora.org>,
	will@kernel.org, pdaly@codeaurora.org, kernel-team@android.com,
	robin.murphy@arm.com, pratikp@codeaurora.org
Subject: [RFC PATCH v2 0/7] iommu: Permit modular builds of io-pgtable drivers
Date: Mon, 21 Dec 2020 16:44:29 -0800	[thread overview]
Message-ID: <1608597876-32367-1-git-send-email-isaacm@codeaurora.org> (raw)

The goal of the Generic Kernel Image (GKI) effort is to have a common
kernel image that works across multiple Android devices. This involves
generating a kernel image that has core features integrated into it,
while SoC specific functionality can be added to the kernel for the
device as a module.

Along with modularizing IOMMU drivers, this also means building the
io-pgtable code as modules, which allows for SoC vendors to only include
the io-pgtable implementations that they use. For example, GKI for arm64
must include support for both the IOMMU ARM LPAE/V7S formats at the
moment. Having the code for both formats as modules allows SoC vendors
to only provide the page table format that they use, along with their
IOMMU driver.

Main changes since v1:

1) Retain io-pgtable.c as part of the core kernel

The patches are split into 4 parts:

1) Modularizing io-pgtable-arm[-v7s].c, while leaving the io-pgtable.c
code as part of the core kernel, requires removing the references to
the ARM LPAE and ARM V7S io-pgtable init functions, and using a
dynamic method for formats to register their io-pgtable init functions.

The reason for defining an io_pgtable_init_fns_node structure is to
not have the data structures used to store the init functions seep into
the io-pgtable fmt drivers. Doing so allows for changing the internal
data structure used to keep track of the init functions, without impacting
the client data structures.

2) Taking references to the io-pgtable format drivers to ensure that they
cannot be unloaded while in use.

3) Adding pre MODULE_SOFTDEP() dependencies to drivers in the kernel
that are tristate, and invoke [alloc/free]_io_pgtable_ops(). This makes
it so that the io-pgtable format drivers are loaded before the driver
that needs them.

4) Changing the Kconfig options for the ARM LPAE nad ARM V7S to tristate.

Thanks in advance for the feedback,

Isaac J. Manjarres

Isaac J. Manjarres (7):
  iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration
  iommu/io-pgtable: Add refcounting for io-pgtable format modules
  iommu/arm-smmu: Add dependency on io-pgtable format modules
  iommu/arm-smmu-v3: Add dependency on io-pgtable-arm format module
  drm/msm: Add dependency on io-pgtable-arm format module
  drm/panfrost: Add dependency on io-pgtable-arm format module
  iommu/io-pgtable-arm: Allow building modular io-pgtable fmts

 drivers/gpu/drm/msm/msm_drv.c               |   1 +
 drivers/gpu/drm/panfrost/panfrost_drv.c     |   1 +
 drivers/iommu/Kconfig                       |   4 +-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   1 +
 drivers/iommu/arm/arm-smmu/arm-smmu.c       |   1 +
 drivers/iommu/io-pgtable-arm-v7s.c          |  37 +++++++++-
 drivers/iommu/io-pgtable-arm.c              |  97 +++++++++++++++++++-------
 drivers/iommu/io-pgtable.c                  | 104 +++++++++++++++++++++++-----
 include/linux/io-pgtable.h                  |  53 +++++++++-----
 9 files changed, 236 insertions(+), 63 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: "Isaac J. Manjarres" <isaacm@codeaurora.org>
To: iommu@lists.linux-foundation.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, freedreno@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org
Cc: "Isaac J. Manjarres" <isaacm@codeaurora.org>,
	will@kernel.org, pdaly@codeaurora.org, kernel-team@android.com,
	joro@8bytes.org, robin.murphy@arm.com, pratikp@codeaurora.org
Subject: [RFC PATCH v2 0/7] iommu: Permit modular builds of io-pgtable drivers
Date: Mon, 21 Dec 2020 16:44:29 -0800	[thread overview]
Message-ID: <1608597876-32367-1-git-send-email-isaacm@codeaurora.org> (raw)

The goal of the Generic Kernel Image (GKI) effort is to have a common
kernel image that works across multiple Android devices. This involves
generating a kernel image that has core features integrated into it,
while SoC specific functionality can be added to the kernel for the
device as a module.

Along with modularizing IOMMU drivers, this also means building the
io-pgtable code as modules, which allows for SoC vendors to only include
the io-pgtable implementations that they use. For example, GKI for arm64
must include support for both the IOMMU ARM LPAE/V7S formats at the
moment. Having the code for both formats as modules allows SoC vendors
to only provide the page table format that they use, along with their
IOMMU driver.

Main changes since v1:

1) Retain io-pgtable.c as part of the core kernel

The patches are split into 4 parts:

1) Modularizing io-pgtable-arm[-v7s].c, while leaving the io-pgtable.c
code as part of the core kernel, requires removing the references to
the ARM LPAE and ARM V7S io-pgtable init functions, and using a
dynamic method for formats to register their io-pgtable init functions.

The reason for defining an io_pgtable_init_fns_node structure is to
not have the data structures used to store the init functions seep into
the io-pgtable fmt drivers. Doing so allows for changing the internal
data structure used to keep track of the init functions, without impacting
the client data structures.

2) Taking references to the io-pgtable format drivers to ensure that they
cannot be unloaded while in use.

3) Adding pre MODULE_SOFTDEP() dependencies to drivers in the kernel
that are tristate, and invoke [alloc/free]_io_pgtable_ops(). This makes
it so that the io-pgtable format drivers are loaded before the driver
that needs them.

4) Changing the Kconfig options for the ARM LPAE nad ARM V7S to tristate.

Thanks in advance for the feedback,

Isaac J. Manjarres

Isaac J. Manjarres (7):
  iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration
  iommu/io-pgtable: Add refcounting for io-pgtable format modules
  iommu/arm-smmu: Add dependency on io-pgtable format modules
  iommu/arm-smmu-v3: Add dependency on io-pgtable-arm format module
  drm/msm: Add dependency on io-pgtable-arm format module
  drm/panfrost: Add dependency on io-pgtable-arm format module
  iommu/io-pgtable-arm: Allow building modular io-pgtable fmts

 drivers/gpu/drm/msm/msm_drv.c               |   1 +
 drivers/gpu/drm/panfrost/panfrost_drv.c     |   1 +
 drivers/iommu/Kconfig                       |   4 +-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |   1 +
 drivers/iommu/arm/arm-smmu/arm-smmu.c       |   1 +
 drivers/iommu/io-pgtable-arm-v7s.c          |  37 +++++++++-
 drivers/iommu/io-pgtable-arm.c              |  97 +++++++++++++++++++-------
 drivers/iommu/io-pgtable.c                  | 104 +++++++++++++++++++++++-----
 include/linux/io-pgtable.h                  |  53 +++++++++-----
 9 files changed, 236 insertions(+), 63 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2020-12-22  0:46 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  0:44 Isaac J. Manjarres [this message]
2020-12-22  0:44 ` [RFC PATCH v2 0/7] iommu: Permit modular builds of io-pgtable drivers Isaac J. Manjarres
2020-12-22  0:44 ` Isaac J. Manjarres
2020-12-22  0:44 ` [PATCH v2 1/7] iommu/io-pgtable: Introduce dynamic io-pgtable fmt registration Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22 19:27   ` Robin Murphy
2020-12-22 19:27     ` Robin Murphy
2020-12-22 19:27     ` Robin Murphy
2020-12-22 19:27     ` Robin Murphy
2020-12-22 19:54     ` isaacm
2020-12-22 19:54       ` isaacm
2020-12-22 19:54       ` isaacm
2020-12-23 13:44       ` Robin Murphy
2020-12-23 13:44         ` Robin Murphy
2020-12-23 13:44         ` Robin Murphy
2020-12-23 13:44         ` Robin Murphy
2020-12-23 15:14         ` isaacm
2020-12-23 15:14           ` isaacm
2020-12-23 15:14           ` isaacm
2020-12-23 15:38   ` Georgi Djakov
2020-12-23 15:38     ` Georgi Djakov
2020-12-23 15:38     ` Georgi Djakov
2020-12-23 15:38     ` Georgi Djakov
2020-12-23 19:17   ` kernel test robot
2020-12-23 19:17     ` kernel test robot
2020-12-23 19:17     ` kernel test robot
2020-12-23 19:17     ` kernel test robot
2020-12-23 19:17     ` kernel test robot
2020-12-22  0:44 ` [PATCH v2 2/7] iommu/io-pgtable: Add refcounting for io-pgtable format modules Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44 ` [PATCH v2 3/7] iommu/arm-smmu: Add dependency on " Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22 19:27   ` Robin Murphy
2020-12-22 19:27     ` Robin Murphy
2020-12-22 19:27     ` Robin Murphy
2020-12-22 19:27     ` Robin Murphy
2020-12-22 19:49     ` isaacm
2020-12-22 19:49       ` isaacm
2020-12-22 19:49       ` isaacm
2020-12-23 13:05       ` Robin Murphy
2020-12-23 13:05         ` Robin Murphy
2020-12-23 13:05         ` Robin Murphy
2020-12-23 13:05         ` Robin Murphy
2020-12-23 15:10         ` isaacm
2020-12-23 15:10           ` isaacm
2020-12-23 15:10           ` isaacm
2020-12-22  0:44 ` [PATCH v2 4/7] iommu/arm-smmu-v3: Add dependency on io-pgtable-arm format module Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44 ` [PATCH v2 5/7] drm/msm: " Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2021-01-18 21:16   ` Rob Clark
2021-01-18 21:16     ` Rob Clark
2021-01-18 21:16     ` Rob Clark
2021-01-18 21:16     ` Rob Clark
2021-01-18 21:39     ` Will Deacon
2021-01-18 21:39       ` Will Deacon
2021-01-18 21:39       ` Will Deacon
2021-01-18 21:39       ` Will Deacon
2021-01-19 17:19       ` Rob Clark
2021-01-19 17:19         ` Rob Clark
2021-01-19 17:19         ` Rob Clark
2021-01-19 17:19         ` Rob Clark
2020-12-22  0:44 ` [PATCH v2 6/7] drm/panfrost: " Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44 ` [PATCH v2 7/7] iommu/io-pgtable-arm: Allow building modular io-pgtable fmts Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres
2020-12-22  0:44   ` Isaac J. Manjarres

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=1608597876-32367-1-git-send-email-isaacm@codeaurora.org \
    --to=isaacm@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pdaly@codeaurora.org \
    --cc=pratikp@codeaurora.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.