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 B1C7BC433B4 for ; Mon, 17 May 2021 08:05:16 +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 439246117A for ; Mon, 17 May 2021 08:05:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 439246117A 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=HwCHr6Err3ylF1SpSqy9eeieyXxZhpXrwXccT0UAUyE=; b=kqhVV//Kvke00J x7CPI9m4fZFkKOQeAGWB9jLwmTsVR5a2rjZW0sfnuTBgiX2szBnL8l3mueRu2LLBlhkIszJ6CU4lh cedSJnBRVOyO8mOW1Har/K6AGRJD3EhPEcksHdt6H9qDyIEpeItKAKw9NOAYM4l5VHx4AacmqPQyw FnRMOGG30jGVXxk7MqvROabQAON5xCSFVIJ319Bi8QNJ4hKIMeavCrgdQLT5+MiEDWihcSTSwwKe3 9gm8haVZJh0jQm9QpFJf1gSdQhrmRYjfIgiEOjNHZet2Fpc4knx1UMlwqHs6whyhpT1tnC+K1aUmx 6XlwPoB7Q+sJFSHsDT2A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liYCu-00E99x-LT; Mon, 17 May 2021 08:02:40 +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 1liY2f-00E6fV-QH for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 07:51:58 +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=h0UsHrd7C41RPkjFGyYnkCI8+hNRUMgaYiYUkKIiD6g=; b=GlEUgNTbcNHlJ2Ig7LFgIZppFO yaH5Qi3RPXDwKBdAFSY3MvhQjOEvc94+gpp6Vjn5/BtmJMFCF6W0zlmjwApK6yee9VwzTaiE2Bvhy 9hpc64JRT38Ha/soP8vjNl4+4ZLL8wzO2i0LcZoXzreNjXFNWrPQyPfOCsa2UIK49ivuHIg0p6bjL cByx+fqVTAq2niyrZdl/fy9j9pzcQh1IS80vEYi7siufzaEWQVYpwB8J+vmkB9Od8A9bupmdKM50j M9lo1okLcBnA0B8PbyUZY+xp1lYRoVr0T6TFbe5GQHB6gDx8IFP9FESrveHo3mXDKhDFNRyP+fuSy 8KhJsAaQ==; Received: from mail-wm1-x349.google.com ([2a00:1450:4864:20::349]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liY2d-00DZ03-6q for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 07:51:56 +0000 Received: by mail-wm1-x349.google.com with SMTP id o10-20020a05600c4fcab029014ae7fdec90so1108929wmq.5 for ; Mon, 17 May 2021 00:51:54 -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=h0UsHrd7C41RPkjFGyYnkCI8+hNRUMgaYiYUkKIiD6g=; b=c9C/3YTL1MWq84gslJQnTkViFZuL/a4Svx5g19vpJQIXvWGh9iYEMw3VQX85p3WoEm tcMH9ze2q0lTpYxqD0x8o4c3PSdQsry3IHsEscCPYAF+aemJMbbytpF5X8g5HzH2+JVv G8riJ/Th3s7G6Q8gU4MtMzDAqVSEFEm9WkjXQ29RxD74uGW+hdg12AddC3hC7t54A1cl 9W+vqIhv2tT952pWfOcSfiWAC9nMMT3E6tXB43b+djIvUDLM1gX1DGCjjXUSPMeK/QIV GeMG3nSYmdVAY3FeuAqAnB5U3+9ZkkBKL28p74okE/Od97NKsfQU8nN8w6C4HSK98DB6 /M2A== 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=h0UsHrd7C41RPkjFGyYnkCI8+hNRUMgaYiYUkKIiD6g=; b=HiiNBKBs7cCl5+1MaAAuaOTRVVCCpTrabb9iQE0f2egq6Lra89EwXmJf4PfNpa2Zic XKPmsfl718aBa5/VoFtlescmLmaE8zsZDhUgQLcOYku+UEdyvx5abeqZPZ9MZhxt+EhS QJYPai7rn0EdlF3gLHGgXdnRhS/SZ6PXEzPdTvxXiAUz8Uakk+C65SL1EeZ0tvL5BpqT hNgf75L9UrPmbEZ1GIjd3gdQdHUqnafZ1rsBQlbDNaR9xI3Fj/KFGEAIURn9jrGpKWww a7CCGRPOXxLCfpb5BR69XdeqFCxicWBg7toYeljzI3ljWrAM37Ot14NkPHztgfPiZ0KO f56Q== X-Gm-Message-State: AOAM532I0+dIvwFas2+e3BwFbqoAweKr+dZkTL5CbvC9WCA+2ABuqotV 6cfU7lEPctN5G2FcZkbQ0//sm0SUwrU7I6/ECDUMV1b4VMp+NrxBE7HrusRRnednSpha/HR5Rio 3uFhz3batDaEUnL5Dw+AKbbuqiZRg0FHfR2XFDFcCrEBEn1zjM3UlC2/n2TCb9NL4IEyBBJpCZT 4hYQ== X-Google-Smtp-Source: ABdhPJz5jO69ngSt5Zgq6grmBYyb7vhj2W1zM5B5DG/FcGehJxyCXVFvphzBXMRKjmlS/wXVBYJKE03peA== X-Received: from tabba.c.googlers.com ([fda3:e722:ac3:10:28:9cb1:c0a8:482]) (user=tabba job=sendgmr) by 2002:adf:ed47:: with SMTP id u7mr26398948wro.254.1621237913217; Mon, 17 May 2021 00:51:53 -0700 (PDT) Date: Mon, 17 May 2021 08:51:21 +0100 In-Reply-To: <20210517075124.152151-1-tabba@google.com> Message-Id: <20210517075124.152151-14-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 13/16] 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, robin.murphy@arm.com, tabba@google.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_005155_270880_8D79799D X-CRM114-Status: GOOD ( 13.43 ) 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 8c0707167ab2..fbf003b956cc 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S @@ -124,20 +124,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.751.gd2f1c929bd-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel