qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: "Dirk Müller" <dirk@dmllr.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH for-2.3] cris: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory
Date: Thu, 9 Apr 2015 13:47:23 +1000	[thread overview]
Message-ID: <20150409034723.GC15765@toto> (raw)
In-Reply-To: <CAL5wTH4kgaxbbyw3zUoypk4vvFFnRWW=mke14ZSsfjhPTVgW9A@mail.gmail.com>

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 <edgar.iglesias@gmail.com>
> Signed-off-by: Dirk Mueller <dmueller@suse.com>
> ---
>  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

  reply	other threads:[~2015-04-09  3:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-04 12:15 [Qemu-devel] [PATCH for-2.3] cris: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory Dirk Müller
2015-04-09  3:47 ` Edgar E. Iglesias [this message]
2015-04-10 14:29   ` Peter Maydell
2015-04-11 10:18     ` Edgar E. Iglesias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150409034723.GC15765@toto \
    --to=edgar.iglesias@gmail.com \
    --cc=dirk@dmllr.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).