qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Leif Lindholm <quic_llindhol@quicinc.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Radoslaw Biernacki <rad@semihalf.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Subject: Re: [RFC PATCH 2/3] {include/}hw/arm: refactor BSA/virt PPI logic
Date: Thu, 14 Sep 2023 14:26:35 +0200	[thread overview]
Message-ID: <09413ec3-965d-8588-e0df-e8c4a6fa55b8@linaro.org> (raw)
In-Reply-To: <20230914120124.55410-3-quic_llindhol@quicinc.com>

On 14/9/23 14:01, Leif Lindholm wrote:
> GIC Private Peripheral Interrupts (PPI) are defined as GIC INTID 16-31.
> As in, PPI0 is INTID16 .. PPI15 is INTID31.
> Arm's Base System Architecture specification (BSA) lists the mandated and
> recommended private interrupt IDs by INTID, not by PPI index. But current
> definitions in qemu define them by PPI index, complicating cross
> referencing.
> 
> Meanwhile, the PPI(x) macro counterintuitively adds 16 to the input value,
> converting a PPI index to an INTID.
> 
> Resolve this by redefining the BSA-allocated PPIs by their INTIDs,
> inverting the logic of the PPI(x) macro and flipping where it is used.
> 
> Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
> ---
>   hw/arm/virt-acpi-build.c |  4 ++--
>   hw/arm/virt.c            |  9 +++++----
>   include/hw/arm/bsa.h     | 14 +++++++-------
>   3 files changed, 14 insertions(+), 13 deletions(-)

Isn't it simpler to reorder patches 1 <-> 2?
(First fix PPI macro use within virt.c, then expose header)



  reply	other threads:[~2023-09-14 12:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 12:01 [RFC PATCH 0/3] Refactor PPI logic/definitions for virt/sbsa-ref Leif Lindholm
2023-09-14 12:01 ` [RFC PATCH 1/3] include/hw/arm: move BSA definitions to bsa.h Leif Lindholm
2023-09-14 12:01 ` [RFC PATCH 2/3] {include/}hw/arm: refactor BSA/virt PPI logic Leif Lindholm
2023-09-14 12:26   ` Philippe Mathieu-Daudé [this message]
2023-09-14 12:01 ` [RFC PATCH 3/3] hw/arm/sbsa-ref: use bsa.h for PPI definitions Leif Lindholm
2023-09-14 12:26   ` Philippe Mathieu-Daudé
2023-09-14 13:15 ` [RFC PATCH 0/3] Refactor PPI logic/definitions for virt/sbsa-ref Marcin Juszkiewicz
2023-09-14 15:06   ` Leif Lindholm

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=09413ec3-965d-8588-e0df-e8c4a6fa55b8@linaro.org \
    --to=philmd@linaro.org \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quic_llindhol@quicinc.com \
    --cc=rad@semihalf.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).