Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hdyQV-0001SM-7b for mharc-qemu-trivial@gnu.org; Thu, 20 Jun 2019 10:52:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39725) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdyQS-0001Ob-Oh for qemu-trivial@nongnu.org; Thu, 20 Jun 2019 10:52:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hdyQR-0004Jn-OE for qemu-trivial@nongnu.org; Thu, 20 Jun 2019 10:52:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hdyQ6-0003yB-IH; Thu, 20 Jun 2019 10:52:10 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 782D730B4A5E; Thu, 20 Jun 2019 14:52:09 +0000 (UTC) Received: from localhost (ovpn-116-76.gru2.redhat.com [10.97.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3E8E19C67; Thu, 20 Jun 2019 14:52:06 +0000 (UTC) Date: Thu, 20 Jun 2019 11:52:04 -0300 From: Eduardo Habkost To: Like Xu Cc: qemu-trivial@nongnu.org, Peter Maydell , qemu-devel@nongnu.org, "Dr . David Alan Gilbert" , Alistair Francis , Igor Mammedov Message-ID: <20190620145204.GB1542@habkost.net> References: <20190518205428.90532-1-like.xu@linux.intel.com> <20190518205428.90532-6-like.xu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190518205428.90532-6-like.xu@linux.intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 20 Jun 2019 14:52:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables with machine smp properties X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2019 14:52:34 -0000 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 > --- > 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 --- 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), -- 2.18.0.rc1.1.g3f1ff2140