All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v4 1/4] ppc440_pcix: Improve comment for IRQ mapping
Date: Mon, 4 Jan 2021 23:44:22 +0000	[thread overview]
Message-ID: <CAFEAcA-Y64=2xBvVwHY8nEsAd3c7Vn58e5L3aixM0-JCMj4_Eg@mail.gmail.com> (raw)
In-Reply-To: <49fd899c9767a5ed08905b7bbb2b19d0531cf7ec.1609802040.git.balaton@eik.bme.hu>

On Mon, 4 Jan 2021 at 23:23, BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> The code mapping all PCI interrupts to a single CPU IRQ works but is
> not trivial so document it in a comment.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/ppc/ppc440_pcix.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
> index ee952314c8..eb1290ffc8 100644
> --- a/hw/ppc/ppc440_pcix.c
> +++ b/hw/ppc/ppc440_pcix.c
> @@ -415,8 +415,15 @@ static void ppc440_pcix_reset(DeviceState *dev)
>      s->sts = 0;
>  }
>
> -/* All pins from each slot are tied to a single board IRQ.
> - * This may need further refactoring for other boards. */
> +/*
> + * All four IRQ[ABCD] pins from all slots are tied to a single board
> + * IRQ, so our mapping function here maps everything to IRQ 0.
> + * The code in pci_change_irq_level() tracks the number of times
> + * the mapped IRQ is asserted and deasserted, so if multiple devices
> + * assert an IRQ at the same time the behaviour is correct.
> + *
> + * This may need further refactoring for boards that use multiple IRQ lines.
> + */
>  static int ppc440_pcix_map_irq(PCIDevice *pci_dev, int irq_num)
>  {
>      trace_ppc440_pcix_map_irq(pci_dev->devfn, irq_num, 0);
> --

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


  reply	other threads:[~2021-01-04 23:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 23:14 [PATCH v4 0/4] Misc sam460ex fixes (was: Clean up sam460ex irq mapping) BALATON Zoltan via
2021-01-04 23:14 ` [PATCH v4 3/4] ppc440_pcix: Fix up pci config access BALATON Zoltan via
2021-01-04 23:14 ` [PATCH v4 1/4] ppc440_pcix: Improve comment for IRQ mapping BALATON Zoltan via
2021-01-04 23:44   ` Peter Maydell [this message]
2021-01-04 23:14 ` [PATCH v4 2/4] ppc440_pcix: Fix register write trace event BALATON Zoltan via
2021-01-04 23:14 ` [PATCH v4 4/4] sam460ex: Use type cast macro instead of simple cast BALATON Zoltan via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA-Y64=2xBvVwHY8nEsAd3c7Vn58e5L3aixM0-JCMj4_Eg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=david@gibson.dropbear.id.au \
    --cc=f4bug@amsat.org \
    --cc=linux@roeck-us.net \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.