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 55491C433B4 for ; Mon, 17 May 2021 08:06:30 +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 DACE861042 for ; Mon, 17 May 2021 08:06:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DACE861042 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=desiato.20200630; 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=eCo1vQBlHR7xC19kdlgSCxfKhoTKIz/uL7rwwxUGl/8=; b=eJoQAqtMrlGczx KfoLDVSTl1+fZczqBhnNK2O+juCeKZ4nMGRbR+sDWmYR/Ij2KMjN8kydEgoSNqjloHbUNet6y4FLx uYx5vt4Bu+qP3kQn3gGLPvxf8b841udTA0SyBjGBgDW3p+6hymKmObXT62YLtlA42pyk57QMmjyjK E9O03IQv3Q7amYguaDKMLhaye57vCnEumiqwrZXX8Kyb164xovAcYWIa0Mbe0xPEGQbUnOdzkCyyF +SK0pzhTvNrd0aBwV7/zs7+pRCfHtT9mlhx/loJPW8QRgSLGyZYszAPkO9uMud9Bcqpx2A41wkWfe huAqlIHuNRjfLaBMbG9A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liYEb-00E9ZH-D2; Mon, 17 May 2021 08:04:18 +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 1liY2j-00E6gw-L0 for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 07:52:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JUJRBpAmSgW3iUmlRzcNOvrsxGJGypryDJgOqUy8erw=; b=o9TCJJ07OTAXeFvfawXobBiSl8 Ch0w/bQsX5+D6KQnGGIy1jE2FJqHvmwZfOY1/U4+w0U7qkk1DtEjlq8mJebzyQZMTDQvMFCq4G8Gh WWyvN/RnoizE/fv2CI+e+7uShSJX3Is4DOWGGpM4UUjuO8X1OazT0Og6Qyzi0MnuT9WWDeq+O+PGz Pms5jUz6VVTyshZ228JsTLEtFWGBLih2gCdMHl/L7lwBpK9VcOC8/g+klfy2tsUHiXvZcnesIglGe tJTvGKhmxZ3d5sEk9fiTLfxHyleWYbSHPZbYMqMXlSD/OnXl4EYR/XChiWuhtI7wYu22JZVhJt4yC 7CbwcKPA==; Received: from mail-qv1-xf49.google.com ([2607:f8b0:4864:20::f49]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liY2g-00DZ0d-TO for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 07:52:00 +0000 Received: by mail-qv1-xf49.google.com with SMTP id g26-20020a0caada0000b02901b93eb92373so4175121qvb.3 for ; Mon, 17 May 2021 00:51:57 -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=JUJRBpAmSgW3iUmlRzcNOvrsxGJGypryDJgOqUy8erw=; b=N4zTbNq7K0Ua1liUMx5e8vqqF3qfhe4S8TluOn9TKCKJ3JCJYpIGMh6Q/AoNlYSeLU sAebgDYLebfjNY46/RHMW4NDW1HIq4llnzgBabNF/hp4IShXhma6S5zKosUKFh0iFoPr D0tWQpCFybyp+vFcA7h4IhfG70aWK00x3MDDMC5Y0dIwOWcIiUck+rdhK3B8uan/6EBg DiGcKRFZM/PWalLSKzRT1Er3biyiOxZHOoKx9Bag1IKSWDua0sy1OacA56Aj1y/OQDAb s0N2e7Xkm6pyBpQK8e0d9uhSrECxiyU5gPtcAKQ8dXiWyj7tc6moRQBRR0OcoQmAeMsu G5Bg== 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=JUJRBpAmSgW3iUmlRzcNOvrsxGJGypryDJgOqUy8erw=; b=LtN6/VCx6jiwzGw5krqN/qrTbqD7CiXDy2VFxfYPe6LvIB40rmSN7NBhvCzFPDPijW si4CcBeuj9d3uloAEquZxQ2Pz3aSZFAm+YmbsZ3lsjsMQCthg6KzNb7v7xyUP/MZ285h qeFtX/g1X19JGNnuaMQ1gxvIkvpo/DyKDgz0fiNICQc4ndUF0lhdmMvj76SEsyVBB7py ZWp221+AOUJGFnzPEge0vh71Obq8uOrVIU2DgE3GdWBe0LiRQnKLnzE33hCRuARlbvOi +F67ZLXI/xj5xNpDUR6RXaxtX6mT2E63pjCLRq9fdfVgera0VdeYHGV354USnFCX5eEL x0Ew== X-Gm-Message-State: AOAM532Bhkaus6qVGKQm0zpI8+gB3ccd7USkyFblYvqc4lDH8BkCSrIG tWSE5RnDizrqhHOLy3lDn22XrbxI5p0HZ68ruLmwrK0OgQ9lEbjvsAfpo7yzIvEUzSoC8NJ5kSm FYSSo5SIlkhaczYIKThQbF99rpL7rw7AUiN4FNAhkkxd5O4kzp58R59+0yHYAI1/2z3vDFbf4Ci Wx7A== X-Google-Smtp-Source: ABdhPJyASex81k3HDJucza6OcTSFv/+7eoeK0N3rkaFEUo62Na5RWQJ6bx/Zc1bpCfCMHJrbLHqnfIBsQg== X-Received: from tabba.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:482]) (user=tabba job=sendgmr) by 2002:a05:6214:178b:: with SMTP id ct11mr31930552qvb.61.1621237917265; Mon, 17 May 2021 00:51:57 -0700 (PDT) Date: Mon, 17 May 2021 08:51:23 +0100 In-Reply-To: <20210517075124.152151-1-tabba@google.com> Message-Id: <20210517075124.152151-16-tabba@google.com> Mime-Version: 1.0 References: <20210517075124.152151-1-tabba@google.com> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog Subject: [PATCH v2 15/16] 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-20210517_005158_967770_C955DF25 X-CRM114-Status: GOOD ( 11.19 ) 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. 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 * - * 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. + * + * __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