All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] fix the way riscv_plic_hart_config_string() gets the CPUState
@ 2025-04-16  5:17 Chao Liu
  2025-04-16  5:17 ` [PATCH v3 1/1] hw/riscv: fix PLIC hart topology configuration string when not getting CPUState correctly Chao Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Chao Liu @ 2025-04-16  5:17 UTC (permalink / raw)
  To: palmer, alistair23
  Cc: zhiwei_liu, alistair.francis, dbarboza, liwei1518, zhangtj,
	zqz00548, lc00631, qemu-devel, qemu-riscv

Hi, all:

PATCH v3:

Use cpu_by_arch_id() instead of qemu_get_cpu(), when registering gpio in
sifive_plic_create().

PATCH v2:

During plic initialization, CPUSate is obtained by traversing qemu_get_cpu(),
which was an early design flaw (see PATCH v1 reviewed).

A better approach is to use riscv's hartid for indexing via the cpu_by_arch_id()
interface.

PATCH v1 (Reviewed):
https://lore.kernel.org/qemu-riscv/416e68f4-bf12-4218-ae2d-0246cc8ea8ec@linaro.org/T/#u

--
Regards,
Chao


Chao Liu (1):
  hw/riscv: fix PLIC hart topology configuration string when not getting
    CPUState correctly

 hw/intc/sifive_plic.c      | 4 ++--
 hw/riscv/boot.c            | 4 ++--
 hw/riscv/microchip_pfsoc.c | 2 +-
 hw/riscv/sifive_u.c        | 5 +++--
 hw/riscv/virt.c            | 2 +-
 include/hw/riscv/boot.h    | 2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-22  1:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  5:17 [PATCH v3 0/1] fix the way riscv_plic_hart_config_string() gets the CPUState Chao Liu
2025-04-16  5:17 ` [PATCH v3 1/1] hw/riscv: fix PLIC hart topology configuration string when not getting CPUState correctly Chao Liu
2025-05-22  1:27   ` Alistair Francis
2025-05-22  1:29   ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.