qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-next 14/22] arm_boot: Pass ARMCPU to arm_boot_in


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-next 14/22] arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook()
Date: Mon, 14 May 2012 19:32:01 +0200

Adapt highbank accordingly.

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/arm-misc.h |    2 +-
 hw/arm_boot.c |    6 ++++--
 hw/highbank.c |    4 +++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/arm-misc.h b/hw/arm-misc.h
index d877f80..fb1e23b 100644
--- a/hw/arm-misc.h
+++ b/hw/arm-misc.h
@@ -52,7 +52,7 @@ struct arm_boot_info {
      */
     void (*write_secondary_boot)(ARMCPU *cpu,
                                  const struct arm_boot_info *info);
-    void (*secondary_cpu_reset_hook)(CPUARMState *env,
+    void (*secondary_cpu_reset_hook)(ARMCPU *cpu,
                                      const struct arm_boot_info *info);
     /* Used internally by arm_boot.c */
     int is_linux;
diff --git a/hw/arm_boot.c b/hw/arm_boot.c
index 4955f01..8eabfb2 100644
--- a/hw/arm_boot.c
+++ b/hw/arm_boot.c
@@ -72,9 +72,11 @@ static void default_write_secondary(ARMCPU *cpu,
                        info->smp_loader_start);
 }
 
-static void default_reset_secondary(CPUARMState *env,
+static void default_reset_secondary(ARMCPU *cpu,
                                     const struct arm_boot_info *info)
 {
+    CPUARMState *env = &cpu->env;
+
     stl_phys_notdirty(info->smp_bootreg_addr, 0);
     env->regs[15] = info->smp_loader_start;
 }
@@ -295,7 +297,7 @@ static void do_cpu_reset(void *opaque)
                     }
                 }
             } else {
-                info->secondary_cpu_reset_hook(env, info);
+                info->secondary_cpu_reset_hook(cpu, info);
             }
         }
     }
diff --git a/hw/highbank.c b/hw/highbank.c
index 45ca1ad..66ff042 100644
--- a/hw/highbank.c
+++ b/hw/highbank.c
@@ -60,8 +60,10 @@ static void hb_write_secondary(ARMCPU *cpu, const struct 
arm_boot_info *info)
     rom_add_blob_fixed("smpboot", smpboot, sizeof(smpboot), SMP_BOOT_ADDR);
 }
 
-static void hb_reset_secondary(CPUARMState *env, const struct arm_boot_info 
*info)
+static void hb_reset_secondary(ARMCPU *cpu, const struct arm_boot_info *info)
 {
+    CPUARMState *env = &cpu->env;
+
     switch (info->nb_cpus) {
     case 4:
         stl_phys_notdirty(SMP_BOOT_REG + 0x30, 0);
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]