On 4/5/25 07:43, Philippe Mathieu-Daudé wrote:
On 5/4/25 03:03, Pierrick Bouvier wrote:
On 4/4/25 14:54, Philippe Mathieu-Daudé wrote:
On 4/4/25 20:21, Pierrick Bouvier wrote:
On 4/3/25 16:58, Philippe Mathieu-Daudé wrote:
Extract PSCI definitions (which are not target specific)
to the new "target/arm/psci.h", so code from hw/arm/ can
use them without having to include the target specific
"cpu.h" header.
Including cpu.h is not a problem to have common code (per architecture),
so there is no need to do any change here.
Again, this is an old patch from my heterogeneous PoC branch.
I'll remove from this series to not distract you.
It's not distracting, but simply not needed.
Not needed for single-binary, but needed for heterogeneous emulation,
as the same HW might use distinct architectures.
In the list of files modified by the current change, the only
potentially concerned file is hw/vmapple/vmapple.c, as all others are in
hw/arm or target/arm, so cpu.h is not ambiguous, and already accessible.
As it's an implementation of "Apple aarch64 Virtual Machine", either:
- we can include target/arm/cpu.h explicitely (so QEMU_PSCI_* enum is
visible).
- we can add it to arm_common_ss, so cpu.h becomes unambiguous.
- The most correct: it should be moved to hw/arm/vmapple/ and added to
arm_common_ss.
I don't mind which solution we pick up among those three (personal
preference for the third one).
That said, the current approach to extract code only to make it
accessible for a single source file that is not correctly located in the
codebase is not the right one.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>
---
include/hw/arm/boot.h | 3 ++-
target/arm/cpu.h | 6 ------
target/arm/psci.h | 18 ++++++++++++++++++
hw/arm/bananapi_m2u.c | 1 +
hw/arm/boot.c | 1 +
hw/arm/highbank.c | 1 +
hw/arm/imx8mp-evk.c | 1 +
hw/arm/mcimx6ul-evk.c | 1 +
hw/arm/mcimx7d-sabre.c | 1 +
hw/arm/orangepi.c | 1 +
hw/arm/sbsa-ref.c | 1 +
hw/arm/virt-acpi-build.c | 1 +
hw/arm/virt.c | 1 +
hw/arm/xlnx-versal-virt.c | 1 +
hw/arm/xlnx-zcu102.c | 1 +
hw/vmapple/vmapple.c | 1 +
target/arm/helper.c | 1 +
target/arm/hvf/hvf.c | 1 +
target/arm/tcg/op_helper.c | 1 +
target/arm/tcg/psci.c | 1 +
20 files changed, 37 insertions(+), 7 deletions(-)
create mode 100644 target/arm/psci.h