From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bykdh-0005vn-UH for qemu-devel@nongnu.org; Mon, 24 Oct 2016 15:10:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bykde-0000qp-0q for qemu-devel@nongnu.org; Mon, 24 Oct 2016 15:10:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55701) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bykdd-0000q2-QH for qemu-devel@nongnu.org; Mon, 24 Oct 2016 15:10:25 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9OJ9K9f014527 for ; Mon, 24 Oct 2016 15:10:24 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 269muq0vvm-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 24 Oct 2016 15:10:24 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 24 Oct 2016 15:10:22 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <1477285483-10766-3-git-send-email-david@gibson.dropbear.id.au> References: <1477285483-10766-1-git-send-email-david@gibson.dropbear.id.au> <1477285483-10766-3-git-send-email-david@gibson.dropbear.id.au> Date: Mon, 24 Oct 2016 14:06:23 -0500 Message-Id: <20161024190623.17113.32661@loki> Subject: Re: [Qemu-devel] [PATCHv3 02/12] pseries: Remove rtas_addr and fdt_addr fields from machinestate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , aik@ozlabs.ru, groug@kaod.org Cc: agraf@suse.de, lvivier@redhat.com, thuth@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Quoting David Gibson (2016-10-24 00:04:33) > These values are used only within ppc_spapr_reset(), so just change them > to local variables. > = > Signed-off-by: David Gibson > Reviewed-by: Thomas Huth > Reviewed-by: Alexey Kardashevskiy Reviewed-by: Michael Roth > --- > hw/ppc/spapr.c | 14 +++++++------- > include/hw/ppc/spapr.h | 1 - > 2 files changed, 7 insertions(+), 8 deletions(-) > = > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 0864411..2c1c7ff 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1135,6 +1135,7 @@ static void ppc_spapr_reset(void) > sPAPRMachineState *spapr =3D SPAPR_MACHINE(machine); > PowerPCCPU *first_ppc_cpu; > uint32_t rtas_limit; > + hwaddr rtas_addr, fdt_addr; > void *fdt; > int rc; > = > @@ -1160,14 +1161,13 @@ static void ppc_spapr_reset(void) > * processed with 32-bit real mode code if necessary > */ > rtas_limit =3D MIN(spapr->rma_size, RTAS_MAX_ADDR); > - spapr->rtas_addr =3D rtas_limit - RTAS_MAX_SIZE; > - spapr->fdt_addr =3D spapr->rtas_addr - FDT_MAX_SIZE; > + rtas_addr =3D rtas_limit - RTAS_MAX_SIZE; > + fdt_addr =3D rtas_addr - FDT_MAX_SIZE; > = > - fdt =3D spapr_build_fdt(spapr, spapr->rtas_addr, spapr->rtas_size); > + fdt =3D spapr_build_fdt(spapr, rtas_addr, spapr->rtas_size); > = > /* Copy RTAS over */ > - cpu_physical_memory_write(spapr->rtas_addr, spapr->rtas_blob, > - spapr->rtas_size); > + cpu_physical_memory_write(rtas_addr, spapr->rtas_blob, spapr->rtas_s= ize); > = > rc =3D fdt_pack(fdt); > = > @@ -1182,12 +1182,12 @@ static void ppc_spapr_reset(void) > = > /* Load the fdt */ > qemu_fdt_dumpdtb(fdt, fdt_totalsize(fdt)); > - cpu_physical_memory_write(spapr->fdt_addr, fdt, fdt_totalsize(fdt)); > + cpu_physical_memory_write(fdt_addr, fdt, fdt_totalsize(fdt)); > g_free(fdt); > = > /* Set up the entry state */ > first_ppc_cpu =3D POWERPC_CPU(first_cpu); > - first_ppc_cpu->env.gpr[3] =3D spapr->fdt_addr; > + first_ppc_cpu->env.gpr[3] =3D fdt_addr; > first_ppc_cpu->env.gpr[5] =3D 0; > first_cpu->halted =3D 0; > first_ppc_cpu->env.nip =3D SPAPR_ENTRY_POINT; > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h > index aeaba3e..1174741 100644 > --- a/include/hw/ppc/spapr.h > +++ b/include/hw/ppc/spapr.h > @@ -63,7 +63,6 @@ struct sPAPRMachineState { > uint32_t htab_shift; > hwaddr rma_size; > int vrma_adjust; > - hwaddr fdt_addr, rtas_addr; > ssize_t rtas_size; > void *rtas_blob; > void *fdt_skel; > -- = > 2.7.4 >=20