From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77F21C433B4 for ; Thu, 20 May 2021 16:50:19 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0478360FE7 for ; Thu, 20 May 2021 16:50:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0478360FE7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DL5XjURNnir2Gu8JY1ibPSR+vFI9mIt6HL1mrFT9rVs=; b=a31zuDVFH3DqnMiCK40FcOUerP ykUdbdyxZZA3it13R+fPhQtBVPvozCKINSonzMuJZz4M541P3y/ENPko4ay5DMfBdFFJq7mPxPxyq z02Tlj21MhlRSVLsNT/IMK9dzhvbwwzsriy3/PIZewxq3Me3Qm8CQJ1GJXJx9QDjJK6fWPiRbwUt2 TnkCCNKP9FZtsml9fh855SkfBwDScMfz+U4hGG1TfETFsTxUS3tE9hKC1IQKPHwYJsVHRW7j1DZFe bMldfPyW0vnvN+/39G8qVhxtE7f1J4XKZvF8OcZX5p3KVowwmuV1rXYUlV/Ehr0275/nTpxRogo3K QYUeovvw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljlqd-00204J-81; Thu, 20 May 2021 16:48:35 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljlqY-00203u-Co for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 16:48:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0wma64IzVEqbba10y9OfyC7bz5WieTxGBDs1QWoTWew=; b=EhlH+N9uvL2YlPHWLp+62LiWmy 3U9O35Y0YKMguQ/jg4+PNgkpLAuFycPguIbvNhIN+VTLwqvdvbf2m0zEsfFG2QK2P5ITydCAmEsnI 5sQ6XUgQ9Xmti8+lpZJrwhhFnTvt2R8y1k3tt/s7NV85IEhQx2VcvyO4ek1ZduPjqOCKfFXM1KH2s /22lihPmIpFoKV93pRQzoYIdnx76SneFXABkTRbWg7rGoCx/mHV0ZFY5nnc+/a23mzAelZKorc58x xbYRTEb2gVesarfm3IRggEYb+SqRbe/6ebhgSiYcY80hcUk5FoK+ypzwN2BTIVkRd1zWir/MBbv8a F/R7VvSQ==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljlqV-00GWGL-HL for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 16:48:29 +0000 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 31E20101E; Thu, 20 May 2021 09:48:25 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.7.235]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7687F3F719; Thu, 20 May 2021 09:48:23 -0700 (PDT) Date: Thu, 20 May 2021 17:48:21 +0100 From: Mark Rutland To: Fuad Tabba Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com, maz@kernel.org, ardb@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, robin.murphy@arm.com Subject: Re: [PATCH v3 17/18] arm64: Fix cache maintenance function comments Message-ID: <20210520164821.GV17233@C02TD0UTHF1T.local> References: <20210520124406.2731873-1-tabba@google.com> <20210520124406.2731873-18-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210520124406.2731873-18-tabba@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_094827_691718_476300FE X-CRM114-Status: GOOD ( 19.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 20, 2021 at 01:44:05PM +0100, Fuad Tabba wrote: > Fix and expand comments for the cache maintenance functions in > cacheflush.h. Adds comments to functions that weren't described > before. Explains what the functions do using Arm Architecture > Reference Manual terminology. > > No functional change intended. > > Signed-off-by: Fuad Tabba > --- > arch/arm64/include/asm/cacheflush.h | 43 +++++++++++++++++++---------- > 1 file changed, 28 insertions(+), 15 deletions(-) > > diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h > index 70b389a8dea5..4b91d3530013 100644 > --- a/arch/arm64/include/asm/cacheflush.h > +++ b/arch/arm64/include/asm/cacheflush.h > @@ -30,31 +30,44 @@ > * the implementation assumes non-aliasing VIPT D-cache and (aliasing) > * VIPT I-cache. > * > - * flush_icache_range(start, end) > - * > - * Ensure coherency between the I-cache and the D-cache in the > - * region described by start, end. > + * All functions below apply to the region described by [start, end) > * - start - virtual start address > * - end - virtual end address Could we please say: | * All functions below apply to the interval [start, end) | * - start - virtual start address (inclusive) | * - end - virtual end address (exclusive) The "interval" wording makes it slightly clearer that we're using interval notation for '[' and ')', and being explicit when describing start/end makes that clear for those not familiar with interval notation. > * > - * invalidate_icache_range(start, end) > + * __flush_icache_range(start, end) > * > - * Invalidate the I-cache in the region described by start, end. > - * - start - virtual start address > - * - end - virtual end address > + * Ensure coherency between the I-cache and the D-cache region to > + * the Point of Unification. > * > * __flush_cache_user_range(start, end) > * > - * Ensure coherency between the I-cache and the D-cache in the > - * region described by start, end. > - * - start - virtual start address > - * - end - virtual end address > + * Ensure coherency between the I-cache and the D-cache region to > + * the Point of Unification. > + * Use only if the region might access user memory. > + * > + * invalidate_icache_range(start, end) > + * > + * Invalidate I-cache region to the Point of Unification. > * > * __flush_dcache_area(start, end) > * > - * Ensure that the data held in page is written back. > - * - start - virtual start address > - * - end - virtual end address > + * Clean and invalidate D-cache region to the Point of Coherence. For better or worse, the architecture calls this "Point of Coherency" rather than "Point of Coherence", so we should fix this to match, along with the two instances below. With those nits addressed: Acked-by: Mark Rutland Mark. > + * > + * __inval_dcache_area(start, end) > + * > + * Invalidate D-cache region to the Point of Coherence. > + * > + * __clean_dcache_area_poc(start, end) > + * > + * Clean D-cache region to the Point of Coherence. > + * > + * __clean_dcache_area_pop(start, end) > + * > + * Clean D-cache region to the Point of Persistence. > + * > + * __clean_dcache_area_pou(start, end) > + * > + * Clean D-cache region to the Point of Unification. > */ > extern void __flush_icache_range(unsigned long start, unsigned long end); > extern void invalidate_icache_range(unsigned long start, unsigned long end); > -- > 2.31.1.751.gd2f1c929bd-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel