Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7125rwb; Mon, 28 Nov 2022 16:24:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6o8ZMRX4ObtO6y57E8LJET1H3xd3xi6heXquzsL6nsP+RrhIY0UL9xMM6sn4zzEWQzfSWp X-Received: by 2002:a17:903:93:b0:189:5c4d:6046 with SMTP id o19-20020a170903009300b001895c4d6046mr22524683pld.4.1669681492002; Mon, 28 Nov 2022 16:24:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669681491; cv=none; d=google.com; s=arc-20160816; b=m0HG4ojA27ezbSMFgYblsyg58L4kaNJV4B9qCfc63X6uKnLoN7N75ljjMMoc9AFZpN ScF60xcEIr2KnUNmyUkXSJ/pItOhFXX9NQ9uMZtM8eonv4oWNozFXI+I+PfIGh7+e+gq Zej7wGe/TjHZPg54cyqE2EQWba43Mub60FgKjz3ARDY5ymHKeyxcVGyD5LIqsqcQLz61 4wXqvQ2TRl4ZF6lEXS2YGpQA9FNT0v4SpJQlFjy6eesPyHq0VSWBd8Ru7HxDqbz6wqHp SzvTeVw3TeH0eG8Xml5mfnlcuFZnBAoMbkm1K3Nzegxt/zZYjKfabkolC49TfGh11pl6 zuYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=VwMkGfYrczoT5UC7Q2IMcaUlV/rVQBcUruupNeEXsUY=; b=E6LxD8BQR90UWBHNGg4EoUFaUKZbgHTTBx6St5IREvchFgq/puhPMH8Y9v3qN63qYV oqPWwlAv6CoygZPGS48ceEKe9LHVyk2yME+9ib2jZhTjZpMcG0Fj44Zrz8ICKvEdnmPd Y9lbi0nDU3nKTdsdbzTgF5NWjDAOc2XWb1R1U2jNCN0ECRtR6uSxUMDzN67k+7w+KGbz xZY73vLcfunhTIuPtbYjoydbUfr/W6meO/SIlmgH3eEKIwhMc8FDVrEFBVYVtrG/c1Zg yALCMS2JfeU+5UiySg0OFO3RBO/9oIwo+S/rtizAQdJ0B7Vgr9xv0SjOn23Zy9YiPxSd xTlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=ADfvVneU; 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 e8-20020a17090a9a8800b0020053614bd0si125800pjp.148.2022.11.28.16.24.40; Mon, 28 Nov 2022 16:24:51 -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=@dabbelt-com.20210112.gappssmtp.com header.s=20210112 header.b=ADfvVneU; 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 S234765AbiK1Xia (ORCPT + 83 others); Mon, 28 Nov 2022 18:38:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234764AbiK1XiP (ORCPT ); Mon, 28 Nov 2022 18:38:15 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57DC560D8 for ; Mon, 28 Nov 2022 15:38:14 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id q12so7972762pfn.10 for ; Mon, 28 Nov 2022 15:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=VwMkGfYrczoT5UC7Q2IMcaUlV/rVQBcUruupNeEXsUY=; b=ADfvVneUt918f/bZRbOmHw0Lcwnvyt6F5cRCxrWm2cERkXdkAXkMibQUkLW32/0CPC xoiY4PVZj4K6AmDHv/oqDe9DRPZj3RFebAJ3KZi5JImqUysRWHq/qzQHsA+rXwDoXJjy nlHuX2YYEEqG4zbPue9trNucnVeo3dSqaqvgPiYB78L5+wb/zp6wj41+A5rrpwAyc7G7 WhGGdFSJDlkKtXbvzadzN/hyrzh1GblrzU6Lbw7pnGTxnOyubpVU0ZazlTR4YAPDqDBp TeUfh9u11OgkI5j+Lbe6ZhdDki8KMfooATNi2+5ls3HJbhPC68DTQyNbDP+aitoNLDvo fHAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VwMkGfYrczoT5UC7Q2IMcaUlV/rVQBcUruupNeEXsUY=; b=5L7nJEYMmQcjm+k0aKcpysidoef17HqPWMOlwKn6j1NQQZwyRraT/n8II42t703BAK z80U1qxZmxa2nO2IE4MiG+Q2XybW0ylglZbEUdT2OY6e6YwHY73wjFyGg8CNM8oNYbBU gJ9RDESBARrz9y4bk0y9768dXhkXuMulnaoTCJEGvCx7chQ0fO5aqTAuPNO8vO3YYs7O CI1tzwSiAB9ZNRirMtnSxsWbparWWcsyqnKxWWiRKLp9frRNIRsa+5Mp+c03+gu+gqV/ Fs7sQVSNyPZ/9HHtqdz87AO/GLfKtQHf3is63dIaF1nAEdxFUYfmofeqm+GvBjEZ7UtV kn3g== X-Gm-Message-State: ANoB5pmINPqQHy/44TnipMN+UtePvVp7BFhC35blGWc8hHf/f3qE9p+V C5bRb4c8kSuB6E5kM4noMEz12w== X-Received: by 2002:a63:4302:0:b0:439:3ca0:5a29 with SMTP id q2-20020a634302000000b004393ca05a29mr28673385pga.443.1669678693663; Mon, 28 Nov 2022 15:38:13 -0800 (PST) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id c200-20020a624ed1000000b00574d8d64560sm5730203pfb.175.2022.11.28.15.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 15:38:13 -0800 (PST) Date: Mon, 28 Nov 2022 15:38:13 -0800 (PST) X-Google-Original-Date: Mon, 28 Nov 2022 15:37:43 PST (-0800) Subject: Re: [PATCH] riscv: Fix NR_CPUS range conditions In-Reply-To: <20221128183559.5ei5fx4cl4mo3ioj@kamzik> CC: Conor Dooley , samuel@sholland.org, aou@eecs.berkeley.edu, apatel@ventanamicro.com, heinrich.schuchardt@canonical.com, Paul Walmsley , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org From: Palmer Dabbelt To: ajones@ventanamicro.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 Mon, 28 Nov 2022 10:35:59 PST (-0800), ajones@ventanamicro.com wrote: > 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 Thanks. This is on fixes, it's sort of jumping the queue (I've got a bunch of stuff still staged from last week, but thanksgiving screwed up the flow) but it's small enough it doesn't seem worth waiting. > >> >> > >> > 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