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 ADDA5C433B4 for ; Tue, 11 May 2021 14:47: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 14EEA61361 for ; Tue, 11 May 2021 14:47:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14EEA61361 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=5Cg5nZb4UrHjMmqTtHp3abKA6LytBGMenCdVX8DyC+A=; b=MqAq3DII2tRQnD OoF3ERI+2bRDESavKa5g+oirUBfz3ewQm53IP4kwlmODyiuqFNYHDI46wP1Q5GEx3ExwSZLC3BpMX mhGzsEqEaSfNJzTwJzzRIwMJcQiyy3VRqxmWBotX+FvBTI7PH58qLd265ggsrE6/gYh5B5lpc/2Q8 ymHR44rgg1yLFKGrbbfSH3si/glzByMC/JlVt2sN7I/folOoZNXGW2tJ1X//cRu0cmTSUiD4iU9o2 FYhw6qoV0YphpvUWbC4nb6m3KDlM7CowIgcAO06UY/0SUwk8iYCXEZTS7oXWCQA/OOS6JXayxAtBQ C6RBxVJfpVtJ17v7KA3w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgTdt-000U8m-6u; Tue, 11 May 2021 14:45:49 +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 1lgTbV-000TH4-Go for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 14:43:22 +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=aUVmLrAjgkm7TuYinwPWvv/o8H/Z5yvNrHnHRrMUfwI=; b=QB5oI9ARMtuO58h0nmEow2MXbv O2kBooxR+5TGPqg+q7ZhV3N59z32Z+jkarqIu/INchfKCQ+AtP1zlhMV3SnurMhkrE/NfDmhWRlR1 ss/dAGQTGRzO3wcm1G55uON15nqXhqFrck5voZZxErHodrOe6gw9oa9Pecd/3+3BxqzrlVCkyqIqI zV6sA05oaXOFkkMYz8sT4HdVDbYSuhHnO2IEmXShjIQQ31Ybc93tXHAKTDnLzhLlz6iGlCqvy9EfT KLjQh0zpEUsQrULlZgry32+Z+OaWhgCoIvC2i1fa0YY7aUlJQ3seX3Ottz0O0YW0A26SA+gSXEoR3 QLMOz6Ww==; Received: from mail-wr1-x449.google.com ([2a00:1450:4864:20::449]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgTbS-009gWr-Tr for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 14:43:20 +0000 Received: by mail-wr1-x449.google.com with SMTP id t5-20020adfb7c50000b029010dd0bb24cfso8850121wre.2 for ; Tue, 11 May 2021 07:43:17 -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=aUVmLrAjgkm7TuYinwPWvv/o8H/Z5yvNrHnHRrMUfwI=; b=h14Wo4Zrgw9PVJ7A12/eWp6QE0ZCUbZD+euc4x2AWmQNGNnMyIItGPkGvTZv9zd1GP BFvVwB+q0jBCYD1X1qGmRhaIRmICo1/L+bOHsZt9aJq2g4SWcIkyFCPCvq+3jYKJLLQy LH9b+EZllyF+J0VHmv7WDwo3ZinEgT83r2N9rSQ4CMJmgUTMw19vAY18JorNzwpIn3Bl CUEFC7uF5XiMNM837ZEs23u3p+vV72C8kiq+9XwYJhKAOLzwwGlgMW41tOIUzwOvywqL tclpSI2tp15Osoc0LDtOf4WA/AEjpshkfp7c7XF6lAeGsnr/j7GM27kjpPChqCI9Ju3i sf0A== 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=aUVmLrAjgkm7TuYinwPWvv/o8H/Z5yvNrHnHRrMUfwI=; b=onw9K87GXRpb3umOd1tP4JxLrfgF4JglG/KVdszlN8g+RcvwK/4A0X1mA727iNPaw/ hJSE112cU1ikWomcv+MtyLHzDwT72HyG+yHgESpnR558+b4ZNj4iQBYF2EH8j2WfpjJt SMXt6cME0vGJBxCCTExiS120ZiiCJ3xJoajmpfbTQpw6X5MFtJZ/CjuBdk/UWsfAbA1Q ZBsxRUDcBFPG33upOQ7i4nJNS+nx4FmDZjmdpE1rBxKjuM83/qMgox2Wfy7EJJ6A3ioS /smntng5K3yIokJm0P4oqoP/33n68CwbMXlb9408w0+cUURhHGh9JZhqbfWCsZKKS5lW 7FIA== X-Gm-Message-State: AOAM532VMtbGYMtYWeXNcEwjUQRZDD6F+ZDVfjzIbQ88RUdL+qYVUZ5e pDVBWTH2tYEOUsqTzpZu5iv34L4tlA8TrCChRrf6wvTK0axJIdzSRJCCUyxFdLprdxCUxWnWbAd JhetQgjs7Vx+yLuJ4oN1iFr2lJbiLEwBv3buus0kKNscMthFyWJsKt8128+biK84fiSLwVStSHa wZrg== X-Google-Smtp-Source: ABdhPJyiumpvsUeMisUOEBScDYLU79ywwsmqO0aF3drfIiWjjMb+9az30NPwE3gwq9iBN6Tck+z/KKqQOg== X-Received: from tabba.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:482]) (user=tabba job=sendgmr) by 2002:adf:efc6:: with SMTP id i6mr39077748wrp.408.1620744196852; Tue, 11 May 2021 07:43:16 -0700 (PDT) Date: Tue, 11 May 2021 15:42:49 +0100 In-Reply-To: <20210511144252.3779113-1-tabba@google.com> Message-Id: <20210511144252.3779113-11-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 10/13] arm64: __clean_dcache_area_pou to take end parameter instead of size 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_074318_984355_06403590 X-CRM114-Status: GOOD ( 13.30 ) 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 To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon Signed-off-by: Fuad Tabba --- arch/arm64/include/asm/cacheflush.h | 2 +- arch/arm64/mm/cache.S | 9 ++++----- arch/arm64/mm/flush.c | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/cacheflush.h b/arch/arm64/include/asm/cacheflush.h index fa5641868d65..f86723047315 100644 --- a/arch/arm64/include/asm/cacheflush.h +++ b/arch/arm64/include/asm/cacheflush.h @@ -62,7 +62,7 @@ extern void __flush_dcache_area(unsigned long start, unsigned long end); extern void __inval_dcache_area(unsigned long start, unsigned long end); extern void __clean_dcache_area_poc(unsigned long start, unsigned long end); extern void __clean_dcache_area_pop(unsigned long start, unsigned long end); -extern void __clean_dcache_area_pou(void *addr, size_t len); +extern void __clean_dcache_area_pou(unsigned long start, unsigned long end); extern long __flush_cache_user_range(unsigned long start, unsigned long end); extern void sync_icache_aliases(void *kaddr, unsigned long len); diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S index f35f28845691..d8434e57fab3 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S @@ -128,20 +128,19 @@ SYM_FUNC_START_PI(__flush_dcache_area) SYM_FUNC_END_PI(__flush_dcache_area) /* - * __clean_dcache_area_pou(kaddr, size) + * __clean_dcache_area_pou(start, end) * - * Ensure that any D-cache lines for the interval [kaddr, kaddr+size) + * Ensure that any D-cache lines for the interval [start, end) * are cleaned to the PoU. * - * - kaddr - kernel address - * - size - size in question + * - start - virtual start address of region + * - end - virtual end address of region */ SYM_FUNC_START(__clean_dcache_area_pou) alternative_if ARM64_HAS_CACHE_IDC dsb ishst ret alternative_else_nop_endif - add x1, x0, x1 dcache_by_line_op cvau, ish, x0, x1, x2, x3 ret SYM_FUNC_END(__clean_dcache_area_pou) diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c index 5aba7fe42d4b..a69d745fb1dc 100644 --- a/arch/arm64/mm/flush.c +++ b/arch/arm64/mm/flush.c @@ -19,7 +19,7 @@ void sync_icache_aliases(void *kaddr, unsigned long len) unsigned long addr = (unsigned long)kaddr; if (icache_is_aliasing()) { - __clean_dcache_area_pou(kaddr, len); + __clean_dcache_area_pou(kaddr, kaddr + len); __flush_icache_all(); } else { /* -- 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