Skip to content

[libcpu][risc-v] skip disabled CPU nodes in early FDT walk - #1

Merged
GuEe-GUI merged 1 commit into
GuEe-GUI:next_riscvfrom
cms19859230182-lang:fix/pr10320-skip-disabled-cpu
Oct 16, 2026
Merged

GuEe-GUI merged 1 commit into
GuEe-GUI:next_riscvfrom
cms19859230182-lang:fix/pr10320-skip-disabled-cpu

Conversation

@cms19859230182-lang

Copy link
Copy Markdown

背景

针对 RT-Thread/rt-thread#10320 上 @Rbb666 的评审意见:

当前遍历没有检查 CPU 节点的 status,禁用节点仍会参与 hart 注册和 MMU 能力判定

改动

在 libcpu/risc-v/common/setup.c 的 rt_hw_fdt_install_early() 中,遍历 /cpus 子节点时先用 rt_fdt_device_is_available() 跳过 status=disabled(以及其它非 okay/ok)的 CPU 节点,再读取 reg / mmu-type。

说明

本 PR 对着 GuEe-GUI:next_riscv。合并后会自动进入上游 RT-Thread#10320。

Rbb666 noted that rt_hw_fdt_install_early() walked every /cpus child
without checking status, so disabled cores still joined hart registration
and MMU capability probing. Skip nodes that are not okay/ok via
rt_fdt_device_is_available() before reading reg or mmu-type.

Signed-off-by: seteiro <chenmoushun@163.com>
@GuEe-GUI
GuEe-GUI merged commit b73bbd3 into GuEe-GUI:next_riscv Oct 16, 2026
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.

2 participants