Skip to content

Conversation

@anchao
Copy link
Contributor

@anchao anchao commented Apr 24, 2024

Summary

arch/risc-v: decouple Per-CPU scratch with ARCH_USE_S_MODE

In some special chipsets, multiple CPUs may be bundled in one hardware thread cluster, which results in hartid and cpuindex not being exactly the same. The new option will decouple Scratch-based Per-CPU storage with S-Mode to distinguish the real cpu index.

Impact

N/A

Testing

rv-virt/smp64

In some special chipsets, multiple CPUs may be bundled in one hardware
thread cluster, which results in hartid and cpuindex not being exactly
the same. The new option will decouple Scratch-based Per-CPU storage
with S-Mode to distinguish the real cpu index.

Signed-off-by: chao an <anchao@lixiang.com>
@acassis acassis merged commit a51ebea into apache:master Apr 25, 2024
@masayuki2009
Copy link
Contributor

@anchao
I noticed that rv-virt:knsh32 and rv-virt:knsh64 crash.

/home/ishikawa/opensource/QEMU/qemu-8.2.0/build/qemu-system-riscv32 -semihosting -nographic -cpu rv32 -M virt,aclint=on -bios none -kernel nuttx
[    0.000000] irq_unexpected_isr: ERROR irq: 5

Did you test the configurations?

@anchao
Copy link
Contributor Author

anchao commented Apr 26, 2024

Did you test the configurations?

@masayuki2009 Sorry for the regression, my local code base is a bit old and differences with the mainline. I submitted a pull request to resolve this issue, thank you. #12236

pussuw added a commit to tiiuae/nuttx that referenced this pull request Aug 1, 2024
Fixes regression from apache#12220

Error: chip/k230_start.c:80:13: error: 'k230_copy_init_data' defined but not used [-Werror=unused-function]
   80 | static void k230_copy_init_data(void)
      |             ^~~~~~~~~~~~~~~~~~~
xiaoxiang781216 pushed a commit that referenced this pull request Aug 1, 2024
Fixes regression from #12220

Error: chip/k230_start.c:80:13: error: 'k230_copy_init_data' defined but not used [-Werror=unused-function]
   80 | static void k230_copy_init_data(void)
      |             ^~~~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants