#1140651 linux: CONFIG_NR_CPUS=64 too small for 80-core RISC-V hardware

Package:
linux
Source:
linux
Submitter:
Lufei Zheng
Date:
2026-06-27 14:37:08 UTC
Severity:
normal
Tags:
#1140651#5
Date:
2026-06-24 06:07:58 UTC
From:
To:
Dear Maintainer,

The riscv64 kernel is built with CONFIG_NR_CPUS=64. On hardware with more than 64 harts, the excess CPUs are silently lost at boot.

Hardware:

  Board:   SpacemiT V100 (C2201MB1)
  Vendor:  SpacemiT (mvendorid=0x710)
  marchid: 0x8000000058000002
  mimpid:  0x4c4d900
  Arch:    riscv64, MMU sv48
  ISA:     rv64imafdcvh_zicbom_zicboz_zicntr_zicond_zicsr_zifencei
             _zihintntl_zihintpause_zihpm_zimop_zawrs_zfa_zfh_zfhmin
             _zca_zcb_zcd_zcmop_zba_zbb_zbc_zbs_zkt_zvbb_zvbc_zve32f
             _zve32x_zve64d_zve64f_zve64x_zvfh_zvfhmin_zvkb_zvkg
             _zvkned_zvknhb_zvksed_zvksh_zvkt_smaia_smstateen_ssaia
             _sscofpmf_sstc_svinval_svnapot_svpbmt
  Physical harts: 80 (hart IDs 0-39, 64-87)

Observed behaviour:

    $ nproc --all
    64

    $ cat /sys/devices/system/cpu/possible
    0-63

  16 harts are silently dropped at boot. The kernel only sees 64 CPUs.

  Boot messages:

    [    0.000000] NR_CPUS is too small for the number of ACPI tables.

  This message is repeated 16 times.

  Kernel config:

    CONFIG_SMP=y
    CONFIG_NR_CPUS=64

  Expected behaviour:

  All 80 harts should be usable. CONFIG_NR_CPUS should be raised to at least 256 for riscv64, matching the arm64 default.

Suggested fix:

In debian/config/riscv64/config, change:

    CONFIG_NR_CPUS=64

  to:

    CONFIG_NR_CPUS=256

  Workaround:

  None without recompiling the kernel.

  Thanks,
  Lufei


This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not an intended recipient of this message, please delete it and any attachment from your system and notify the sender immediately by reply e-mail. Unintended recipients should not use, copy, disclose or take any action based on this message or any information contained in this message. Emails cannot be guaranteed to be secure or error free as they can be intercepted, amended, lost or destroyed, and you should take full responsibility for security checking.

本邮件及其任何附件具有保密性质,并可能受其他保护或不允许被披露给第三方。如阁下误收到本邮件,敬请立即以回复电子邮件的方式通知发件人,并将本邮件及其任何附件从阁下系统中予以删除。如阁下并非本邮件写明之收件人,敬请切勿使用、复制、披露本邮件或其任何内容,亦请切勿依本邮件或其任何内容而采取任何行动。电子邮件无法保证是一种安全和不会出现任何差错的通信方式,可能会被拦截、修改、丢失或损坏,收件人需自行负责做好安全检查。

#1140651#10
Date:
2026-06-24 17:29:56 UTC
From:
To:
Hi,

No, this can't be changed as you say, because the value is not defined
here, instead the upstream default is used. Sure we can override it in
that file, but it would be way better if we can keep using the upstream
default.

A MR has been submitted to change the value in the Debian kernel [1] (to
128  instead of 256), but before doing that the default value change
should be submitted
upstream.

Regards
Aurelien

[1] https://salsa.debian.org/kernel-team/linux/-/merge_requests/1995

#1140651#19
Date:
2026-06-27 14:34:49 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
linux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1140651@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <carnil@debian.org> (supplier of updated linux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 27 Jun 2026 16:14:29 +0200
Source: linux
Architecture: source
Version: 7.1.2-1~exp1
Distribution: experimental
Urgency: medium
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Changed-By: Salvatore Bonaccorso <carnil@debian.org>
Closes: 1140651
Changes:
 linux (7.1.2-1~exp1) experimental; urgency=medium
 .
   * New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v7.x/ChangeLog-7.1.2
     - io_uring/net: Avoid msghdr on op_connect/op_bind async data
     - fuse: re-lock request before replacing page cache folio
     - Revert "NFSD: Defer sub-object cleanup in export put callbacks"
     - [amd64] agp/amd64: Fix broken error propagation in agp_amd64_probe()
     - iio: light: veml6075: add bounds check to veml6075_it_ms index
     - iio: adc: ti-ads1298: add bounds check to pga_settings index
     - [amd64] crypto: qat - remove unused character device and IOCTLs
     - vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent
       vcs_write
     - [arm64] serial: qcom_geni: Fix RX DMA stall when SE_DMA_RX_LEN_IN is zero
     - serial: 8250_dw: unregister 8250 port if clk_notifier_register() fails
     - drivers/base/memory: set mem->altmap after successful device registration
     - ksmbd: reject non-VALID session in compound request branch
     - virtiofs: fix UAF on submount umount
 .
   [ Han Gao ]
   * [riscv64] set NR_CPUS to 128 (Closes: #1140651)
Checksums-Sha1:
 9c7a701def608555b861128813a2c5fc6461b59d 183274 linux_7.1.2-1~exp1.dsc
 4228889db8648db61307a0073b537c78ce1b995c 161563732 linux_7.1.2.orig.tar.xz
 846314cb52e02e97437fba4afb75831f103e8fcc 1466728 linux_7.1.2-1~exp1.debian.tar.xz
 757c6773ddd826f546a232c1cbaf6d7921151b95 6945 linux_7.1.2-1~exp1_source.buildinfo
Checksums-Sha256:
 180d4d354330e5cc3aa16f5bba014820ba2d2bd108b12adf11e81172f002d7c0 183274 linux_7.1.2-1~exp1.dsc
 3c77fa02c2242381ea5534ec981329453b2ef69771d1a3e56fb2e152caa81af8 161563732 linux_7.1.2.orig.tar.xz
 ad7c38b1b5574fe0eb56b6a5d60a5cd5315f6b03d79d32d6daede159d09bb17e 1466728 linux_7.1.2-1~exp1.debian.tar.xz
 c813a7e1827670d4af6c11514556304d24d7821bc4037840041e59c32970ea21 6945 linux_7.1.2-1~exp1_source.buildinfo
Files:
 76968af30ccae95f5ed524999c99d49a 183274 kernel optional linux_7.1.2-1~exp1.dsc
 987db7cc2e001664a54fdf273dbfe1ea 161563732 kernel optional linux_7.1.2.orig.tar.xz
 c9747a5d18c92d5a656d53f215d61547 1466728 kernel optional linux_7.1.2-1~exp1.debian.tar.xz
 0138b4296f10750b0cdcf4562ef6bb91 6945 kernel optional linux_7.1.2-1~exp1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAmo/22FfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89Egy0QAKA316sMj9pGSN0u2Y+Usyob29sXqI0c
3ypkJ+XohpbQSPs4WKHe3ut/CptnHh+ncfYrYVF+7dBjhP1hiCQx43gwd8OncpXn
DEg5XKFtVVQ9nbC7tDxRrieL5GAxdItNK9+ykDYcMUEa2dYgHEUtixJUV14tskTz
jjX+lpyhhSbzisWdTcGs1cvI4esyyrk4t6KcYEn/4aVyrMej5DiOjf1VLeplHZC8
E3iEW/16gcEPW7whc7DzP6m6cSGOhpWx/4ozR0vjNd4XymChMliy2y6qSqmOMjTW
sKum9NOM0ePMWnVSBlmLT/0AutBrEGIWLOCmxkg9OBwU3z07x87sHwGCPwnsVM3v
2Qv1KhdAXgXmeWEgfGDwylitwYinsPwm3SNfuIzltwPPlS+PYuvtV87iMpQv02p+
HGk+PAS5dlugSEbOjDR/xybotF0U6JldVfZR5LUP1sW+4W3jr7BhhoOL8JMdlkeK
iMLP91YwmTDtPLQkyOuQk7zx2n2NOEPHyjQcN7+aKjhSvPvP9GWeAP6xrzOlB1zq
FbEz60uuHw2NjsKPcjXEUfGFqzJkMkeg86cm1fhUDHAy0Z4cDZPTThyafARdF/F+
bPBHmWra8ZsrR0ccCAUhTt3GwyAyEJQe3m3mq+A9qQfkfIAyI92Yd/bm5ENSXs2K
Nytw56s6Me4O
=NcSd
-----END PGP SIGNATURE-----