Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15423330rwb; Mon, 28 Nov 2022 11:22:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5oVMlJy3CAbkwglg3BMxXycOYsHDn3fcl/vaJ3a7sdzmZEKpofGqmqicjbtKYRLUDrjAL7 X-Received: by 2002:a17:90b:3c4a:b0:213:1d14:2a27 with SMTP id pm10-20020a17090b3c4a00b002131d142a27mr56175891pjb.109.1669663368281; Mon, 28 Nov 2022 11:22:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669663368; cv=none; d=google.com; s=arc-20160816; b=EYoWrdeccFI6HCVwr0YIXbbi7UGiHQUOReOjn4eVb1Nf1THvY8KRuR6nCXmuDHl5eM vdBXpySro34UE6iqwP3EfvjbblvE/qeohI+Ym4llwyFgp4Zn7kF6+o3GNyDVepKD32RN 1O4n2OvHWvL4144mM05zfl1Yu/QP0pGelR+PJSwxDKVmysFQgVf32mM1a4K41GQUCVCN LspOVeC5gmv6svg/RjIIIavsB3pkNk3UMX6zRDN06mLNPbIRIv9nOw11PU2yesdMgjqT Ir18BGc3jznyZJMEGGg1ttltwyk9d9rqWQrTdZtpz9tldlJHyE0jH+1q7CyUpABsF3mc q5gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1nOZjMbMo96D7jK6HEe/+t9X8Bowh9uZiGdvN65gOws=; b=ix4GfMyqh27HtMPSS/HO/E9hWejmaXmA9TsHRWW+a29E70Laoyr5Z8N4s9PT7/QVrc X/8ULajgiXEH+NH4I4WT5qPfhABJ+Zblj5rlP+PsaeWjzp8krc+h0joqr6GS1+y86uVX FJBIFnPhAcsXCKoVIAdC0PEuiNRRCg08FQLNV3xSJF/P1TjvveA/91chDWoR6Xuvz9Y3 rV66yUyeegpSbg9a/WPE7C++Gi9oZHXcrBeZyt6xv+l49zcYtfBJtEYWE1jSyJbB1LyG jHRZ1GhJ0hM/enh0d0F1sVdFxs+FZyb5buDbF9TAmynl94S0KLHbYeF6abrQZE5quRLU eaBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=oEkLoWQG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb19-20020a056a004c9300b0056d67d820ecsi12165426pfb.258.2022.11.28.11.22.37; Mon, 28 Nov 2022 11:22:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=oEkLoWQG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232439AbiK1Sgh (ORCPT + 84 others); Mon, 28 Nov 2022 13:36:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233093AbiK1SgL (ORCPT ); Mon, 28 Nov 2022 13:36:11 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAB8BD88 for ; Mon, 28 Nov 2022 10:36:02 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id n3so18375017wrp.5 for ; Mon, 28 Nov 2022 10:36:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1nOZjMbMo96D7jK6HEe/+t9X8Bowh9uZiGdvN65gOws=; b=oEkLoWQGxOS1awqe7QmwayKLBEaAdW0933WHxdwnPkSG0HKhBsfcntFGwd0XZUGLOx WJzZtRhTclTxy/5XZvA2ptFPUJgGpzQjczqw4lzYHxaqlab2vdVBY33ydlUErInP0B2K 5BW+NOvGtyLB5LbGfk5mALU8/Br4SH+r/B1x8A42nj2VYteNmgPmxWW1Au+SH1jQsjVG dhZZmSbmzE+KADACkDLyRT0uplk9eM3dqGL6y0Kez2HXrgzX5QFQl/QE51nOljeyJisc Hjhfa4QDLTWEQhzbJKG8NrB4vBrvlWrc/k5i+3eREwAjeEZw6zk0MO4NLzd0iWpi8NIL yowg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1nOZjMbMo96D7jK6HEe/+t9X8Bowh9uZiGdvN65gOws=; b=l1GDEt9ieeih7+qAGFdcp/yNRwnyOLu0YXdBGDZphtxRcf7kp0jfgwKvl9OHocBFce D/nCvoAOqYgmHYA2SDjtVYrB8K9NXVcfkZMflyIQm2/ciQcjHmvZRNFMAM9G/rsaeymK Fol/bQVYxk7lEaQytVucCoJDbGtjjySrqFrxBTezpbbT6YpcEF0SS7mjaKp+gxlm8BxR k99PhZ1eGe1O9E0ARmRh2vFZ7llkURuZm7N+joUf62W8FjLwzY55AI1vgAOWGRMcUPSG 4iAZBh7yr+vA1R9WKkHGLnSioUY/IBP6vzd80HGTO9QWhZjurUCwH98qeTu9Iy4DQkZV 1w1g== X-Gm-Message-State: ANoB5plUKxkBj0S92DfkC4QthZq5j756U/TBYEnNoWUcctiXNNgRUT+G XjL7dbAKJWAJvx8ZpZumCwiS3A== X-Received: by 2002:a5d:5948:0:b0:241:ea80:878 with SMTP id e8-20020a5d5948000000b00241ea800878mr17223417wri.124.1669660561353; Mon, 28 Nov 2022 10:36:01 -0800 (PST) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id u2-20020a056000038200b00241cfe6e286sm11391928wrf.98.2022.11.28.10.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 10:36:01 -0800 (PST) Date: Mon, 28 Nov 2022 19:35:59 +0100 From: Andrew Jones To: Conor Dooley Cc: Samuel Holland , Palmer Dabbelt , Albert Ou , Anup Patel , Heinrich Schuchardt , Paul Walmsley , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH] riscv: Fix NR_CPUS range conditions Message-ID: <20221128183559.5ei5fx4cl4mo3ioj@kamzik> References: <20221126061557.3541-1-samuel@sholland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 26, 2022 at 03:32:04PM +0000, Conor Dooley wrote: > On Sat, Nov 26, 2022 at 12:15:56AM -0600, Samuel Holland wrote: > > The conditions reference the symbol SBI_V01, which does not exist. The > > correct symbol is RISCV_SBI_V01. > > Huh, good spot. > Reviewed-by: Conor Dooley Yeah, huh. It never occurred to me that we don't have some sort of symbol referencing checking in kconfig. Or maybe we do and I just don't know how to enable it? Anyway, this issue made me wonder how many more dangling references we may have. I wrote a script to look for them and found 29, including this one. I'm not exactly sure how to report them since they touch so many different places. For now, I've opened this kernel BZ https://bugzilla.kernel.org/show_bug.cgi?id=216748 > > > > > Fixes: e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS") > > Signed-off-by: Samuel Holland > > --- > > > > arch/riscv/Kconfig | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index fec54872ab45..acbfe34c6a00 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -319,9 +319,9 @@ config SMP > > config NR_CPUS > > int "Maximum number of CPUs (2-512)" > > depends on SMP > > - range 2 512 if !SBI_V01 > > - range 2 32 if SBI_V01 && 32BIT > > - range 2 64 if SBI_V01 && 64BIT > > + range 2 512 if !RISCV_SBI_V01 > > + range 2 32 if RISCV_SBI_V01 && 32BIT > > + range 2 64 if RISCV_SBI_V01 && 64BIT And for this patch, Reviewed-by: Andrew Jones Thanks, drew