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=-9.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,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 2950CC433ED for ; Wed, 12 May 2021 09:53:07 +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 8595F613C1 for ; Wed, 12 May 2021 09:53:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8595F613C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lcFjvP5GueNOyJcuC0nIOj9v4XYGxPeHQQ0ZTfUljAg=; b=WC4WwzWPUGLhTW4r4CLykm+bV 4UigYL9diJqz7+50jzIrJVMvlEEX1fnaXWjSdPSO1tOumiksxSZeXR8H2BqTeWabAEh7LhuCZm7Z0 PhxHC5c0CcnBhcVW0lY7FsrmAw0NbNhRIKaOW/KkQ+GG2yHYSO8HDL5OOsSMRxuQkQYkkF18EPiIj aRBur69oyxAfWdNLQBeN0wBblB0LuzqbfyrtizDpaetC8gHdaifgOfOwAndlxM15VGXVLEdgHio0D T3WuVgkuKUs/ijJMs6zkbuFfZiWP9Dl9pTJWB8OKBDKEa7RuBGVImyD8hNNdJCQFkk1wDl5lxgUDg Ok02I2veA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lglWN-002TMW-Id; Wed, 12 May 2021 09:51:15 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lglWJ-002TMH-ID for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 09:51:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-ID:References:In-Reply-To: Subject:Cc:To:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version: Sender:Reply-To:Content-ID:Content-Description; bh=74i/7x+tn0BKW3vkrf767xOpA6OE8txJgvAe4JvvRbs=; b=45deFBTl3pYaRpRmZn9tXuvH5X 28pofA+kgGC6vwRC7ybthRdTxZ7uj+8fZclq4vHZA+VMD+4C8gHqcLF8dw2EFnwPdlfVAh+hfK0Pj 1wyvN65lQG+moSJ2j8cMzZ6vtB/7KNz5qgi6XpEgF2v1IYubADaeosmd8jf5TCkkjHotGZRNNmJDd t3OoCoKwnt8gtyTVNuvdRIKjBFmjm2nrKEBkKHJ0LzSw6BYI5qJGnEwES/xi9VJ4bnXKuMNYsprfJ EpBBV232bSIhr0lf/hjqTaswc7K/FolIVc2NZadJg6FTuVlSJ+roYHgKmYjeq7Z8oi9EEp4IUy+Ng eWNFY4LA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lglWG-00AGTF-VX for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 09:51:10 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2A31613C4; Wed, 12 May 2021 09:51:06 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1lglWC-000rmN-5N; Wed, 12 May 2021 10:51:04 +0100 MIME-Version: 1.0 Date: Wed, 12 May 2021 10:51:04 +0100 From: Marc Zyngier To: Mark Rutland Cc: Ard Biesheuvel , Fuad Tabba , Linux ARM , Will Deacon , Catalin Marinas , James Morse , Alexandru Elisei , Suzuki K Poulose Subject: Re: [PATCH v1 13/13] arm64: Rename arm64-internal cache maintenance functions In-Reply-To: <20210511154933.GF8933@C02TD0UTHF1T.local> References: <20210511144252.3779113-1-tabba@google.com> <20210511144252.3779113-14-tabba@google.com> <20210511154933.GF8933@C02TD0UTHF1T.local> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, ardb@kernel.org, tabba@google.com, linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_025109_133973_1F51F70B X-CRM114-Status: GOOD ( 23.85 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-05-11 16:49, Mark Rutland wrote: > On Tue, May 11, 2021 at 05:09:18PM +0200, Ard Biesheuvel wrote: >> On Tue, 11 May 2021 at 16:43, Fuad Tabba wrote: >> > >> > Although naming across the codebase isn't that consistent, it >> > tends to follow certain patterns. Moreover, the term "flush" >> > isn't defined in the Arm Architecture reference manual, and might >> > be interpreted to mean clean, invalidate, or both for a cache. >> > >> > Rename arm64-internal functions to make the naming internally >> > consistent, as well as making it consistent with the Arm ARM, by >> > clarifying whether the operation is a clean, invalidate, or both. >> > Also specify which point the operation applies two, i.e., to the >> > point of unification (PoU), coherence (PoC), or persistence >> > (PoP). >> > >> > This commit applies the following sed transformation to all files >> > under arch/arm64: >> > >> > "s/\b__flush_cache_range\b/__clean_inval_cache_pou_macro/g;"\ >> > "s/\b__flush_icache_range\b/__clean_inval_cache_pou/g;"\ > > For icaches, a "flush" is just an invalidate, so this doesn't need > "clean". > >> > "s/\binvalidate_icache_range\b/__inval_icache_pou/g;"\ >> > "s/\b__flush_dcache_area\b/__clean_inval_dcache_poc/g;"\ >> > "s/\b__inval_dcache_area\b/__inval_dcache_poc/g;"\ >> > "s/__clean_dcache_area_poc\b/__clean_dcache_poc/g;"\ >> > "s/\b__clean_dcache_area_pop\b/__clean_dcache_pop/g;"\ >> > "s/\b__clean_dcache_area_pou\b/__clean_dcache_pou/g;"\ >> > "s/\b__flush_cache_user_range\b/__clean_inval_cache_user_pou/g;"\ >> > "s/\b__flush_icache_all\b/__clean_inval_all_icache_pou/g;" > > Likewise here. > >> > >> > Note that __clean_dcache_area_poc is deliberately missing a word >> > boundary check to match the efistub symbols in image-vars.h. >> > >> > No functional change intended. >> > >> > Signed-off-by: Fuad Tabba >> >> I am a big fan of this change: code is so much easier to read if the >> names of subroutines match their intent. > > Likewise! > >> I would suggest, though, that we get rid of all the leading >> underscores while at it: we often use them when refactoring existing >> routines into separate pieces (which is where at least some of these >> came from), but here, they seem to have little value. > > That all makes sense to me; I'd also suggest we make the cache type the > prefix, e.g. > > * icache_clean_pou I guess you meant "icache_inval_pou", right, as per your comment above? Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel