From: Blue Swirl <blauwirbel@gmail.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] x86: Clean up CPU reset
Date: Sun, 27 Jun 2010 20:23:55 +0000 [thread overview]
Message-ID: <AANLkTil-4pWQCNiPCwyCVrjNh8C5ZQl1NbsdtH6dZEZ2@mail.gmail.com> (raw)
In-Reply-To: <4C21A7C6.1090504@web.de>
Thanks, applied.
On Wed, Jun 23, 2010 at 6:20 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> hw/pc.c | 22 ++++------------------
> 1 files changed, 4 insertions(+), 18 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 1848151..8b9e70a 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -812,20 +812,12 @@ void pc_acpi_smi_interrupt(void *opaque, int irq, int level)
> }
> }
>
> -static void bsp_cpu_reset(void *opaque)
> +static void pc_cpu_reset(void *opaque)
> {
> CPUState *env = opaque;
>
> cpu_reset(env);
> - env->halted = 0;
> -}
> -
> -static void ap_cpu_reset(void *opaque)
> -{
> - CPUState *env = opaque;
> -
> - cpu_reset(env);
> - env->halted = 1;
> + env->halted = !cpu_is_bsp(env);
> }
>
> static CPUState *pc_new_cpu(const char *cpu_model)
> @@ -839,16 +831,10 @@ static CPUState *pc_new_cpu(const char *cpu_model)
> }
> if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) {
> env->cpuid_apic_id = env->cpu_index;
> - /* APIC reset callback resets cpu */
> env->apic_state = apic_init(env, env->cpuid_apic_id);
> }
> - if (cpu_is_bsp(env)) {
> - qemu_register_reset(bsp_cpu_reset, env);
> - env->halted = 0;
> - } else {
> - qemu_register_reset(ap_cpu_reset, env);
> - env->halted = 1;
> - }
> + qemu_register_reset(pc_cpu_reset, env);
> + pc_cpu_reset(env);
> return env;
> }
>
> --
> 1.6.0.2
>
prev parent reply other threads:[~2010-06-27 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 6:20 [Qemu-devel] [PATCH] x86: Clean up CPU reset Jan Kiszka
2010-06-27 20:23 ` Blue Swirl [this message]
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=AANLkTil-4pWQCNiPCwyCVrjNh8C5ZQl1NbsdtH6dZEZ2@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=jan.kiszka@web.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).