From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yg3TN-0004iD-UQ for qemu-devel@nongnu.org; Wed, 08 Apr 2015 23:49:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yg3TK-00049h-MU for qemu-devel@nongnu.org; Wed, 08 Apr 2015 23:49:45 -0400 Received: from mail-pd0-x22a.google.com ([2607:f8b0:400e:c02::22a]:35897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yg3TK-00049T-E4 for qemu-devel@nongnu.org; Wed, 08 Apr 2015 23:49:42 -0400 Received: by pdea3 with SMTP id a3so138062253pde.3 for ; Wed, 08 Apr 2015 20:49:41 -0700 (PDT) Date: Thu, 9 Apr 2015 13:47:23 +1000 From: "Edgar E. Iglesias" Message-ID: <20150409034723.GC15765@toto> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH for-2.3] cris: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dirk =?iso-8859-1?Q?M=FCller?= Cc: QEMU Developers On Sat, Apr 04, 2015 at 02:15:10PM +0200, Dirk Müller wrote: > Commit 0b183fc871:"memory: move mem_path handling to > memory_region_allocate_system_memory" split memory_region_init_ram and > memory_region_init_ram_from_file. Also it moved mem-path handling a step > up from memory_region_init_ram to memory_region_allocate_system_memory. > > Therefore for any board that uses memory_region_init_ram directly, > -mem-path is not supported. > > Fix this by replacing memory_region_init_ram with > memory_region_allocate_system_memory. > > Cc: Edgar E. Iglesias > Signed-off-by: Dirk Mueller > --- > hw/cris/axis_dev88.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Hi, A question, should this only be done for one of the memories? BTW, I'm having problems git am:ing this patch, not sure why... Cheers, Edgar > > diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c > index 0479196..3cae480 100644 > --- a/hw/cris/axis_dev88.c > +++ b/hw/cris/axis_dev88.c > @@ -270,9 +270,8 @@ void axisdev88_init(MachineState *machine) > env = &cpu->env; > > /* allocate RAM */ > - memory_region_init_ram(phys_ram, NULL, "axisdev88.ram", ram_size, > - &error_abort); > - vmstate_register_ram_global(phys_ram); > + memory_region_allocate_system_memory(phys_ram, NULL, "axisdev88.ram", > + ram_size); > memory_region_add_subregion(address_space_mem, 0x40000000, phys_ram); > > /* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the > -- > 2.0.4