From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Vav-000525-8a for qemu-devel@nongnu.org; Sat, 01 Feb 2014 03:06:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Val-0007oJ-KU for qemu-devel@nongnu.org; Sat, 01 Feb 2014 03:06:29 -0500 Message-ID: <52ECAAF5.408@suse.de> Date: Sat, 01 Feb 2014 09:06:13 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1391214275-23764-1-git-send-email-aik@ozlabs.ru> <1391214275-23764-3-git-send-email-aik@ozlabs.ru> In-Reply-To: <1391214275-23764-3-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 2/2] target-ppc: spapr: e500: fix to use cpu_dt_id List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org 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 r= ets) > { > target_ulong id; > - CPUState *cpu; > + PowerPCCPU *cpu; > =20 > if (nargs !=3D 1 || nret !=3D 2) { > rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR); > @@ -139,9 +139,9 @@ static void rtas_query_cpu_stopped_state(PowerPCCPU= *cpu_, > } > =20 > id =3D rtas_ld(args, 0); > - cpu =3D qemu_get_cpu(id); > + cpu =3D ppc_get_vcpu_by_dt_id(id); > if (cpu !=3D 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg