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 B5031C6FA82 for ; Tue, 13 Sep 2022 07:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbiIMHMS (ORCPT ); Tue, 13 Sep 2022 03:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiIMHMR (ORCPT ); Tue, 13 Sep 2022 03:12:17 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB58E20F76 for ; Tue, 13 Sep 2022 00:12:14 -0700 (PDT) Received: from [89.101.222.236] (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 1oY05E-0003Bu-4I; Tue, 13 Sep 2022 09:11:48 +0200 From: Heiko Stuebner To: atishp@atishpatra.org, Conor Dooley Cc: ajones@ventanamicro.com, anup@brainfault.org, conor.dooley@microchip.com, jrtc27@jrtc27.com, linux-riscv@lists.infradead.org, lkp@intel.com, mchitale@ventanamicro.com, nathan@kernel.org, palmer@rivosinc.com, stable@vger.kernel.org, Atish Patra Subject: Re: [PATCH v4] RISC-V: Clean up the Zicbom block size probing Date: Tue, 13 Sep 2022 09:11:45 +0200 Message-ID: <8114822.T7Z3S40VBb@phil> In-Reply-To: <20220912224800.998121-1-mail@conchuod.ie> References: <20220912224800.998121-1-mail@conchuod.ie> 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 Dienstag, 13. September 2022, 00:48:01 CEST schrieb Conor Dooley: > From: Palmer Dabbelt > > This fixes two issues: I truncated the warning's hart ID when porting to > the 64-bit hart ID code, and the original code's warning handling could > fire on an uninitialized hart ID. > > The biggest change here is that riscv_cbom_block_size is no longer > initialized, as IMO the default isn't sane: there's nothing in the ISA > that mandates any specific cache block size, so falling back to one will > just silently produce the wrong answer on some systems. This also > changes the probing order so the cache block size is known before > enabling Zicbom support. > > CC: stable@vger.kernel.org > CC: Andrew Jones > CC: Heiko Stuebner > CC: Atish Patra > Fixes: 3aefb2ee5bdd ("riscv: implement Zicbom-based CMO instructions + the t-head variant") > Fixes: 1631ba1259d6 ("riscv: Add support for non-coherent devices using zicbom extension") > Reported-by: kernel test robot > Reported-by: Conor Dooley > Signed-off-by: Palmer Dabbelt > [Conor: fixed the redefinition errors] > Tested-by: Conor Dooley > Signed-off-by: Conor Dooley Reviewed-by: Heiko Stuebner