From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>,
"Leon Alrae" <leon.alrae@imgtec.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [Qemu-devel] [PATCH v2 2/7] jazz: do not explode QEMUMachineInitArgs structure
Date: Sun, 1 Feb 2015 09:12:51 +0100 [thread overview]
Message-ID: <1422778376-32141-3-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1422778376-32141-1-git-send-email-hpoussin@reactos.org>
Also remove address_space and address_space_io parameters, which
where always get_system_memory() and get_system_io().
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/mips/mips_jazz.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index de35299..738e9c7 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -120,12 +120,12 @@ static void mips_jazz_do_unassigned_access(CPUState *cpu, hwaddr addr,
(*real_do_unassigned_access)(cpu, addr, is_write, is_exec, opaque, size);
}
-static void mips_jazz_init(MemoryRegion *address_space,
- MemoryRegion *address_space_io,
- ram_addr_t ram_size,
- const char *cpu_model,
+static void mips_jazz_init(MachineState *machine,
enum jazz_model_e jazz_model)
{
+ MemoryRegion *address_space = get_system_memory();
+ MemoryRegion *address_space_io = get_system_io();
+ const char *cpu_model = machine->cpu_model;
char *filename;
int bios_size, n;
MIPSCPU *cpu;
@@ -179,7 +179,8 @@ static void mips_jazz_init(MemoryRegion *address_space,
cc->do_unassigned_access = mips_jazz_do_unassigned_access;
/* allocate RAM */
- memory_region_init_ram(ram, NULL, "mips_jazz.ram", ram_size, &error_abort);
+ memory_region_init_ram(ram, NULL, "mips_jazz.ram", machine->ram_size,
+ &error_abort);
vmstate_register_ram_global(ram);
memory_region_add_subregion(address_space, 0, ram);
@@ -333,19 +334,13 @@ static void mips_jazz_init(MemoryRegion *address_space,
static
void mips_magnum_init(MachineState *machine)
{
- ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
- mips_jazz_init(get_system_memory(), get_system_io(),
- ram_size, cpu_model, JAZZ_MAGNUM);
+ mips_jazz_init(machine, JAZZ_MAGNUM);
}
static
void mips_pica61_init(MachineState *machine)
{
- ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
- mips_jazz_init(get_system_memory(), get_system_io(),
- ram_size, cpu_model, JAZZ_PICA61);
+ mips_jazz_init(machine, JAZZ_PICA61);
}
static QEMUMachine mips_magnum_machine = {
--
1.7.10.4
next prev parent reply other threads:[~2015-02-01 8:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-01 8:12 [Qemu-devel] [PATCH v2 0/7] isa: remove isa_mem_base variable Hervé Poussineau
2015-02-01 8:12 ` [Qemu-devel] [PATCH v2 1/7] isa: add memory space parameter to isa_bus_new Hervé Poussineau
2015-02-01 8:12 ` Hervé Poussineau [this message]
2015-02-01 8:12 ` [Qemu-devel] [PATCH v2 3/7] jazz: remove usage of isa_mem_base Hervé Poussineau
2015-02-01 8:12 ` [Qemu-devel] [PATCH v2 4/7] mips: remove isa_mem_base usage Hervé Poussineau
2015-02-01 8:12 ` [Qemu-devel] [PATCH v2 5/7] piix4: use PCI address space instead of system memory Hervé Poussineau
2015-02-01 8:12 ` [Qemu-devel] [PATCH v2 6/7] gt64xxx: remove isa_mem_base usage Hervé Poussineau
2015-02-01 8:12 ` [Qemu-devel] [PATCH v2 7/7] isa: remove isa_mem_base variable Hervé Poussineau
2015-02-01 18:05 ` [Qemu-devel] [PATCH v2 0/7] " Mark Cave-Ayland
2015-02-09 9:16 ` Leon Alrae
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=1422778376-32141-3-git-send-email-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=aurelien@aurel32.net \
--cc=leon.alrae@imgtec.com \
--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).