From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLyKH-0004jk-4k for qemu-devel@nongnu.org; Wed, 10 Oct 2012 11:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLyK7-0005V8-HK for qemu-devel@nongnu.org; Wed, 10 Oct 2012 11:36:01 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:45499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLyK7-0005V2-Bi for qemu-devel@nongnu.org; Wed, 10 Oct 2012 11:35:51 -0400 Received: by mail-qc0-f173.google.com with SMTP id b12so501118qca.4 for ; Wed, 10 Oct 2012 08:35:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5075912D.1090401@suse.de> References: <1337742502-28565-1-git-send-email-afaerber@suse.de> <1337742502-28565-43-git-send-email-afaerber@suse.de> <5075912D.1090401@suse.de> Date: Wed, 10 Oct 2012 19:35:50 +0400 Message-ID: From: Max Filippov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-next 42/59] xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: qemu-devel@nongnu.org On Wed, Oct 10, 2012 at 7:15 PM, Andreas F=E4rber wrote: > Am 23.05.2012 05:08, schrieb Andreas F=E4rber: >> Needed for cpu_has_work(). >> >> Signed-off-by: Andreas F=E4rber > > Max, could you ack this trivial patch please? It still applies. Well, it does but why do you want to add a level of indirection here? Does that mean that cpu->env may change during cpu lifetime? Commit message is not very helpful here. > I notice that you were originally not cc'ed: Probably this file was/is > not yet documented in MAINTAINERS. > > Thanks, > Andreas > >> --- >> hw/xtensa_pic.c | 7 +++++-- >> 1 files changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/hw/xtensa_pic.c b/hw/xtensa_pic.c >> index 653ded6..8b9c051 100644 >> --- a/hw/xtensa_pic.c >> +++ b/hw/xtensa_pic.c >> @@ -125,7 +125,8 @@ void xtensa_rearm_ccompare_timer(CPUXtensaState *env= ) >> >> static void xtensa_ccompare_cb(void *opaque) >> { >> - CPUXtensaState *env =3D opaque; >> + XtensaCPU *cpu =3D opaque; >> + CPUXtensaState *env =3D &cpu->env; >> >> if (env->halted) { >> env->halt_clock =3D qemu_get_clock_ns(vm_clock); >> @@ -139,12 +140,14 @@ static void xtensa_ccompare_cb(void *opaque) >> >> void xtensa_irq_init(CPUXtensaState *env) >> { >> + XtensaCPU *cpu =3D xtensa_env_get_cpu(env); >> + >> env->irq_inputs =3D (void **)qemu_allocate_irqs( >> xtensa_set_irq, env, env->config->ninterrupt); >> if (xtensa_option_enabled(env->config, XTENSA_OPTION_TIMER_INTERRUP= T) && >> env->config->nccompare > 0) { >> env->ccompare_timer =3D >> - qemu_new_timer_ns(vm_clock, &xtensa_ccompare_cb, env); >> + qemu_new_timer_ns(vm_clock, &xtensa_ccompare_cb, cpu); >> } >> } >> > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg > --=20 Thanks. -- Max