[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 3/8] Generic PCIe host bridge INTx determinatio
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC v2 3/8] Generic PCIe host bridge INTx determination for INTx routing |
Date: |
Tue, 16 Feb 2016 18:14:25 +0000 |
On 29 January 2016 at 16:53, Eric Auger <address@hidden> 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 <address@hidden>
> Signed-off-by: Tushar Jagad <address@hidden>
> ---
> 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.
thanks
-- PMM
- Re: [Qemu-devel] [RFC v2 3/8] Generic PCIe host bridge INTx determination for INTx routing,
Peter Maydell <=