Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1he7oB-0002tU-Hr for mharc-qemu-trivial@gnu.org; Thu, 20 Jun 2019 20:53:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34623) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1he7o4-0002nX-QC for qemu-trivial@nongnu.org; Thu, 20 Jun 2019 20:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1he7o1-0004Pj-Td for qemu-trivial@nongnu.org; Thu, 20 Jun 2019 20:53:32 -0400 Received: from mga18.intel.com ([134.134.136.126]:42145) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1he7nv-00045F-96; Thu, 20 Jun 2019 20:53:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 17:53:18 -0700 X-IronPort-AV: E=Sophos;i="5.63,398,1557212400"; d="scan'208";a="154297615" Received: from likexu-mobl1.ccr.corp.intel.com (HELO [10.239.196.171]) ([10.239.196.171]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 20 Jun 2019 17:53:16 -0700 To: Eduardo Habkost Cc: Peter Maydell , qemu-trivial@nongnu.org, qemu-devel@nongnu.org, "Dr . David Alan Gilbert" , Alistair Francis , Igor Mammedov References: <20190518205428.90532-1-like.xu@linux.intel.com> <20190518205428.90532-6-like.xu@linux.intel.com> <20190620145204.GB1542@habkost.net> From: Like Xu Organization: Intel OTC Message-ID: 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 MIME-Version: 1.0 In-Reply-To: <20190620145204.GB1542@habkost.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.126 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: Fri, 21 Jun 2019 00:53:34 -0000 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 >> --- >> 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 Reviewed-by: Like Xu > --- > 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), >