Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2903984ioo; Tue, 24 May 2022 08:28:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFdvACa58xQciQ+ZZ2cLSS1zF2KwmpE62qzG0XD0M/peR+IHLnyBTxlbheh+3eusManD75 X-Received: by 2002:a63:1f19:0:b0:3fa:a552:bdf6 with SMTP id f25-20020a631f19000000b003faa552bdf6mr3515391pgf.334.1653406117115; Tue, 24 May 2022 08:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653406117; cv=none; d=google.com; s=arc-20160816; b=Cm7X+CT5lG/mTg/GB8Nsd8de6ARlOzI1D7at+uxdb1jmLFGjH5XKCJoHgX6FdGwhXD Bk1MQKVWNEF314sgmqsr/YL5btHp3pSpFhl7x7gxiQWXPUq5ePaY86l5IFrx0apdMAdj O+tzOepZgSgwqhssLc9j8MbCpgIkMpX0xuj62mfkoMlwO+5wHm+cAsHebQumqbpG9uD/ qoVonAaFI/HVZ2c2N/sOjoMBcCLHfguF9dFnHLs2EBQ3uXf0TQiihJzrLsKI24/Npsh9 I8kcp0zb3bQVkL3qBMHPa76k5RusNhhdFS8o97PLvqH9ykG9nQCtTaPwFVqG8YJWIlCT sEMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=B1kHWNn2FlYrScuJpDzEvYfxEoq+6pgVlJajpmZJO8Q=; b=o5TUjB3czCdICKXHGM2cdDbg051OzKn6h0OeQ0Fyz4e/KtL3Nx30qAtDDj39jdBmXl yClDhFfh1H39b+xi7SjD22QGDyJMCbOG7rE3iE71JVcFaFeBYkNpUW/wkTX2kLv9/CTY 2wpNxjGec4MqicGhF1VaXCb3vbrp10p9BI/UhYn5bMsDaCWWbPEGghKc9TNrquB5rBDX ApXNDOgB5OLVe0dediczOHhqW6o+OMkdilGVEJw0LzkBLEyl/N41Cf9XLfSLFcS7D347 +eLky79QqL0P+KtvG6AQpYpWKHG7QnosPUM4BvwPNr/jjJ+V5xutglWJkSFFeizJ1Ld6 EK7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=MitxO5no; 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 q7-20020a635047000000b003c62783c1c9si15449530pgl.397.2022.05.24.08.28.24; Tue, 24 May 2022 08:28:37 -0700 (PDT) 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=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=MitxO5no; 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 S237175AbiEXMIr (ORCPT + 99 others); Tue, 24 May 2022 08:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237170AbiEXMIm (ORCPT ); Tue, 24 May 2022 08:08:42 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE7C69732 for ; Tue, 24 May 2022 05:08:41 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id o9so2791542wmd.0 for ; Tue, 24 May 2022 05:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B1kHWNn2FlYrScuJpDzEvYfxEoq+6pgVlJajpmZJO8Q=; b=MitxO5noWfkkjrDtLTJi13ymJxmHezjD+E5DuEVPaVncx1oma+enD3jH1aVLkhwzkJ WdhemjXMo9QnDd93aMDo5dczJ+gAgCXTKvK9tITNSJlL3EXbOBNrPilYk9cilRodPtN2 exoqg6Mte3n0BWMUbvjN3CpXMDiyJeu+0LwBs3jA3AWr0iTJ9quRBpYLVwp3Qy3MVfE5 891W6liT9KNXxCx/9BOVZ+sS9plpdPcOGqglhZKvUIVP4vir7ldZ/lnawF9GayTEebzX Fv1tgUQE3asHoYQ2lcPQK7Xs76PjxyOSreGfpXpZGeFLNpmt2PE8l432dCQSkWRSelLV ppnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B1kHWNn2FlYrScuJpDzEvYfxEoq+6pgVlJajpmZJO8Q=; b=3nUsmTHmwChqXAjK+Z0EmyRDCGTwT6hOZYu3+Js1RmA0ADnt16RQuEjbCw5nO4wvsj ixI+yF/Yu6WxquW/oM1VQRMhJa5xFYPIK+HAifCfWUSR2Kt5eFSn/EY7CxWVIrtrTuDP trkuSaE2kIDGBYRObNtRh9uzyjhe04TcFq5mpyCr9b29cYpz/cOJBjeJ65gTqs89KAER lr3qJYCIdpjyUYXLacACH3R2ILnsCpLTEA3ktTe9JdPiJNNELEXdGtKwgk5zM55cpsAF rEBrFn/cVJjvM7Bkrc+rvaIWO3ho10sEu0Qvf8omuLZGzhT9wPb2O34zE/o/YkBY0Cas nHFw== X-Gm-Message-State: AOAM533QTYQcx5mqEXeH/vgxy8nQZUl2nWwFFqaQF/i25M0S3x7FHI0I LJyp/Klg6nwBXSMRC8lQ6rFc4wdsSAytyrTq2mSWhQ== X-Received: by 2002:a05:600c:1d28:b0:397:65ab:4b3e with SMTP id l40-20020a05600c1d2800b0039765ab4b3emr38103wms.137.1653394119857; Tue, 24 May 2022 05:08:39 -0700 (PDT) MIME-Version: 1.0 References: <20220420112408.155561-1-apatel@ventanamicro.com> In-Reply-To: <20220420112408.155561-1-apatel@ventanamicro.com> From: Anup Patel Date: Tue, 24 May 2022 17:38:28 +0530 Message-ID: Subject: Re: [PATCH v3] RISC-V: Increase range and default value of NR_CPUS To: Palmer Dabbelt Cc: Paul Walmsley , Arnd Bergmann , Atish Patra , Alistair Francis , Heinrich Schuchardt , linux-riscv , "linux-kernel@vger.kernel.org List" , Anup Patel Content-Type: text/plain; charset="UTF-8" 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_NONE, T_SCC_BODY_TEXT_LINE 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 Hi Palmer, On Wed, Apr 20, 2022 at 4:54 PM Anup Patel wrote: > > Currently, the range and default value of NR_CPUS is too restrictive > for high-end RISC-V systems with large number of HARTs. The latest > QEMU virt machine supports upto 512 CPUs so the current NR_CPUS is > restrictive for QEMU as well. Other major architectures (such as > ARM64, x86_64, MIPS, etc) have a much higher range and default > value of NR_CPUS. > > This patch increases NR_CPUS range to 2-512 and default value to > XLEN (i.e. 32 for RV32 and 64 for RV64). > > Signed-off-by: Anup Patel Can this PATCH be considered for 5.19 ? Thanks, Anup > --- > Changes since v2: > - Rebased on Linux-5.18-rc3 > - Use a different range when SBI v0.1 is enabled > Changes since v1: > - Updated NR_CPUS range to 2-512 which reflects maximum number of > CPUs supported by QEMU virt machine. > --- > arch/riscv/Kconfig | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 00fd9c548f26..1823f281069f 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -275,10 +275,13 @@ config SMP > If you don't know what to do here, say N. > > config NR_CPUS > - int "Maximum number of CPUs (2-32)" > - range 2 32 > + int "Maximum number of CPUs (2-512)" > depends on SMP > - default "8" > + range 2 512 if !SBI_V01 > + range 2 32 if SBI_V01 && 32BIT > + range 2 64 if SBI_V01 && 64BIT > + default "32" if 32BIT > + default "64" if 64BIT > > config HOTPLUG_CPU > bool "Support for hot-pluggable CPUs" > -- > 2.25.1 >