]> git.proxmox.com Git - mirror_qemu.git/commit - hw/riscv/virt.c
riscv: virt: Add cpu-topology DT node.
authorAtish Patra <atish.patra@wdc.com>
Mon, 24 Jun 2019 23:41:44 +0000 (16:41 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Wed, 26 Jun 2019 05:37:08 +0000 (22:37 -0700)
commit28a4df979a2ef92d9129886cd9dcb00c497ac4cb
tree591e4d86400c67055dd20ee0a8e6eb8016555215
parentab433cccadb9f8e73bc3350273b049377d54d083
riscv: virt: Add cpu-topology DT node.

Currently, there is no cpu topology defined in RISC-V.
Define a device tree node that clearly describes the
entire topology. This saves the trouble of scanning individual
cache to figure out the topology.

Here is the linux kernel patch series that enables topology
for RISC-V.

http://lists.infradead.org/pipermail/linux-riscv/2019-June/005072.html

CPU topology after applying this patch in QEMU & above series in kernel

/ # cat /sys/devices/system/cpu/cpu2/topology/thread_siblings_list
2
/ # cat /sys/devices/system/cpu/cpu2/topology/physical_package_id
0
/ # cat /sys/devices/system/cpu/cpu2/topology/core_siblings_list
0-7

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
hw/riscv/virt.c