From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R66RB-0006sj-Or for qemu-devel@nongnu.org; Tue, 20 Sep 2011 15:57:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R66RA-00085j-QS for qemu-devel@nongnu.org; Tue, 20 Sep 2011 15:57:01 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:35988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R66RA-00085d-Ln for qemu-devel@nongnu.org; Tue, 20 Sep 2011 15:57:00 -0400 Received: by fxh13 with SMTP id 13so948701fxh.4 for ; Tue, 20 Sep 2011 12:56:59 -0700 (PDT) Sender: Richard Henderson Message-ID: <4E78F006.8070908@twiddle.net> Date: Tue, 20 Sep 2011 12:56:54 -0700 From: Richard Henderson MIME-Version: 1.0 References: <00218408-4F7E-47E8-9A3A-7515E5472C40@mimectl>, <4E78E207.5070308@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] pci_change_irq_level is broken... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alan Amaral Cc: "qemu-devel@nongnu.org" On 09/20/2011 12:19 PM, Alan Amaral wrote: > QEMU emulator version 0.14.50, Copyright (c) 2003-2008 Fabrice Bellard > You are correct, it's not hardcoded to 4. However, when it's allocated the number of elements IS 4. Also, > there's a comment just above pci_set_irq which says: > > /* 0 <= irq_num <= 3. level must be 0 or 1 */ > static void pci_set_irq(void *opaque, int irq_num, int level) > so, that implies to me that it's probably always 4... The first use I examined was apb_pci.c: d->bus = pci_register_bus(&d->busdev.qdev, "pci", pci_apb_set_irq, pci_pbm_map_irq, d, &d->pci_mmio, get_system_io(), 0, 32); where the last argument indicates that we allocate 32 irqs, and the pci_pbm_map_irq function returns a value in the set { 0, 1, 2, 3, 16, 17, 18, 19 }. r~