qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-ppc] [RESEND][PATCH] booke timers


From: Alexander Graf
Subject: Re: [Qemu-devel] [Qemu-ppc] [RESEND][PATCH] booke timers
Date: Tue, 13 Sep 2011 19:28:42 +0200




Am 13.09.2011 um 18:44 schrieb Scott Wood <address@hidden>:

> On 09/13/2011 08:08 AM, Alexander Graf wrote:
>> Fabien Chouteau wrote:
>>> static void booke_update_irq(CPUState *env)
>>> {
>>>    ppc_set_irq(env, PPC_INTERRUPT_DECR,
>>>                (env->spr[SPR_BOOKE_TSR] & TSR_DIS
>>>                 && env->spr[SPR_BOOKE_TCR] & TCR_DIE));
>>> 
>>>    ppc_set_irq(env, PPC_INTERRUPT_WDT,
>>>                (env->spr[SPR_BOOKE_TSR] & TSR_WIS
>>>                 && env->spr[SPR_BOOKE_TCR] & TCR_WIE));
>>> 
>>>    ppc_set_irq(env, PPC_INTERRUPT_FIT,
>>>                (env->spr[SPR_BOOKE_TSR] & TSR_FIS
>>>                 && env->spr[SPR_BOOKE_TCR] & TCR_FIE));
>>> }
>>> 
>> 
>> Awesome! Please also check on MSR.EE and send a new patch then :)
> 
> If you check on EE here, then you'll need to call booke_update_irq()
> when EE changes (not sure whether that's the plan).  Another option
> would be to unset the irq if the condition is not valid.  This would
> also be better in that you could have all three set (DIS, DIE, EE) and
> not deliver the interrupt because there's a higher priority exception.

Yup, which is what the patch actually does, so sorry for the fuss :). The 
subtile parts are in a different function and by lowering the irq line when TSR 
or TCR get set, we're good.


Alex


> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]