From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>, "Alexander Graf" <agraf@suse.de>
Subject: [Qemu-devel] [PATCH 24/27] target-s390x: Let cpu_s390x_init() return S390CPU
Date: Mon, 11 Jun 2012 02:00:56 +0200 [thread overview]
Message-ID: <1339372859-30148-25-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1339372859-30148-1-git-send-email-afaerber@suse.de>
Let cpu_init() return CPUS390XState for backwards compatibility.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-s390x/cpu.c | 2 +-
target-s390x/cpu.h | 8 ++++----
target-s390x/helper.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index f183213..619b202 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -20,7 +20,7 @@
* <http://www.gnu.org/licenses/lgpl-2.1.html>
*/
-#include "cpu-qom.h"
+#include "cpu.h"
#include "qemu-common.h"
#include "qemu-timer.h"
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 2f3f394..10bfab0 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -105,6 +105,8 @@ typedef struct CPUS390XState {
QEMUTimer *cpu_timer;
} CPUS390XState;
+#include "cpu-qom.h"
+
#if defined(CONFIG_USER_ONLY)
static inline void cpu_clone_regs(CPUS390XState *env, target_ulong newsp)
{
@@ -271,7 +273,7 @@ static inline int get_ilc(uint8_t opc)
#define ILC_LATER_INC_2 0x22
-CPUS390XState *cpu_s390x_init(const char *cpu_model);
+S390CPU *cpu_s390x_init(const char *cpu_model);
void s390x_translate_init(void);
int cpu_s390x_exec(CPUS390XState *s);
void cpu_s390x_close(CPUS390XState *s);
@@ -340,7 +342,7 @@ static inline void cpu_set_tls(CPUS390XState *env, target_ulong newtls)
env->aregs[1] = newtls & 0xffffffffULL;
}
-#define cpu_init cpu_s390x_init
+#define cpu_init(model) (&cpu_s390x_init(model)->env)
#define cpu_exec cpu_s390x_exec
#define cpu_gen_code cpu_s390x_gen_code
#define cpu_signal_handler cpu_s390x_signal_handler
@@ -994,6 +996,4 @@ static inline void cpu_pc_from_tb(CPUS390XState *env, TranslationBlock* tb)
env->psw.addr = tb->pc;
}
-#include "cpu-qom.h"
-
#endif
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index a34a35b..d0a1180 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -70,7 +70,7 @@ void s390x_cpu_timer(void *opaque)
}
#endif
-CPUS390XState *cpu_s390x_init(const char *cpu_model)
+S390CPU *cpu_s390x_init(const char *cpu_model)
{
S390CPU *cpu;
CPUS390XState *env;
@@ -86,7 +86,7 @@ CPUS390XState *cpu_s390x_init(const char *cpu_model)
env->cpu_model_str = cpu_model;
qemu_init_vcpu(env);
- return env;
+ return cpu;
}
#if defined(CONFIG_USER_ONLY)
--
1.7.7
next prev parent reply other threads:[~2012-06-11 0:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 0:00 [Qemu-devel] [PULL] QOM CPUState, part 3a: cleanups & preparations Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 01/27] nseries: Rename n800_s::cpu to mpu Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 02/27] omap_sx1: Rename omap_mpu_state_s variable Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 03/27] palm: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 04/27] mainstone: Rename PXA2xxState variable Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 05/27] spitz: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 06/27] tosa: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 07/27] z2: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 08/27] strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMState Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 09/27] integratorcp: Use cpu_arm_init() to obtain ARMCPU Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 10/27] musicpal: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 11/27] versatilepb: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 12/27] arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot() Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 13/27] arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook() Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 14/27] realview: Use cpu_arm_init() to obtain ARMCPU Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 15/27] vexpress: " Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 16/27] exynos4210: Use cpu_arm_init() to store ARMCPU Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 17/27] pxa2xx: Pass ARMCPU to pxa2xx_pic_init() Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 18/27] pxa2xx_pic: Store ARMCPU in PXA2xxPICState Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 19/27] pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfo Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 20/27] xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 21/27] arm_boot: Pass ARMCPU to arm_load_kernel() Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 22/27] arm_pic: Pass ARMCPU to arm_pic_init_cpu() Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 23/27] xen_machine_pv: Use cpu_x86_init() to obtain X86CPU Andreas Färber
2012-06-11 0:00 ` Andreas Färber [this message]
2012-06-11 0:00 ` [Qemu-devel] [PATCH 25/27] s390-virtio: Use cpu_s390x_init() to obtain S390CPU Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 26/27] s390-virtio: Let s390_cpu_addr2state() return S390CPU Andreas Färber
2012-06-11 0:00 ` [Qemu-devel] [PATCH 27/27] target-s390x: Pass S390CPU to s390_cpu_restart() Andreas Färber
2012-06-11 18:27 ` [Qemu-devel] [PULL] QOM CPUState, part 3a: cleanups & preparations Anthony Liguori
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=1339372859-30148-25-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.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).