From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3wCw-0002Mz-BH for qemu-devel@nongnu.org; Wed, 14 Sep 2011 16:37:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3wCv-0000dO-0m for qemu-devel@nongnu.org; Wed, 14 Sep 2011 16:37:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3wCu-0000dJ-N0 for qemu-devel@nongnu.org; Wed, 14 Sep 2011 16:37:20 -0400 Message-ID: <4E71107C.7040806@redhat.com> Date: Wed, 14 Sep 2011 23:37:16 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1315832873-18976-1-git-send-email-avi@redhat.com> <4E710F71.5000506@twiddle.net> In-Reply-To: <4E710F71.5000506@twiddle.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] mips_malta: move i8259 initialization after piix4 initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org 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. > Otherwise the approach looks correct. Yeah, but it would have been even more correct to make i8259 not an isa device. Something for later on. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.