Received: from eggs.gnu.org ([2001:4830:134:3::10]:55632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWT7c-00011C-2e for qemu-devel@nongnu.org; Thu, 18 Feb 2016 13:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWT7a-0002G1-86 for qemu-devel@nongnu.org; Thu, 18 Feb 2016 13:16:12 -0500 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:36064) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWT7a-0002EY-16 for qemu-devel@nongnu.org; Thu, 18 Feb 2016 13:16:10 -0500 Received: by mail-wm0-x233.google.com with SMTP id g62so41459851wme.1 for ; Thu, 18 Feb 2016 10:16:09 -0800 (PST) References: <1454086429-4373-1-git-send-email-eric.auger@linaro.org> <1454086429-4373-4-git-send-email-eric.auger@linaro.org> From: Eric Auger Message-ID: <56C60A49.3000800@linaro.org> Date: Thu, 18 Feb 2016 19:15:37 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 3/8] Generic PCIe host bridge INTx determination for INTx routing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: eric.auger@st.com, Pranav Sawargaonkar , Pavel Fedin , QEMU Developers , Alexander Graf , Bharat Bhushan , Alex Williamson , qemu-arm , Suravee Suthikulpanit , Paolo Bonzini , Christoffer Dall Hi Peter, On 02/16/2016 07:14 PM, Peter Maydell wrote: > On 29 January 2016 at 16:53, Eric Auger wrote: >> This patch stores information about assigned legacy interrupt numbers in >> GPEX host structure. >> This is used during GPEX INTx number determination from a pin during >> INTx routing. >> >> Signed-off-by: Pranavkumar Sawargaonkar >> Signed-off-by: Tushar Jagad >> --- >> hw/arm/virt.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/arm/virt.c b/hw/arm/virt.c >> index 15658f4..3839c68 100644 >> --- a/hw/arm/virt.c >> +++ b/hw/arm/virt.c >> @@ -826,6 +826,7 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic, >> char *nodename; >> int i; >> PCIHostState *pci; >> + GPEXHost *s; >> >> dev = qdev_create(NULL, TYPE_GPEX_HOST); >> qdev_init_nofail(dev); >> @@ -861,8 +862,11 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic, >> /* Map IO port space */ >> sysbus_mmio_map(SYS_BUS_DEVICE(dev), 2, base_pio); >> >> + s = GPEX_HOST(dev); >> + >> for (i = 0; i < GPEX_NUM_IRQS; i++) { >> sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, pic[irq + i]); >> + s->irq_num[i] = irq + i; >> } > > I don't think that the board code should be prodding stuff in the GPEXHost > struct like this -- device structs are supposed to be private to the > device implementation. If you need the information in the device then > you need to come up with a better API for this. Sure, Thanks Eric > > thanks > -- PMM >