qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH v2 3/5] sun4u: Pass SPARCCPU to {, s, hs}tick_irq() and cpu_timer_create()
Date: Fri, 12 Oct 2012 04:23:06 +0200	[thread overview]
Message-ID: <1350008589-30711-4-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1350008589-30711-1-git-send-email-afaerber@suse.de>

Needed for changing cpu_kick_irq() argument type to SPARCCPU.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/sun4u.c |   19 +++++++++++--------
 1 Datei geändert, 11 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-)

diff --git a/hw/sun4u.c b/hw/sun4u.c
index 137a7c6..4cea102 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -366,7 +366,7 @@ void cpu_get_timer(QEMUFile *f, CPUTimer *s)
     qemu_get_timer(f, s->qtimer);
 }
 
-static CPUTimer* cpu_timer_create(const char* name, CPUSPARCState *env,
+static CPUTimer *cpu_timer_create(const char *name, SPARCCPU *cpu,
                                   QEMUBHFunc *cb, uint32_t frequency,
                                   uint64_t disabled_mask)
 {
@@ -379,7 +379,7 @@ static CPUTimer* cpu_timer_create(const char* name, CPUSPARCState *env,
     timer->disabled = 1;
     timer->clock_offset = qemu_get_clock_ns(vm_clock);
 
-    timer->qtimer = qemu_new_timer_ns(vm_clock, cb, env);
+    timer->qtimer = qemu_new_timer_ns(vm_clock, cb, cpu);
 
     return timer;
 }
@@ -418,7 +418,8 @@ static void main_cpu_reset(void *opaque)
 
 static void tick_irq(void *opaque)
 {
-    CPUSPARCState *env = opaque;
+    SPARCCPU *cpu = opaque;
+    CPUSPARCState *env = &cpu->env;
 
     CPUTimer* timer = env->tick;
 
@@ -435,7 +436,8 @@ static void tick_irq(void *opaque)
 
 static void stick_irq(void *opaque)
 {
-    CPUSPARCState *env = opaque;
+    SPARCCPU *cpu = opaque;
+    CPUSPARCState *env = &cpu->env;
 
     CPUTimer* timer = env->stick;
 
@@ -452,7 +454,8 @@ static void stick_irq(void *opaque)
 
 static void hstick_irq(void *opaque)
 {
-    CPUSPARCState *env = opaque;
+    SPARCCPU *cpu = opaque;
+    CPUSPARCState *env = &cpu->env;
 
     CPUTimer* timer = env->hstick;
 
@@ -772,13 +775,13 @@ static SPARCCPU *cpu_devinit(const char *cpu_model, const struct hwdef *hwdef)
     }
     env = &cpu->env;
 
-    env->tick = cpu_timer_create("tick", env, tick_irq,
+    env->tick = cpu_timer_create("tick", cpu, tick_irq,
                                   tick_frequency, TICK_NPT_MASK);
 
-    env->stick = cpu_timer_create("stick", env, stick_irq,
+    env->stick = cpu_timer_create("stick", cpu, stick_irq,
                                    stick_frequency, TICK_INT_DIS);
 
-    env->hstick = cpu_timer_create("hstick", env, hstick_irq,
+    env->hstick = cpu_timer_create("hstick", cpu, hstick_irq,
                                     hstick_frequency, TICK_INT_DIS);
 
     reset_info = g_malloc0(sizeof(ResetData));
-- 
1.7.10.4

  parent reply	other threads:[~2012-10-12  2:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12  2:23 [Qemu-devel] [PATCH v2 0/5] target-sparc: Preparations for CPUState part 4b series Andreas Färber
2012-10-12  2:23 ` [Qemu-devel] [PATCH v2 1/5] sun4m: Pass SPARCCPU to cpu_set_irq() Andreas Färber
2012-10-12  2:23 ` [Qemu-devel] [PATCH v2 2/5] sun4m: Pass SPARCCPU to cpu_kick_irq() Andreas Färber
2012-10-12  2:23 ` Andreas Färber [this message]
2012-10-12  2:23 ` [Qemu-devel] [PATCH v2 4/5] sun4u: " Andreas Färber
2012-10-12  2:23 ` [Qemu-devel] [PATCH v2 5/5] sun4u: Pass SPARCCPU to cpu_set_ivec_irq() Andreas Färber
2012-10-13 14:22 ` [Qemu-devel] [PATCH v2 0/5] target-sparc: Preparations for CPUState part 4b series Blue Swirl

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=1350008589-30711-4-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=blauwirbel@gmail.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).