All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v6 2/2] target-ppc: spapr: e500: fix to use cpu_dt_id
Date: Sat, 01 Feb 2014 09:06:13 +0100	[thread overview]
Message-ID: <52ECAAF5.408@suse.de> (raw)
In-Reply-To: <1391214275-23764-3-git-send-email-aik@ozlabs.ru>

Am 01.02.2014 01:24, schrieb Alexey Kardashevskiy:
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 1cb276d..4e0a70e 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -131,7 +131,7 @@ static void rtas_query_cpu_stopped_state(PowerPCCPU *cpu_,
>                                           uint32_t nret, target_ulong rets)
>  {
>      target_ulong id;
> -    CPUState *cpu;
> +    PowerPCCPU *cpu;
>  
>      if (nargs != 1 || nret != 2) {
>          rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
> @@ -139,9 +139,9 @@ static void rtas_query_cpu_stopped_state(PowerPCCPU *cpu_,
>      }
>  
>      id = rtas_ld(args, 0);
> -    cpu = qemu_get_cpu(id);
> +    cpu = ppc_get_vcpu_by_dt_id(id);
>      if (cpu != NULL) {
> -        if (cpu->halted) {
> +        if (cpu->parent_obj.halted) {

Sorry for not noticing this earlier, but the purpose of "parent_obj" is
to make it a checkpatch error at some point - it should not be accessed
by regular code. Use CPU(cpu) to access the parent's fields, and to
avoid CPU(cpu)->halted, use a local variable please.

>              rtas_st(rets, 1, 0);
>          } else {
>              rtas_st(rets, 1, 2);
[snip]

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

      reply	other threads:[~2014-02-01  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-01  0:24 [Qemu-devel] [PATCH v6 0/2] target-ppc: CPU device tree id Alexey Kardashevskiy
2014-02-01  0:24 ` [Qemu-devel] [PATCH v6 1/2] target-ppc: add PowerPCCPU::cpu_dt_id Alexey Kardashevskiy
2014-02-01  0:24 ` [Qemu-devel] [PATCH v6 2/2] target-ppc: spapr: e500: fix to use cpu_dt_id Alexey Kardashevskiy
2014-02-01  8:06   ` Andreas Färber [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=52ECAAF5.408@suse.de \
    --to=afaerber@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.