Package: linux
Version: 6.12.86-1
Severity: important

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

Reply via email to