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.4 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 CDEA8C433B4 for ; Tue, 11 May 2021 14:48:29 +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 2DBE161263 for ; Tue, 11 May 2021 14:48:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DBE161263 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=cQlMMsoxRrFKmBl4TkSxBydP1n/ddkMtBR9GqApkW40=; b=HiSLtKeLKHp27l Rooq2Blfdy0zQPnAGUaZqvDoV73BjAFdTvA/fdKT6jtSLMd1ShcMFkADfn0FaGhYMl4YEnTiAb2SS sVLAA8IzqI1PzReTq2aYjT5Q3VmK4zbo8kv/pigqIaI44iUgVy0tiSV7d+RWa3EbR9kIQVPz0iEga bFq+dRh/nFptodV4RzVomia6Vegz+UkNwxZHDAq9dmBtasGdEVnKMctAWDWmkq10HZLpq6KJ6IcPb k4oYS6AaVl9vtXa1Yj9hKtiKhHfyPDVXma2MWEzNq6+h5EtodAr+aUphP6NaK3QsudO2pgKBEFwyJ OEilwcbDIvrzAN578Y4A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgTem-000UUE-MT; Tue, 11 May 2021 14:46:45 +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 1lgTbZ-000THu-2u for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 14:43:25 +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=w+SJNOEqyTo2ibRFXPy7dTBPGWZnvW3GLChijud2oBg=; b=o31y7K2y9qC6kebbXakDHQDFd5 879EMkL5rGT/8WXPYQw+QHRnUxEW0U2wxJeZhM4cDzWwC0xmG5wDg8duCaCPdQBcHQ/LfuDQAAdDq 8vv5qm7OpUbaz9jqAwQLQ554Nx5cArEMR76Kc7rYgfJrbe16KH7mtp2TJPa+2H3a3ppY+3HIiGLIp 4GH62nOFFLqlDmqp9CQsIWluHxQWCtwQ5pleu6OldyH3a5gzfQQb0L3zZUsRqwYkjCS9Gl4C2wAhV V/l88tJdIbKnCl2lzUQtIANDcMF95nzI/53DPlPuy+R8SMBCCQK1Mkkl1yWq6EXfkbnf8yn0TS3aX 9v8VH40g==; 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 1lgTbW-009gXP-HW for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 14:43:23 +0000 Received: by mail-qv1-xf49.google.com with SMTP id f20-20020a0caa940000b02901c5058e5813so15684240qvb.23 for ; Tue, 11 May 2021 07:43:21 -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=w+SJNOEqyTo2ibRFXPy7dTBPGWZnvW3GLChijud2oBg=; b=BLpDZ80JomTqVO56UVs8uvFvd/x5AMo6ChHbOAcnlMv4T1APxm6ubvv1bd39yuLI/W ZD+TM0bHfQgZZSp4ChtiexbL8c+jgtyrmK5T3LFlTwR5lKY7Plb6ke5StjhbckQr+FaB oFIly+dcq1FlDJCQVtUH2gSVYYe/6/xS2SVhRDeOSJICKsmIg1r+8/d8asADvEE2KVrY 6iEJSadR29tbYFotx1iTgBEH+FDvIy3aq27i/Dk4Da/RXTny6H8R+p8CP8kbrjfci0D5 iA6BUZ+9QAkeGEs/T3oiKD4wxSrvzGUxtLmyu8xyBsiXjR15mG85ppPjhEpITmEULP6x 4uTA== 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=w+SJNOEqyTo2ibRFXPy7dTBPGWZnvW3GLChijud2oBg=; b=pfOFSFs9zy7qcH24dhkycrc8NB1hpRBaHF7vg+zasdAZBUK3s7C3yW0AHjGbT4cOFo lIHY50w6DbxcuyEE28wN1WAkNAlNioDVL36PwRTYdOCy5aqNnb6Jn4qJBM59plUwtZOZ vat1k5cDtkm4bHsvg2MyX/4Pq5k0X2vbfxuXm7BIyoFuQaGLeOXAIlwzB4uG5C/IhPJ0 GfPUO0+q9aqOJ283zuQ4OTk4bjMBIAW4nFXX3W+Hs3eFtFazLwUuH1zG7ymmAA8wgkcw XqCSa0TsRk9zEmxhYb6ScBiPehzr7FDFljabhpcDbCb025klJfGm9SIzrxC6XeUZIHsV 45sA== X-Gm-Message-State: AOAM532mBLW0CGrPBxYIGn56ydi+yAa2XEd5j3cJXwH9evB8bqwukx9T LSpSAMwjLFbzYKDbRyMltjV/9eO8ggEQ1dtB69W3KkU9Ic0fzvIs729VCHfk2aLofmlLXjmMmBD qfuCOdWwuu5S9+uyFmgl0veBZk1cNGqWYA/179Ek5MiH6AgP4twVpQV6H0QkjWCPN0qmNNpz/gP 5lNw== X-Google-Smtp-Source: ABdhPJy0Qwp2NlYTajA16dety4GmON5jUPMr0Rwx71KHnZMxXWefN08W6wEx+Y4SPbn8NGfEom/zhWYKFw== X-Received: from tabba.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:482]) (user=tabba job=sendgmr) by 2002:a05:6214:951:: with SMTP id dn17mr29937185qvb.27.1620744200642; Tue, 11 May 2021 07:43:20 -0700 (PDT) Date: Tue, 11 May 2021 15:42:51 +0100 In-Reply-To: <20210511144252.3779113-1-tabba@google.com> Message-Id: <20210511144252.3779113-13-tabba@google.com> Mime-Version: 1.0 References: <20210511144252.3779113-1-tabba@google.com> X-Mailer: git-send-email 2.31.1.607.g51e8a6a459-goog Subject: [PATCH v1 12/13] 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, tabba@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_074322_600453_CA855924 X-CRM114-Status: GOOD ( 11.06 ) 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. 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.607.g51e8a6a459-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel