From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9q1-0001Uw-U2 for qemu-devel@nongnu.org; Tue, 26 May 2015 04:03:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx9q0-0002Qx-L6 for qemu-devel@nongnu.org; Tue, 26 May 2015 04:03:49 -0400 Date: Tue, 26 May 2015 10:01:33 +0200 From: Thomas Huth Message-ID: <20150526100133.4c437950@thh440s> In-Reply-To: <1432606979-28556-4-git-send-email-david@gibson.dropbear.id.au> References: <1432606979-28556-1-git-send-email-david@gibson.dropbear.id.au> <1432606979-28556-4-git-send-email-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2 3/4] spapr: Remove obsolete entry_point field from sPAPRMachineState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: lvivier@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, afaerber@suse.de On Tue, 26 May 2015 12:22:58 +1000 David Gibson wrote: > The sPAPRMachineState structure includes an entry_point field containing > the initial PC value for starting the machine, even though this always has > the value 0x100. > > I think this is a hangover from very early versions which bypassed the > firmware when using -kernel. In any case it has no function now, so remove > it. > > Signed-off-by: David Gibson > --- > hw/ppc/spapr.c | 4 +--- > include/hw/ppc/spapr.h | 2 +- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 31b29d6..63877b9 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -932,7 +932,7 @@ static void ppc_spapr_reset(void) > first_ppc_cpu->env.gpr[3] = spapr->fdt_addr; > first_ppc_cpu->env.gpr[5] = 0; > first_cpu->halted = 0; > - first_ppc_cpu->env.nip = spapr->entry_point; > + first_ppc_cpu->env.nip = SPAPR_ENTRY_POINT; > > } > > @@ -1645,8 +1645,6 @@ static void ppc_spapr_init(MachineState *machine) > } > g_free(filename); > > - spapr->entry_point = 0x100; > - > /* FIXME: Should register things through the MachineState's qdev > * interface, this is a legacy from the sPAPREnvironment structure > * which predated MachineState but had a similar function */ > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h > index 9e7cf0f..785b094 100644 > --- a/include/hw/ppc/spapr.h > +++ b/include/hw/ppc/spapr.h > @@ -13,6 +13,7 @@ typedef struct sPAPRConfigureConnectorState sPAPRConfigureConnectorState; > typedef struct sPAPREventLogEntry sPAPREventLogEntry; > > #define HPTE64_V_HPTE_DIRTY 0x0000000000000040ULL > +#define SPAPR_ENTRY_POINT 0x100 > > typedef struct sPAPRMachineState sPAPRMachineState; > > @@ -41,7 +42,6 @@ struct sPAPRMachineState { > ssize_t rtas_size; > void *rtas_blob; > void *fdt_skel; > - target_ulong entry_point; > uint64_t rtc_offset; /* Now used only during incoming migration */ > struct PPCTimebase tb; > bool has_graphics; Reviewed-by: Thomas Huth