You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch enable support for cpu hotplug in RISC-V.
In absensece of generic cpu stop functions, WFI is used
to put the cpu in low power state during offline. An IPI
is sent to bring it out of WFI during online operation.
Tested both on QEMU and HighFive Unleashed board with
4 cpus. Test result follows.
$ echo 0 > /sys/devices/system/cpu/cpu2/online
[ 31.828562] CPU2: shutdown
$ cat /proc/cpuinfo
hart : 1
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
hart : 3
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
hart : 4
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
$ echo 0 > /sys/devices/system/cpu/cpu4/online
[ 52.968495] CPU4: shutdown
$ cat /proc/cpuinfo
hart : 1
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
hart : 3
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
$ echo 1 > /sys/devices/system/cpu/cpu4/online
[ 64.298250] CPU4: online
$ cat /proc/cpuinfo
hart : 1
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
hart : 3
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
hart : 4
isa : rv64imafdc
mmu : sv39
uarch : sifive,rocket0
Signed-off-by: Atish Patra <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
0 commit comments