qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] mips_malta: move i8259 initialization after pii


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] mips_malta: move i8259 initialization after piix4 initialization
Date: Wed, 14 Sep 2011 13:40:31 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 09/14/2011 01:37 PM, Avi Kivity wrote:
> On 09/14/2011 11:32 PM, Richard Henderson wrote:
>> On 09/12/2011 06:07 AM, Avi Kivity wrote:
>> >  +static void malta_isa_irq_handler(void *opaque, int n, int level)
>> >  +{
>> >  +    MaltaISAState *s = opaque;
>> >  +
>> >  +    if (s->i8259) {
>> >  +        qemu_set_irq(s->i8259[n], level);
>> >  +    }
>> >  +}
>>
>> Is there any point in the IF?  I realize that there's an ordering
>> problem that requires the use of the memory indirection in order
>> to be able to provide *some* opaque value at the proper time, but
>> AFAICT the ->i8259 value will *always* be non-null at the point
>> this function is called.  Am I wrong here?
> 
> The pci bridge may toggle the irq line as part of its initialization.

Ah.  Right.

> Yeah, but it would have been even more correct to make i8259 not an
> isa device.  Something for later on.

Yeah, there's a lot of that going around.  In any case:

Reviewed-by: Richard Henderson  <address@hidden>



r~



reply via email to

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