qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables


From: Like Xu
Subject: Re: [Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables with machine smp properties
Date: Fri, 21 Jun 2019 08:53:15 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 2019/6/20 22:52, Eduardo Habkost wrote:
On Sun, May 19, 2019 at 04:54:23AM +0800, Like Xu wrote:
The global smp variables in riscv are replaced with smp machine properties.

A local variable of the same name would be introduced in the declaration
phase if it's used widely in the context OR replace it on the spot if it's
only used once. No semantic changes.

Signed-off-by: Like Xu <address@hidden>
---
  hw/riscv/sifive_e.c    | 6 ++++--
  hw/riscv/sifive_plic.c | 3 +++
  hw/riscv/sifive_u.c    | 6 ++++--
  hw/riscv/spike.c       | 2 ++
  hw/riscv/virt.c        | 1 +
  5 files changed, 14 insertions(+), 4 deletions(-)

This was incomplete, I had to apply the following fixup.

Signed-off-by: Eduardo Habkost <address@hidden>

Reviewed-by: Like Xu <address@hidden>

---
  hw/riscv/spike.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c
index 9e95f2c13c..d91d49dcae 100644
--- a/hw/riscv/spike.c
+++ b/hw/riscv/spike.c
@@ -172,6 +172,7 @@ static void spike_board_init(MachineState *machine)
      MemoryRegion *main_mem = g_new(MemoryRegion, 1);
      MemoryRegion *mask_rom = g_new(MemoryRegion, 1);
      int i;
+    unsigned int smp_cpus = machine->smp.cpus;
/* Initialize SOC */
      object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),





reply via email to

[Prev in Thread] Current Thread [Next in Thread]