qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 13/15] apb: replace OBIO interrupt numbers in pc


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 13/15] apb: replace OBIO interrupt numbers in pci_pbmA_map_irq() with constants
Date: Sun, 19 Nov 2017 22:03:02 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/17/2017 10:42 AM, Mark Cave-Ayland wrote:
> Following on from the previous commit, we can also do the same with
> with legacy OBIO interrupts in pci_pbmA_map_irq().
> 
> Signed-off-by: Mark Cave-Ayland <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  hw/pci-host/apb.c         |    4 ++--
>  include/hw/pci-host/apb.h |    2 ++
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
> index f092780c..31eb675 100644
> --- a/hw/pci-host/apb.c
> +++ b/hw/pci-host/apb.c
> @@ -523,10 +523,10 @@ static int pci_pbmA_map_irq(PCIDevice *pci_dev, int 
> irq_num)
>      switch (PCI_SLOT(pci_dev->devfn)) {
>      case 1:
>          /* Onboard NIC */
> -        return 0x21;
> +        return OBIO_NIC_IRQ;
>      case 3:
>          /* Onboard IDE */
> -        return 0x20;
> +        return OBIO_HDD_IRQ;
>      default:
>          /* Normal intno, fall through */
>          break;
> diff --git a/include/hw/pci-host/apb.h b/include/hw/pci-host/apb.h
> index 09ebd53..6194c8c 100644
> --- a/include/hw/pci-host/apb.h
> +++ b/include/hw/pci-host/apb.h
> @@ -53,6 +53,8 @@ typedef struct IOMMUState {
>  #define MAX_IVEC 0x40
>  
>  /* OBIO IVEC IRQs */
> +#define OBIO_HDD_IRQ         0x20
> +#define OBIO_NIC_IRQ         0x21
>  #define OBIO_LPT_IRQ         0x22
>  #define OBIO_FDD_IRQ         0x27
>  #define OBIO_KBD_IRQ         0x29
> 



reply via email to

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