public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Robin Murphy <robin.murphy@arm.com>, <dwmw2@infradead.org>,
	<baolu.lu@linux.intel.com>, <joro@8bytes.org>, <will@kernel.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH 3/3] iova: Correct comment for free_cpu_cached_iovas()
Date: Tue, 23 Mar 2021 13:56:58 +0000	[thread overview]
Message-ID: <cb4547e8-bab4-bea5-e9c2-18884e3e5e12@huawei.com> (raw)
In-Reply-To: <87b4af01-2352-e963-824f-1cea1a6ee718@arm.com>

On 23/03/2021 13:05, Robin Murphy wrote:
> On 2021-03-01 12:12, John Garry wrote:
>> Function free_cpu_cached_iovas() is not only called when a CPU is
>> hotplugged, so remove that part of the code comment.
> 
> FWIW I read it as clarifying why this is broken out into a separate 
> function vs. a monolithic "free all cached IOVAs" routine that handles 
> both the per-cpu and global caches 

> it never said "*only* used..."

It seems to be implying that.

It's only a code comment, so I don't care too much either way and can 
drop this change.

> 
> As such I'd hesitate to call it incorrect, but it's certainly arguable 
> whether it needs to be stated or not, especially once the hotplug 
> callsite is now obvious in the same file - on which note the function 
> itself also shouldn't need to be public any more, no?
> 

Right, I actually missed deleting iommu_dma_free_cpu_cached_iovas(), so 
can fix that now.

Cheers,
John

> Robin.
> 
>> Signed-off-by: John Garry <john.garry@huawei.com>
>> ---
>>   drivers/iommu/iova.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
>> index c78312560425..465b3b0eeeb0 100644
>> --- a/drivers/iommu/iova.c
>> +++ b/drivers/iommu/iova.c
>> @@ -996,7 +996,7 @@ static void free_iova_rcaches(struct iova_domain 
>> *iovad)
>>   }
>>   /*
>> - * free all the IOVA ranges cached by a cpu (used when cpu is unplugged)
>> + * free all the IOVA ranges cached by a cpu
>>    */
>>   void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad)
>>   {
>>
> .

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

  reply	other threads:[~2021-03-23 13:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 12:12 [PATCH 0/3] iommu/iova: Add CPU hotplug handler to flush rcaches to core code John Garry
2021-03-01 12:12 ` [PATCH 1/3] iova: Add CPU hotplug handler to flush rcaches John Garry
2021-03-23 12:45   ` Robin Murphy
2021-03-01 12:12 ` [PATCH 2/3] iommu/vt-d: Remove IOVA domain rcache flushing for CPU offlining John Garry
2021-03-23  1:57   ` Lu Baolu
2021-03-01 12:12 ` [PATCH 3/3] iova: Correct comment for free_cpu_cached_iovas() John Garry
2021-03-23 13:05   ` Robin Murphy
2021-03-23 13:56     ` John Garry [this message]
2021-03-22 17:55 ` [PATCH 0/3] iommu/iova: Add CPU hotplug handler to flush rcaches to core code John Garry
2021-04-07  8:04 ` Joerg Roedel
2021-04-07  8:08   ` John Garry

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=cb4547e8-bab4-bea5-e9c2-18884e3e5e12@huawei.com \
    --to=john.garry@huawei.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --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