Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4227877pxf; Tue, 23 Mar 2021 06:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXRWpoIBQ4xuyIYVF2b5hyMSJtCu5omoAjeF1yuJeP9If9tZQtDen6al8LCwm2VY1etye1 X-Received: by 2002:a17:906:1408:: with SMTP id p8mr4774831ejc.89.1616504842588; Tue, 23 Mar 2021 06:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616504842; cv=none; d=google.com; s=arc-20160816; b=0OCNza20Auwx0GA90fqXLrOpeOoeDx0XijPa1LF28MlVFi32p6A0PSSGBFSMso/ibk xr168tpO+9oYGITWiT8iTtNDzhzvLasPMmr/xNLKKDXykUW9UO9t2nXshXBWopDF3Nx6 1l/XsqpCU/Yu6/2o+maV6koefIRZcd8fermZsHw5o/4eLoF+jVAKYA2ffp6CW10ro6Xu dAjfWZglzdCK9RdonRWEef1965miOC7YwIEbmWEdmSiuX8YmuePMrnuTAbQ0Q9XO6pke Umy7eU7jzUvQ1h8jma6sYvJl+jdMZP+Ixf24g6fK+VZvSuqqyCmMq8PLvKlt03siDaAS kr6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=s7Jy/vfoO80tmseXZJIyNbTSbSaEZZWOCsSCCjEGHok=; b=Oo5KiRCs8ut5ZVTmAIwdAjfXmaBi+DHy8eQZKVotFGqmgeLQYlWY474Pb2amMSSkHl OsMR22pRBz9HNehDN8y5yQk7+mDht7PNPKnO7kd5ojS/JmC8xgodwZeWhvQDYbLaGepg MNIQmIcTJOc0w/mUYYimGts486lANes1YfR88oUOEdbeD+kW1bsa0qN+yEgVDutIIo3B d2g6gQCX6nCbHdzIdPVDuewCvldNxU834Npw7S0WBJMe2Z0TCEPMDztBD5F+3ops/4GH nUx/hyQSndIofOa71GHQnysOKxKr8XxXh0lnolPddsCLZ08b8wwC3zz/VC8Amb5os32U hyOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si13340090eju.424.2021.03.23.06.06.49; Tue, 23 Mar 2021 06:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231390AbhCWNFZ (ORCPT + 99 others); Tue, 23 Mar 2021 09:05:25 -0400 Received: from foss.arm.com ([217.140.110.172]:46078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231211AbhCWNFI (ORCPT ); Tue, 23 Mar 2021 09:05:08 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ABBD6106F; Tue, 23 Mar 2021 06:05:07 -0700 (PDT) Received: from [10.57.50.37] (unknown [10.57.50.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 721A03F719; Tue, 23 Mar 2021 06:05:06 -0700 (PDT) Subject: Re: [PATCH 3/3] iova: Correct comment for free_cpu_cached_iovas() To: John Garry , 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 References: <1614600741-15696-1-git-send-email-john.garry@huawei.com> <1614600741-15696-4-git-send-email-john.garry@huawei.com> From: Robin Murphy Message-ID: <87b4af01-2352-e963-824f-1cea1a6ee718@arm.com> Date: Tue, 23 Mar 2021 13:05:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1614600741-15696-4-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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..." 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? Robin. > Signed-off-by: John Garry > --- > 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) > { >