From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPsHM-0003Mu-A2 for qemu-devel@nongnu.org; Mon, 14 Nov 2011 03:52:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPsHL-0001CK-BW for qemu-devel@nongnu.org; Mon, 14 Nov 2011 03:52:36 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:36417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPsHL-000195-78 for qemu-devel@nongnu.org; Mon, 14 Nov 2011 03:52:35 -0500 Message-ID: <4EC0D6B5.3010203@adacore.com> Date: Mon, 14 Nov 2011 09:52:05 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <4EB85FD7.2050004@eagerm.com> <20111107230521.GC14307@zapo> In-Reply-To: <20111107230521.GC14307@zapo> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] clk_setup decl missing in virtex_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Michael Eager , qemu-devel On 08/11/2011 00:05, Edgar E. Iglesias wrote: > On Mon, Nov 07, 2011 at 02:46:47PM -0800, Michael Eager wrote: >> The declaration of clk_setup is missing in >> qemu/hw/virtex_ml507.c: >> >> static void virtex_init(ram_addr_t ram_size, >> const char *boot_device, >> const char *kernel_filename, >> const char *kernel_cmdline, >> const char *initrd_filename, const char *cpu_model) >> { >> ... >> >> ... >> memset(clk_setup, 0, sizeof(clk_setup)); >> >> This SEGVs because clk_setup is an inline function defined in ppc.h. >> (I presume that the linker generates an out-of-line copy.) >> >> It isn't clear what the declaration should be. In ppc405_uc.c, there >> is a decl: >> clk_setup_t clk_setup[PPC405EP_CLK_NB]; > > > Hi > > the following patch seems to work on my side. Fabien, could > you please see if this was your intention? It seems to be > commit ddd1055b07fdfe488a22c2275adaca75f4206d30 that > introduced the segfault. > That's right the memset should have been removed in my patch. Thanks, -- Fabien Chouteau