From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx4W1-0002Z3-Sc for qemu-devel@nongnu.org; Mon, 25 May 2015 22:22:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx4Vy-0004q5-MV for qemu-devel@nongnu.org; Mon, 25 May 2015 22:22:49 -0400 From: David Gibson Date: Tue, 26 May 2015 12:22:58 +1000 Message-Id: <1432606979-28556-4-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1432606979-28556-1-git-send-email-david@gibson.dropbear.id.au> References: <1432606979-28556-1-git-send-email-david@gibson.dropbear.id.au> Subject: [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: agraf@suse.de, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Cc: lvivier@redhat.com, thuth@redhat.com, mdroth@linux.vnet.ibm.com, bharata@linux.vnet.ibm.com, afaerber@suse.de, David Gibson 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; -- 2.1.0