Patchwork [for-next,54/74] cris-boot: Pass CRISCPU to cris_load_image()

login
register
mail settings
Submitter Andreas Färber
Date May 6, 2012, 3:34 p.m.
Message ID <1336318514-30906-55-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/157185/
State New
Headers show

Comments

Andreas Färber - May 6, 2012, 3:34 p.m.
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/axis_dev88.c |    2 +-
 hw/cris-boot.c  |    3 ++-
 hw/cris-boot.h  |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/axis_dev88.c b/hw/axis_dev88.c
index 636708c..eab6327 100644
--- a/hw/axis_dev88.c
+++ b/hw/axis_dev88.c
@@ -346,7 +346,7 @@  void axisdev88_init (ram_addr_t ram_size,
 
     li.image_filename = kernel_filename;
     li.cmdline = kernel_cmdline;
-    cris_load_image(env, &li);
+    cris_load_image(cpu, &li);
 }
 
 static QEMUMachine axisdev88_machine = {
diff --git a/hw/cris-boot.c b/hw/cris-boot.c
index ca6c52f..331b2d1 100644
--- a/hw/cris-boot.c
+++ b/hw/cris-boot.c
@@ -60,8 +60,9 @@  static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return addr - 0x80000000LL;
 }
 
-void cris_load_image(CPUCRISState *env, struct cris_load_info *li)
+void cris_load_image(CRISCPU *cpu, struct cris_load_info *li)
 {
+    CPUCRISState *env = &cpu->env;
     uint64_t entry, high;
     int kcmdline_len;
     int image_size;
diff --git a/hw/cris-boot.h b/hw/cris-boot.h
index ecb9779..0a2c242 100644
--- a/hw/cris-boot.h
+++ b/hw/cris-boot.h
@@ -8,4 +8,4 @@  struct cris_load_info
     target_phys_addr_t entry;
 };
 
-void cris_load_image(CPUCRISState *env, struct cris_load_info *li);
+void cris_load_image(CRISCPU *cpu, struct cris_load_info *li);