iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: David Woodhouse <dwmw2@infradead.org>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Will Deacon <will@kernel.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v3 00/10] Consolidate the probe_device path
Date: Mon, 19 Jun 2023 16:03:52 -0300	[thread overview]
Message-ID: <ZJCmmOfR7Cl+OtOc@nvidia.com> (raw)
In-Reply-To: <0-v3-328044aa278c+45e49-iommu_probe_jgg@nvidia.com>

On Mon, Jun 05, 2023 at 09:59:38PM -0300, Jason Gunthorpe wrote:
> Now that the domain allocation path is less duplicated we can tackle the
> probe_device path. Details of this are spread across several functions,
> broadly move most of the code into __iommu_probe_device() and organize it
> more strictly in terms of paired do/undo functions.
> 
> Make the locking simpler by obtaining the group->mutex fewer times and
> avoiding adding a half-initialized device to an initialized
> group. Previously we would lock/unlock the group three times on these
> paths.
> 
> This locking change is the primary point of the series, creating the
> paired do/undo functions is a path to being able to organize the setup
> code under a single lock and still have a logical, not duplicated, error
> unwind.
> 
> The reorganizing is done with the idea that a following series will
> consolidate all of the different places calling arm_iommu_create_mapping()
> and iommu_setup_dma_ops() into the new consolidated probe path and get rid
> of probe_finalize.
> 
> This is on github: https://github.com/jgunthorpe/linux/commits/iommu_probe
> 
> v3:
>  - Rebase to Joerg's tree with both iommu_group_add/remove patchsets and
>    the iommu_err_unwind series
>  - Remove redundant lockdep_assert_held()
>  - No functional change from v2
> v2: https://lore.kernel.org/r/0-v2-3c3bb7aa6e48+1916b-iommu_probe_jgg@nvidia.com
>  - Rebase to v6.4-rc2
>  - Move the POWER cleanup to an independent -rc fix due to the iommu driver
>    being merged
>  - Update commit messages
>  - Rename iommu_init_driver() to iommu_init_device()
>  - Simplify __iommu_group_remove_device()
> v1: https://lore.kernel.org/r/0-v1-8aecc628b904+2f42-iommu_probe_jgg@nvidia.com
> 
> Cc: Nicolin Chen <nicolinc@nvidia.com>
> Cc: Lu Baolu <baolu.lu@linux.intel.com>
> Cc: Kevin Tian <kevin.tian@intel.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> 
> Jason Gunthorpe (10):
>   iommu: Have __iommu_probe_device() check for already probed devices
>   iommu: Use iommu_group_ref_get/put() for dev->iommu_group
>   iommu: Inline iommu_group_get_for_dev() into __iommu_probe_device()
>   iommu: Simplify the __iommu_group_remove_device() flow
>   iommu: Add iommu_init/deinit_device() paired functions
>   iommu: Move the iommu driver sysfs setup into
>     iommu_init/deinit_device()
>   iommu: Do not export iommu_device_link/unlink()
>   iommu: Always destroy the iommu_group during iommu_release_device()
>   iommu: Split iommu_group_add_device()
>   iommu: Avoid locking/unlocking for iommu_probe_device()

Joerg? I think we are good on this one now, it has been quite for two weeks

Thanks,
Jason

  parent reply	other threads:[~2023-06-19 19:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06  0:59 [PATCH v3 00/10] Consolidate the probe_device path Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 01/10] iommu: Have __iommu_probe_device() check for already probed devices Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 02/10] iommu: Use iommu_group_ref_get/put() for dev->iommu_group Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 03/10] iommu: Inline iommu_group_get_for_dev() into __iommu_probe_device() Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 04/10] iommu: Simplify the __iommu_group_remove_device() flow Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 05/10] iommu: Add iommu_init/deinit_device() paired functions Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 06/10] iommu: Move the iommu driver sysfs setup into iommu_init/deinit_device() Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 07/10] iommu: Do not export iommu_device_link/unlink() Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 08/10] iommu: Always destroy the iommu_group during iommu_release_device() Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 09/10] iommu: Split iommu_group_add_device() Jason Gunthorpe
2023-06-06  0:59 ` [PATCH v3 10/10] iommu: Avoid locking/unlocking for iommu_probe_device() Jason Gunthorpe
2023-06-19 19:03 ` Jason Gunthorpe [this message]
2023-07-14 14:14   ` [PATCH v3 00/10] Consolidate the probe_device path Joerg Roedel

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=ZJCmmOfR7Cl+OtOc@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.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 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).