Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp897685pxb; Fri, 22 Apr 2022 13:44:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsWPyoBsGqy3nkjvY/RNgE2xojuZ92H4buPxO2iyYyl4LTocLq3U/2cYJ1mYcE/y4UAqBF X-Received: by 2002:a17:902:7610:b0:158:89a5:fc5a with SMTP id k16-20020a170902761000b0015889a5fc5amr6380285pll.116.1650660284738; Fri, 22 Apr 2022 13:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660284; cv=none; d=google.com; s=arc-20160816; b=W3Nymw7q4861yKq05jmc+wcrbwE89eqALdhAwaRcVPxyYNRsR2NK5yDeY4FIgulG5y l548ewqA7wofBeONwN13J6KTxqHuB7T5ySOm+3KTldpSnEpN+N5pkVGXA4bnJdQ+5Mko FmGXg7MF/iNqVaS7p639piKgSwF11WPU9KZboJZQ+lN+tUHyUrcn3lztbhq+AYFvMj0t TjjSNHMgAHkK3F2NzSnSa7o2oJoaLIZRwPyKOxrC/rN8uzhiCq0+ZwGKVqRuzcY16zl4 hcHO4S1oOsF3cIm0gQsWG0OCovUw1uOZT5rxS9yfizmKBp7rlNpL8PfcP5R+zQ6X8N2m La9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=6HdSC5MBPOMufV6HBiKEeWBhFc9GPRC0t6FN09g0Ni0=; b=nCKMPyZyYgNc17U7tdOUpHfUegclaGSzfqEHWUJqKaiHMQahMeuuaEenj6lbMeYAn4 w/XSJUR8lj+4gW4iHDTw3ypFHIOsq2fV683iQCCNobYdUliehZ8cTVPcHc1cJd7EOvYI FopiGHqm+yIDrXmSYz/dMHHgIa8wWEUyssaAXrRv0B8t8N7Et7iTR2KHhITqyb2+kC1b zxR3CpF57f/2hko1X0UTc8UycHA0MEbStwee/dbbXOzcDUFeKmW//ivDQ8E9PxFc73uK kD+85KFlO6UbaOlmSeDTIoBnx/bwcuhtdf9R0XCQ6ndGLaHGr/Cmn59E0dEMhZ6DmhFa HKbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Cw2hKVUc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t29-20020a056a00139d00b004fe4e23e4f9si2807655pfg.262.2022.04.22.13.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:44:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Cw2hKVUc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4829ADF6D; Fri, 22 Apr 2022 12:32:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385552AbiDUHH4 (ORCPT + 99 others); Thu, 21 Apr 2022 03:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385553AbiDUHHr (ORCPT ); Thu, 21 Apr 2022 03:07:47 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5FB2AF3 for ; Thu, 21 Apr 2022 00:04:58 -0700 (PDT) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A4BEA3F1AE for ; Thu, 21 Apr 2022 07:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1650524697; bh=6HdSC5MBPOMufV6HBiKEeWBhFc9GPRC0t6FN09g0Ni0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Cw2hKVUc6XGwBB+Gjih/0VWVNIVc7Dp0qKge0i9JpzERau/+WbW88f6qq58S2RJlD 3qjXktxUjy4B2y60soDW/Kkm1I8bU2kHWTAYO0F69gAIN3Mk44KWa/kF5CVwulr1Et FJfPUQ/jqGSBAqCj8ClZAzT9Ln3uI8qBQ8JMRWCIrKOY6q3aw0VNcnWOI7mwC767/J JdnC0xjrZxEgeQedGIW3bEULykCJBPFYsPSxCeJ0Y/MdUg0RcKSit9bSuufsNWSh4H jl9EtmHZKmzej+6HXTvx6dW8k3iDYXkOIIsYltEM2o8RBXqKjgCBsoHyGyuvtltfaA p6krUlgwd9e5w== Received: by mail-ej1-f72.google.com with SMTP id gn13-20020a1709070d0d00b006efe23342c7so304941ejc.8 for ; Thu, 21 Apr 2022 00:04:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=6HdSC5MBPOMufV6HBiKEeWBhFc9GPRC0t6FN09g0Ni0=; b=MvX+qNYVEGIP5lZPYPkXArVKjB9yJoH56q0/JCp6ES873JLosTJ5iAD6SMimYzXm1e X1wdVVjl1nGxVIOo7Zk3l+MZ4odTC23e8MSqI9AujPBsOoI6FXZNXq57rAmuxHVlF+YP fHg5PYq1/FH388/2tL4WaDu6tNGLpy3vNmINI7NL+TlKkOibU+JI3WQ2NWGPMG+X9mjb NIOS3RlrIn1tH1Za4LgFfPKVS1o7liifD2Uc2+LYGS/Bw935VQa11wB/qcKM8oWpqddQ u42ESeue8i/hydY4xHgoiA9ADh8cWtFU+T0ttt2w9JCHD66ge3zmNe0LYNthwDZfZyct wnvg== X-Gm-Message-State: AOAM532T5rI0w8ny1Lp2TmkRM007EqlW2WvSoEYH/JJzpIEg0KBMZC+9 BbAPJ+GDqMED/K6AFP28VjiiK2yqgnUSv4pEkacI968aa+za4M7gh1yATxZvVmdV40lDnh2imPd ekRpc3fqZLtbC4eTnatSCxpOsa37wI3OZMq3sDVCIFQ== X-Received: by 2002:a17:906:5d04:b0:6db:7262:570e with SMTP id g4-20020a1709065d0400b006db7262570emr21773808ejt.8.1650524697233; Thu, 21 Apr 2022 00:04:57 -0700 (PDT) X-Received: by 2002:a17:906:5d04:b0:6db:7262:570e with SMTP id g4-20020a1709065d0400b006db7262570emr21773783ejt.8.1650524697000; Thu, 21 Apr 2022 00:04:57 -0700 (PDT) Received: from [192.168.123.94] (ip-088-152-144-107.um26.pools.vodafone-ip.de. [88.152.144.107]) by smtp.gmail.com with ESMTPSA id kb28-20020a1709070f9c00b006d5d8bf1b72sm7465162ejc.78.2022.04.21.00.04.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Apr 2022 00:04:56 -0700 (PDT) Message-ID: <3fa5215b-84c3-5e4c-cb53-6c05d05e4350@canonical.com> Date: Thu, 21 Apr 2022 09:04:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v3] RISC-V: Increase range and default value of NR_CPUS Content-Language: en-US To: Anup Patel , Palmer Dabbelt , Paul Walmsley Cc: Arnd Bergmann , Atish Patra , Alistair Francis , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220420112408.155561-1-apatel@ventanamicro.com> From: Heinrich Schuchardt In-Reply-To: <20220420112408.155561-1-apatel@ventanamicro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 4/20/22 13:24, 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 Reviewed-by: Heinrich Schuchardt > --- > 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"