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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 7C05DC433ED for ; Wed, 12 May 2021 10:02:12 +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 C5D2E613AF for ; Wed, 12 May 2021 10:02:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5D2E613AF 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=1HOHAKTD7yt0Xz06GpMZ3e5g1+BpRAqbgp92rciOnBo=; b=Eq4orTKsSJ2L25tLL7NSi0RkP NiDX1afGpBN9IeMYJXC/aKZsRDhOI9HaJlbd+PiF08O5dV67kEJm5Ifuf0BPSv/k8AazKCUOEo6KK N+R4IylXgCcEhMBOSXlTr95xmzJebtDGeTRiiq44RSWB25P8BQhdtu9d8+/NI37nVerg1hVc42vba 0Ner+JxGMhg45uAz6t0b+zME9VDY+Sk6r0NlwlPujhtmEpW8TRnfJfQUe0r2jMEqcYD9CzTXY+fA8 l2vqHl5nNpPXx+MUW93VEL1fKPDdoTuWhzCSVZ8kj3BTPczs0optzmXoovhBITz3b/Th3J5w4BwgS uRm4N9shA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lglfc-002U6h-1Z; Wed, 12 May 2021 10:00:48 +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 1lglfZ-002U6I-FI for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 10:00:45 +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=ZpjyJX8vshNlu0VANHYfgWddEOhVcf22A+Xy1Atz06o=; b=F3Wy9PI5+m8kkEUDLxgMKWPT0Q zdYf28vJtMYpqdCqHvuEgvgp7itu1JKxvULGcZDt42+8UnZCAq/TDNeS6ToX9Iae4k2q1YGTxWKk/ d2FqPGHvZhGJeou6nOvaKR/maBQ+Kz2jOvPC1NaiHfLM6wLmO6IvyKP3WKopzWo5UiFyWP/B962jw zPVtgrMx/CnpoPpkl/Q+WqPZ01Im6diI5QU7sgwTGxZh3ttg1XvHxlNT9ilfC/A8+XJcA2G6T3rh/ nRtvTQ/7gDHTOzGQp3ApW7c2c4dx37oDxsAl0nCwKkOMusiYEyFLNsHpVuB6172F4zuaZ0ejDThU1 HIKJ/Daw==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lglfV-00AGx8-Qw for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 10:00:44 +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 1FCBEED1; Wed, 12 May 2021 03:00:40 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.30.106]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E97A63F719; Wed, 12 May 2021 03:00:37 -0700 (PDT) Date: Wed, 12 May 2021 11:00:33 +0100 From: Mark Rutland To: Marc Zyngier 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 Message-ID: <20210512100033.GB88854@C02TD0UTHF1T.local> References: <20210511144252.3779113-1-tabba@google.com> <20210511144252.3779113-14-tabba@google.com> <20210511154933.GF8933@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_030041_987755_B709069C X-CRM114-Status: GOOD ( 25.39 ) 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 Wed, May 12, 2021 at 10:51:04AM +0100, Marc Zyngier wrote: > 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? Yes; whoops! Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel