qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 2/3] {include/}hw/arm: refactor BSA/virt PPI logic


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 2/3] {include/}hw/arm: refactor BSA/virt PPI logic
Date: Thu, 14 Sep 2023 14:26:35 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

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 via email to

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