Skip to content

【Backport】riscv支持cpu并行启动 #292

@uestc-gr

Description

@uestc-gr

kernel内核社区已经支持辅助 CPU 的并行启动(即 HOTPLUG_PARALLEL)。x86 和 MIPS 架构已经使用了 HOTPLUG_PARALLEL,ARM 也在朝这个方向推进。

在 RISC-V 上,辅助 CPU 的启动路径中没有访问架构特定的全局数据,因此为 RISC-V 启用 HOTPLUG_PARALLEL 只需要:提供 RISC-V 特定的 arch_cpuhp_kick_ap_alive() 函数,在 smp_callin() 中调用 cpuhp_ap_sync_alive()

本补丁已在以下环境进行原生测试:
OpenSBI 环境下的 QEMU RV64 virt 虚拟机(64 核心)

需合入的补丁列表
c0e81a4 cpu/hotplug: Make HOTPLUG_PARALLEL independent of HOTPLUG_SMT
2dce993 cpu/hotplug: Provide weak fallback for arch_cpuhp_init_parallel_bringup()
231fb99 RISC-V: Enable HOTPLUG_PARALLEL for secondary CPUs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions