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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CE95ECAAA1 for ; Thu, 15 Sep 2022 21:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbiIOVPX (ORCPT ); Thu, 15 Sep 2022 17:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiIOVPW (ORCPT ); Thu, 15 Sep 2022 17:15:22 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38FE1A059 for ; Thu, 15 Sep 2022 14:15:19 -0700 (PDT) Received: from [167.98.135.4] (helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oYwCY-0007Hx-Il; Thu, 15 Sep 2022 23:15:14 +0200 From: Heiko Stuebner To: linux-riscv@lists.infradead.org Cc: Palmer Dabbelt , stable@vger.kernel.org, kernel test robot , Conor Dooley , Palmer Dabbelt Subject: Re: [PATCH] RISC-V: Avoid coupling the T-Head CMOs and Zicbom Date: Thu, 15 Sep 2022 23:15:13 +0200 Message-ID: <2123713.Mh6RI2rZIc@phil> In-Reply-To: <20220915170900.22685-1-palmer@rivosinc.com> References: <20220915170900.22685-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Am Donnerstag, 15. September 2022, 19:09:00 CEST schrieb Palmer Dabbelt: > We could make the T-Head CMOs depend on a new-enough assembler to have > Zicbom, but it's not strictly necessary because the T-Head CMOs > circumvent the assembler. > > Fixes: 8f7e001e0325 ("RISC-V: Clean up the Zicbom block size probing") > Cc: stable@vger.kernel.org > Reported-by: kernel test robot > Reported-by: Conor Dooley > Signed-off-by: Palmer Dabbelt Reviewed-by: Heiko Stuebner > --- > arch/riscv/include/asm/cacheflush.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h > index a89c005b4bbf..273ece6b622f 100644 > --- a/arch/riscv/include/asm/cacheflush.h > +++ b/arch/riscv/include/asm/cacheflush.h > @@ -42,8 +42,12 @@ void flush_icache_mm(struct mm_struct *mm, bool local); > > #endif /* CONFIG_SMP */ > > -#ifdef CONFIG_RISCV_ISA_ZICBOM > +/* > + * The T-Head CMO errata internally probe the CBOM block size, but otherwise > + * don't depend on Zicbom. > + */ > extern unsigned int riscv_cbom_block_size; > +#ifdef CONFIG_RISCV_ISA_ZICBOM > void riscv_init_cbom_blocksize(void); > #else > static inline void riscv_init_cbom_blocksize(void) { } >