mbox series

[00/19] target/arm: More header rework around arm_feature() & multiprocessing.h

Message ID 20250513173928.77376-1-philmd@linaro.org
Headers show
Series target/arm: More header rework around arm_feature() & multiprocessing.h | expand

Message

Philippe Mathieu-Daudé May 13, 2025, 5:39 p.m. UTC
Before I respin my "single-binary: Make hw/arm/ common" [1] I'm
extracting these random cleanup patches. Some aren't necessary
anymore because now units in arm_common_ss[] can access "cpu.h",
but the patches are reviewed and simplify a bit IMO.

Based-on: <20250512180502.2395029-1-pierrick.bouvier@linaro.org>
          "single-binary: compile target/arm twice"

[1] https://lore.kernel.org/qemu-devel/20250403235821.9909-1-philmd@linaro.org/

Philippe Mathieu-Daudé (19):
  target/arm/tcg-stubs: compile file once (system)
  target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition
  target/arm: Only link with zlib when TCG is enabled
  target/arm/cpregs: Include missing 'target/arm/cpu.h' header
  hw/arm/boot: Include missing 'system/memory.h' header
  target/arm/cpu-features: Include missing 'cpu.h' header
  target/arm/qmp: Include missing 'cpu.h' header
  target/arm/kvm: Include missing 'cpu-qom.h' header
  target/arm/hvf: Include missing 'cpu-qom.h' header
  hw/arm: Remove unnecessary 'cpu.h' header
  target/arm: Restrict inclusion of 'multiprocessing.h'
  target/arm: Move some definitions from 'cpu.h' to 'multiprocessing.h'
  hw/arm: Include missing 'target/arm/gtimer.h' header
  target/arm: Extract PSCI definitions to 'psci.h'
  target/arm: Extract feature definitions to 'cpu_has_feature.h' header
  target/arm: Add arm_cpu_has_feature() helper
  hw/arm/realview: Replace arm_feature() -> arm_cpu_has_feature()
  hw/arm/virt-acpi: Replace arm_feature() -> arm_cpu_has_feature()
  target/arm: Always include full path to 'cpu.h'

 MAINTAINERS                    |  1 +
 include/hw/arm/boot.h          |  3 +-
 target/arm/cpregs.h            |  1 +
 target/arm/cpu-features.h      |  1 +
 target/arm/cpu.h               | 79 ++--------------------------------
 target/arm/cpu_has_feature.h   | 67 ++++++++++++++++++++++++++++
 target/arm/hvf_arm.h           | 18 +-------
 target/arm/kvm_arm.h           |  1 +
 target/arm/multiprocessing.h   | 18 ++++++++
 target/arm/psci.h              | 18 ++++++++
 target/arm/tcg/translate.h     |  2 +-
 hw/arm/aspeed_ast2600.c        |  1 +
 hw/arm/aspeed_ast27x0.c        |  2 +
 hw/arm/bananapi_m2u.c          |  1 +
 hw/arm/bcm2838.c               |  1 +
 hw/arm/boot.c                  |  2 +
 hw/arm/exynos4210.c            |  3 +-
 hw/arm/fsl-imx8mp.c            |  1 +
 hw/arm/highbank.c              |  2 +-
 hw/arm/imx8mp-evk.c            |  1 +
 hw/arm/mcimx6ul-evk.c          |  1 +
 hw/arm/mcimx7d-sabre.c         |  1 +
 hw/arm/mps3r.c                 |  2 +-
 hw/arm/npcm8xx.c               |  2 +
 hw/arm/orangepi.c              |  1 +
 hw/arm/realview.c              | 10 ++---
 hw/arm/sbsa-ref.c              |  2 +
 hw/arm/smmuv3.c                |  1 -
 hw/arm/virt-acpi-build.c       |  4 +-
 hw/arm/virt.c                  |  1 +
 hw/arm/xlnx-versal-virt.c      |  1 +
 hw/arm/xlnx-zcu102.c           |  1 +
 hw/vmapple/vmapple.c           |  3 ++
 target/arm/arch_dump.c         |  2 +-
 target/arm/arm-powerctl.c      |  2 +-
 target/arm/arm-qmp-cmds.c      |  1 +
 target/arm/cortex-regs.c       |  2 +-
 target/arm/cpu.c               | 10 ++++-
 target/arm/cpu64.c             |  2 +-
 target/arm/debug_helper.c      |  2 +-
 target/arm/gdbstub.c           |  2 +-
 target/arm/gdbstub64.c         |  2 +-
 target/arm/helper.c            |  3 +-
 target/arm/hvf-stub.c          | 20 +++++++++
 target/arm/hvf/hvf.c           |  1 +
 target/arm/hyp_gdbstub.c       |  2 +-
 target/arm/kvm-stub.c          |  2 +-
 target/arm/kvm.c               |  3 +-
 target/arm/machine.c           |  2 +-
 target/arm/ptw.c               |  2 +-
 target/arm/tcg-stubs.c         |  2 +-
 target/arm/tcg/cpu-v7m.c       |  2 +-
 target/arm/tcg/cpu32.c         |  2 +-
 target/arm/tcg/cpu64.c         |  2 +-
 target/arm/tcg/helper-a64.c    |  2 +-
 target/arm/tcg/hflags.c        |  2 +-
 target/arm/tcg/iwmmxt_helper.c |  2 +-
 target/arm/tcg/m_helper.c      |  2 +-
 target/arm/tcg/mte_helper.c    |  2 +-
 target/arm/tcg/mve_helper.c    |  2 +-
 target/arm/tcg/neon_helper.c   |  2 +-
 target/arm/tcg/op_helper.c     |  4 +-
 target/arm/tcg/pauth_helper.c  |  2 +-
 target/arm/tcg/psci.c          |  3 +-
 target/arm/tcg/sme_helper.c    |  2 +-
 target/arm/tcg/sve_helper.c    |  2 +-
 target/arm/tcg/tlb-insns.c     |  2 +-
 target/arm/tcg/tlb_helper.c    |  2 +-
 target/arm/tcg/vec_helper.c    |  2 +-
 target/arm/tcg/vfp_helper.c    |  2 +-
 target/arm/vfp_fpscr.c         |  2 +-
 target/arm/meson.build         |  4 +-
 target/arm/tcg/meson.build     |  2 +
 73 files changed, 221 insertions(+), 143 deletions(-)
 create mode 100644 target/arm/cpu_has_feature.h
 create mode 100644 target/arm/psci.h
 create mode 100644 target/arm/hvf-stub.c

Comments

Philippe Mathieu-Daudé May 13, 2025, 5:42 p.m. UTC | #1
On 13/5/25 19:39, Philippe Mathieu-Daudé wrote:

> Philippe Mathieu-Daudé (19):
>    target/arm/tcg-stubs: compile file once (system)
>    target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition
>    target/arm: Only link with zlib when TCG is enabled

>    target/arm: Always include full path to 'cpu.h'

Missing review: 1-3 & 19
Pierrick Bouvier May 13, 2025, 11 p.m. UTC | #2
On 5/13/25 10:42 AM, Philippe Mathieu-Daudé wrote:
> On 13/5/25 19:39, Philippe Mathieu-Daudé wrote:
> 
>> Philippe Mathieu-Daudé (19):
>>     target/arm/tcg-stubs: compile file once (system)
>>     target/arm/hvf_arm: Avoid using poisoned CONFIG_HVF definition
>>     target/arm: Only link with zlib when TCG is enabled
> 
>>     target/arm: Always include full path to 'cpu.h'
> 
> Missing review: 1-3 & 19

Thanks Philippe,
hopefully it can be pulled at the same than its base series.

Pierrick