Atish Patra
f1e58583b9
RISC-V: Support cpu hotplug
...
This patch enable support for cpu hotplug in RISC-V. It uses SBI HSM
extension to online/offline any hart. As a result, the harts are
returned to firmware once they are offline. If the harts are brought
online afterwards, they re-enter Linux kernel as if a secondary hart
booted for the first time. All booting requirements are honored during
this process.
Tested both on QEMU and HighFive Unleashed board with. Test result follows.
---------------------------------------------------
Offline cpu 2
---------------------------------------------------
$ echo 0 > /sys/devices/system/cpu/cpu2/online
[ 32.828684] CPU2: off
$ cat /proc/cpuinfo
processor : 0
hart : 0
isa : rv64imafdcsu
mmu : sv48
processor : 1
hart : 1
isa : rv64imafdcsu
mmu : sv48
processor : 3
hart : 3
isa : rv64imafdcsu
mmu : sv48
processor : 4
hart : 4
isa : rv64imafdcsu
mmu : sv48
processor : 5
hart : 5
isa : rv64imafdcsu
mmu : sv48
processor : 6
hart : 6
isa : rv64imafdcsu
mmu : sv48
processor : 7
hart : 7
isa : rv64imafdcsu
mmu : sv48
---------------------------------------------------
online cpu 2
---------------------------------------------------
$ echo 1 > /sys/devices/system/cpu/cpu2/online
$ cat /proc/cpuinfo
processor : 0
hart : 0
isa : rv64imafdcsu
mmu : sv48
processor : 1
hart : 1
isa : rv64imafdcsu
mmu : sv48
processor : 2
hart : 2
isa : rv64imafdcsu
mmu : sv48
processor : 3
hart : 3
isa : rv64imafdcsu
mmu : sv48
processor : 4
hart : 4
isa : rv64imafdcsu
mmu : sv48
processor : 5
hart : 5
isa : rv64imafdcsu
mmu : sv48
processor : 6
hart : 6
isa : rv64imafdcsu
mmu : sv48
processor : 7
hart : 7
isa : rv64imafdcsu
mmu : sv48
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
2020-03-31 11:28:30 -07:00
..
2020-01-18 19:13:41 -08:00
2019-10-01 13:16:40 -07:00
2019-06-03 12:32:56 +02:00
2019-06-19 17:09:07 +02:00
2019-06-17 10:34:03 -07:00
2020-03-26 09:24:49 -07:00
2019-11-17 15:17:39 -08:00
2020-03-03 10:28:10 -08:00
2019-11-17 15:17:39 -08:00
2019-06-05 17:36:37 +02:00
2020-03-31 11:28:30 -07:00
2020-02-18 09:41:24 -08:00
2020-03-03 10:28:13 -08:00
2019-06-05 17:36:37 +02:00
2019-11-17 15:17:39 -08:00
2018-04-02 19:59:43 -07:00
2020-03-26 09:24:52 -07:00
2019-11-12 12:04:52 -08:00
2019-11-22 18:59:09 -08:00
2019-07-03 15:23:38 -07:00
2019-11-12 12:04:52 -08:00
2019-12-19 09:32:45 -07:00
2019-11-17 15:17:39 -08:00
2019-10-28 00:46:01 -07:00
2019-11-05 09:20:42 -08:00
2020-03-26 09:29:53 -07:00
2020-02-04 11:38:59 +01:00
2019-11-12 12:04:52 -08:00
2019-06-05 17:36:37 +02:00
2019-11-28 10:57:12 -08:00
2019-11-12 12:04:52 -08:00
2019-06-05 17:36:37 +02:00
2019-11-17 15:17:39 -08:00
2019-01-07 08:19:20 -08:00
2020-01-23 10:40:06 -08:00
2020-03-26 09:24:52 -07:00
2019-11-12 12:04:52 -08:00
2019-12-19 16:03:31 +01:00
2019-11-17 15:17:39 -08:00
2019-06-05 17:36:37 +02:00
2020-02-04 03:05:24 +00:00
2019-06-05 17:36:37 +02:00
2020-03-26 09:29:49 -07:00
2019-11-05 09:20:42 -08:00
2020-03-26 09:29:49 -07:00
2019-11-05 09:20:42 -08:00
2020-03-31 11:26:05 -07:00
2019-10-29 11:32:10 -07:00
2020-03-26 09:24:45 -07:00
2020-03-31 11:28:30 -07:00
2019-11-12 12:04:52 -08:00
2019-11-12 12:04:52 -08:00
2019-06-05 17:36:37 +02:00
2020-01-22 13:09:58 -08:00
2019-11-05 09:20:42 -08:00
2019-06-05 17:36:37 +02:00
2019-10-29 11:32:10 -07:00
2019-11-13 14:10:40 -08:00
2019-06-05 17:36:37 +02:00
2019-11-17 15:17:39 -08:00
2019-11-17 15:17:39 -08:00
2019-06-05 17:36:37 +02:00
2019-06-19 17:09:07 +02:00
2019-12-10 10:12:55 +01:00
2019-06-05 17:36:37 +02:00