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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 EA35EC2B9F7 for ; Tue, 25 May 2021 00:14:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A7DD6613F5 for ; Tue, 25 May 2021 00:14:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7DD6613F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=IvefBwCXUxUoi8JQAzXZEkW2mU3xMhWTSOd+m/txpKw=; b=g6q4gIKG/PFSYsnxBww9i00cFN Q16D5aNnSlZ6F0KBgOAvShrf7jdkA+JTIrTaPXVNHM8v0CXs91glr0qkcUu0agB57OWxSaFRJLEMX KbhjP115Upg4K0nHCxJ776bjYfptQJOwph1J1mua2e6/6zT+akUTobgd84UYoizfsPEDkqJzBsNr4 GObfkjIhQkpvo9pxjaOgeYQETycByByEoIOUYwwjtUcTYeaovxCHwUu7oE4IKGkLf3RbsjtlgJto1 d/JwIw10+ZQRj45JPr4V1baA5TPyABF/qSInvzQXeHc9XPc5DK5V+hpzuyBVAWapST/+GqvggAWpn bD/hWjCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1llKf3-002U9j-Ux; Tue, 25 May 2021 00:11:07 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ll5yy-000ltc-OM for linux-arm-kernel@lists.infradead.org; Mon, 24 May 2021 08:30:42 +0000 Received: by mail-qt1-x84a.google.com with SMTP id 1-20020aed31010000b029019d1c685840so23189625qtg.3 for ; Mon, 24 May 2021 01:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=LqapZkW6bGcuDXoTSxJIrLt2XyVt6VhDgfCDGVD2pNA=; b=ngyap7HPhZiBl+Iwho0v5Hfq7o+GPuU5TByaDUwHa1r+F3viDb6lvGf9Hpkyi3XUgN nIhpHj1HznVjEXt3zWMwS14eaYiTYBumvvURkubyxSulbjD2RFMfz0HQMLUdTxVJag6Y wrVhVSvltQQVTL+EGLR/Cl6lkFkuHemzttDDc2XeELhA77FTSlvN/VF2OUGJ8Vy3ImSo q5rAXs7+JBAN3xyvFsbZdS00pnh982nZSz9iF+iQkDtOx6qhtbDQZLR5NP5LkWHF9IRh lkwQRZ0AdQsXh9BnQ8Q0ECzMDNpYtmBQQRP+rVTvp3m73KO/UARn/z9UHiPKd1JkVSyF zrLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=LqapZkW6bGcuDXoTSxJIrLt2XyVt6VhDgfCDGVD2pNA=; b=CATrnt9r6aj5PIu3UpbUqxZaLvmt9KZ4V3wawu8RAjvAkCiqw5wA5skXVVgdo7eNrj 5OFsixm4wfu+jMJZwnHweQnAxPaD88KKC3xmRB5dEgQOFNoECnAvwjHpRiHlXqTSYQrk cGEQhxCCiVLdM9afV34SiDrsnfbFkdBvWqi5DDZF+3D8Z0za8nbj0bOZUIeupBPk06GE 6cYPf4KEEETNQhzcZzRuwHro0jSkhONTlLEXy3gaa0RVNN/UNhffN8Lhv3TfL9WwbgzS U6UrHVZwBbPFr0uecDUtnHbojxmhrwFd2V4vgufRLJ1ytn53CT7G5U1hgbApoSTGSfpr jZVQ== X-Gm-Message-State: AOAM532MDfiS4ImvPSQMfKgEbxd5NuRJuw6/0HL6fm5G4l6MEoE8G48u tAMI6AZYclPcVh5TFrUWeaUdiLj7bMjazbeDMM67MZaY5jgM2wO6LADi/rfY+ZcXafJolvkkAtQ 2OXuGL6TFO1h+DD3FDW2SAkiRdkOYwCG1jgDXInpLQsfcugdGrIMxAKKFk0b2mpBK8gJhQqfHDA HN+A== X-Google-Smtp-Source: ABdhPJw71FDcNI9iE/462msbPN1Dx/ivBTVA7Y45yqmKb+TF9fUdlj7g1wEvS+1Rt8QP/N6NFpHMdrxeNg== X-Received: from tabba.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:482]) (user=tabba job=sendgmr) by 2002:a05:6214:21ef:: with SMTP id p15mr28791700qvj.20.1621845038984; Mon, 24 May 2021 01:30:38 -0700 (PDT) Date: Mon, 24 May 2021 09:30:00 +0100 In-Reply-To: <20210524083001.2586635-1-tabba@google.com> Message-Id: <20210524083001.2586635-18-tabba@google.com> Mime-Version: 1.0 References: <20210524083001.2586635-1-tabba@google.com> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog Subject: [PATCH v4 17/18] arm64: Fix cache maintenance function comments From: Fuad Tabba To: linux-arm-kernel@lists.infradead.org Cc: will@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, maz@kernel.org, ardb@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, robin.murphy@arm.com, tabba@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210524_013040_812876_CBF207EF X-CRM114-Status: GOOD ( 11.36 ) 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 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. Acked-by: Mark Rutland Signed-off-by: Fuad Tabba --- arch/arm64/include/asm/cacheflush.h | 47 ++++++++++++++++++----------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h index 70b389a8dea5..26617df1fa45 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) + * All functions below apply to the interval [start, end) + * - start - virtual start address (inclusive) + * - end - virtual end address (exclusive) * - * 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 + * __flush_icache_range(start, end) * - * invalidate_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 Coherency. + * + * __inval_dcache_area(start, end) + * + * Invalidate D-cache region to the Point of Coherency. + * + * __clean_dcache_area_poc(start, end) + * + * Clean D-cache region to the Point of Coherency. + * + * __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.818.g46aad6cb9e-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel