Linux IOMMU Development
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Robin Murphy <robin.murphy@arm.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	"kbuild@lists.01.org" <kbuild@lists.01.org>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"will@kernel.org" <will@kernel.org>,
	"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>
Cc: "kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"lkp@intel.com" <lkp@intel.com>,
	"airlied@linux.ie" <airlied@linux.ie>,
	Linuxarm <linuxarm@huawei.com>,
	"jonathanh@nvidia.com" <jonathanh@nvidia.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>
Subject: Re: [PATCH v4 6/6] dma-iommu: Pass iova len for IOVA domain init
Date: Mon, 19 Jul 2021 11:45:28 +0100	[thread overview]
Message-ID: <e6ebd533-e5a1-bb17-4e6b-71ad9df0a10a@huawei.com> (raw)
In-Reply-To: <157833d9-e074-125d-1a7c-f9ef4c05b763@arm.com>

On 19/07/2021 10:32, Robin Murphy wrote:
>>> 7c1b058c8b5a31 Robin Murphy          2017-03-16  393      if (!dev)
>>>                                                              ^^^^
>>> Old code has checks for NULL
>>>
>>
>> I doubt that in practice we need this check.
>>
>> Function iommu_dma_init_domain() is only called by 
>> iommu_setup_dma_ops(). Furthermore, iommu_setup_dma_ops() calls 
>> iommu_get_domain_for_dev(dev), which cannot safely handle dev == NULL 
>> for when we call iommu_dma_init_domain() there. As such, the dev == 
>> NULL checks in iommu_dma_init_domain() are effectively redundant.
> 
> Indeed, I have a patch for that in the stack I'm preparing:
> 
> https://gitlab.arm.com/linux-arm/linux-rm/-/commit/9b6cf2a214107c153ee278b1664f688888d7328f

Cool, so how about please checking this series when you get a chance? 
You did suggest this approach after all..

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

      reply	other threads:[~2021-07-19 10:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 10:36 [PATCH v4 0/6] iommu: Allow IOVA rcache range be configured John Garry
2021-07-14 10:36 ` [PATCH v4 1/6] iommu: Refactor iommu_group_store_type() John Garry
2021-08-02 14:46   ` Will Deacon
2021-07-14 10:36 ` [PATCH v4 2/6] iova: Allow rcache range upper limit to be flexible John Garry
2021-08-02 15:01   ` Will Deacon
2021-08-02 15:23     ` John Garry
2021-08-02 16:09       ` Robin Murphy
2021-07-14 10:36 ` [PATCH v4 3/6] iommu: Allow iommu_change_dev_def_domain() realloc default domain for same type John Garry
2021-07-14 10:36 ` [PATCH v4 4/6] iommu: Allow max opt DMA len be set for a group via sysfs John Garry
2021-07-14 10:36 ` [PATCH v4 5/6] iova: Add iova_len argument to init_iova_domain() John Garry
2021-08-02 15:06   ` Will Deacon
2021-08-02 16:06     ` John Garry
2021-08-02 16:16       ` Robin Murphy
2021-08-02 16:40         ` John Garry
2021-08-02 17:18           ` John Garry
2021-09-21  8:48         ` John Garry
2021-07-14 10:36 ` [PATCH v4 6/6] dma-iommu: Pass iova len for IOVA domain init John Garry
2021-07-19  7:58   ` Dan Carpenter
2021-07-19  9:12     ` John Garry
2021-07-19  9:32       ` Robin Murphy
2021-07-19 10:45         ` John Garry [this message]

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=e6ebd533-e5a1-bb17-4e6b-71ad9df0a10a@huawei.com \
    --to=john.garry@huawei.com \
    --cc=airlied@linux.ie \
    --cc=baolu.lu@linux.intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel@ffwll.ch \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linuxarm@huawei.com \
    --cc=lkp@intel.com \
    --cc=robin.murphy@arm.com \
    --cc=thierry.reding@gmail.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