[PATCH 00/20] arm: Rework target/ headers to build various hw/ files once

Philippe Mathieu-Daudé posted 20 patches 3 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240118200643.29037-1-philmd@linaro.org
Maintainers: Beniamino Galvani <b.galvani@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Strahinja Jankovic <strahinja.p.jankovic@gmail.com>, Niek Linnenbank <nieklinnenbank@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Igor Mitsyanko <i.mitsyanko@gmail.com>, Jean-Christophe Dubois <jcd@tribudubois.net>, Andrey Smirnov <andrew.smirnov@gmail.com>, Rob Herring <robh@kernel.org>, Jan Kiszka <jan.kiszka@web.de>, Tyrone Ting <kfting@nuvoton.com>, Hao Wu <wuhaotsh@google.com>, Radoslaw Biernacki <rad@semihalf.com>, Leif Lindholm <quic_llindhol@quicinc.com>, Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>, Eric Auger <eric.auger@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Shannon Zhao <shannon.zhaosl@gmail.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <alistair@alistair23.me>, Alexander Graf <agraf@csgraf.de>, Paolo Bonzini <pbonzini@redhat.com>
hw/arm/smmuv3-internal.h          |  1 +
include/hw/arm/xlnx-versal.h      |  1 +
include/hw/intc/armv7m_nvic.h     |  2 +-
include/hw/misc/xlnx-versal-crl.h |  2 +-
target/arm/cpregs.h               |  3 +++
target/arm/cpu-features.h         |  2 ++
target/arm/cpu-qom.h              | 24 ++++++++++++++++++++++
target/arm/cpu.h                  | 34 +++----------------------------
target/arm/gtimer.h               | 21 +++++++++++++++++++
target/arm/multiprocessing.h      | 16 +++++++++++++++
hw/arm/allwinner-a10.c            |  1 +
hw/arm/allwinner-h3.c             |  2 ++
hw/arm/allwinner-r40.c            |  2 ++
hw/arm/armv7m.c                   |  2 ++
hw/arm/aspeed_ast2400.c           |  1 +
hw/arm/aspeed_ast2600.c           |  1 +
hw/arm/bcm2836.c                  |  2 ++
hw/arm/collie.c                   |  1 -
hw/arm/exynos4210.c               |  2 ++
hw/arm/fsl-imx25.c                |  1 +
hw/arm/fsl-imx31.c                |  1 +
hw/arm/fsl-imx6.c                 |  1 +
hw/arm/fsl-imx6ul.c               |  1 +
hw/arm/fsl-imx7.c                 |  1 +
hw/arm/gumstix.c                  |  1 -
hw/arm/highbank.c                 |  1 +
hw/arm/integratorcp.c             |  2 +-
hw/arm/mainstone.c                |  1 -
hw/arm/musicpal.c                 |  2 +-
hw/arm/npcm7xx.c                  |  3 ++-
hw/arm/omap1.c                    |  1 +
hw/arm/omap2.c                    |  2 +-
hw/arm/omap_sx1.c                 |  1 -
hw/arm/palm.c                     |  1 -
hw/arm/realview.c                 |  1 +
hw/arm/sbsa-ref.c                 |  4 +++-
hw/arm/spitz.c                    |  1 -
hw/arm/strongarm.c                |  2 +-
hw/arm/versatilepb.c              |  2 +-
hw/arm/vexpress.c                 |  2 +-
hw/arm/virt-acpi-build.c          |  4 ++--
hw/arm/virt.c                     | 11 ++++++----
hw/arm/xilinx_zynq.c              |  3 ++-
hw/arm/xlnx-versal-virt.c         |  5 +++--
hw/arm/xlnx-versal.c              |  2 ++
hw/arm/xlnx-zynqmp.c              |  2 ++
hw/arm/z2.c                       |  1 -
hw/cpu/a15mpcore.c                |  1 +
hw/cpu/a9mpcore.c                 |  2 +-
hw/misc/xlnx-versal-crl.c         |  5 +++--
target/arm/arm-powerctl.c         |  3 ++-
target/arm/cpu.c                  | 13 +++++++++---
target/arm/helper.c               | 30 ++++++++++++++-------------
target/arm/hvf/hvf.c              |  6 ++++--
target/arm/kvm.c                  |  1 +
target/arm/machine.c              |  1 +
target/arm/tcg/psci.c             |  3 ++-
hw/arm/meson.build                | 23 +++++++++++----------
hw/cpu/meson.build                |  2 +-
hw/misc/meson.build               |  2 +-
60 files changed, 178 insertions(+), 94 deletions(-)
create mode 100644 target/arm/gtimer.h
create mode 100644 target/arm/multiprocessing.h
[PATCH 00/20] arm: Rework target/ headers to build various hw/ files once
Posted by Philippe Mathieu-Daudé 3 months, 2 weeks ago
Hi,

In order to fix a bug noticed [*] by Cédric and Fabiano in my
"Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series,
I ended reusing commits from other branches and it grew quite
a lot. This is the first "cleanup" part, unrelated on MPCorePriv.

Please review,

Phil.

Philippe Mathieu-Daudé (18):
  hw/arm/exynos4210: Include missing 'exec/tswap.h' header
  hw/arm/xilinx_zynq: Include missing 'exec/tswap.h' header
  hw/arm/smmuv3: Include missing 'hw/registerfields.h' header
  hw/arm/xlnx-versal: Include missing 'cpu.h' header
  target/arm/cpu-features: Include missing 'hw/registerfields.h' header
  target/arm/cpregs: Include missing 'hw/registerfields.h' header
  target/arm/cpregs: Include missing 'kvm-consts.h' header
  target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header
  target/arm: Declare ARM_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'
  hw/cpu/a9mpcore: Build it only once
  hw/misc/xlnx-versal-crl: Include generic 'cpu-qom.h' instead of
    'cpu.h'
  hw/misc/xlnx-versal-crl: Build it only once
  target/arm: Expose M-profile register bank index definitions
  hw/arm/armv7m: Make 'hw/intc/armv7m_nvic.h' a target agnostic header
  target/arm: Move ARM_CPU_IRQ/FIQ definitions to 'cpu-qom.h' header
  target/arm: Move e2h_access() helper around
  target/arm: Move GTimer definitions to new 'gtimer.h' header
  hw/arm: Build various units only once

Richard Henderson (2):
  target/arm: Rename arm_cpu_mp_affinity
  target/arm: Create arm_cpu_mp_affinity

 hw/arm/smmuv3-internal.h          |  1 +
 include/hw/arm/xlnx-versal.h      |  1 +
 include/hw/intc/armv7m_nvic.h     |  2 +-
 include/hw/misc/xlnx-versal-crl.h |  2 +-
 target/arm/cpregs.h               |  3 +++
 target/arm/cpu-features.h         |  2 ++
 target/arm/cpu-qom.h              | 24 ++++++++++++++++++++++
 target/arm/cpu.h                  | 34 +++----------------------------
 target/arm/gtimer.h               | 21 +++++++++++++++++++
 target/arm/multiprocessing.h      | 16 +++++++++++++++
 hw/arm/allwinner-a10.c            |  1 +
 hw/arm/allwinner-h3.c             |  2 ++
 hw/arm/allwinner-r40.c            |  2 ++
 hw/arm/armv7m.c                   |  2 ++
 hw/arm/aspeed_ast2400.c           |  1 +
 hw/arm/aspeed_ast2600.c           |  1 +
 hw/arm/bcm2836.c                  |  2 ++
 hw/arm/collie.c                   |  1 -
 hw/arm/exynos4210.c               |  2 ++
 hw/arm/fsl-imx25.c                |  1 +
 hw/arm/fsl-imx31.c                |  1 +
 hw/arm/fsl-imx6.c                 |  1 +
 hw/arm/fsl-imx6ul.c               |  1 +
 hw/arm/fsl-imx7.c                 |  1 +
 hw/arm/gumstix.c                  |  1 -
 hw/arm/highbank.c                 |  1 +
 hw/arm/integratorcp.c             |  2 +-
 hw/arm/mainstone.c                |  1 -
 hw/arm/musicpal.c                 |  2 +-
 hw/arm/npcm7xx.c                  |  3 ++-
 hw/arm/omap1.c                    |  1 +
 hw/arm/omap2.c                    |  2 +-
 hw/arm/omap_sx1.c                 |  1 -
 hw/arm/palm.c                     |  1 -
 hw/arm/realview.c                 |  1 +
 hw/arm/sbsa-ref.c                 |  4 +++-
 hw/arm/spitz.c                    |  1 -
 hw/arm/strongarm.c                |  2 +-
 hw/arm/versatilepb.c              |  2 +-
 hw/arm/vexpress.c                 |  2 +-
 hw/arm/virt-acpi-build.c          |  4 ++--
 hw/arm/virt.c                     | 11 ++++++----
 hw/arm/xilinx_zynq.c              |  3 ++-
 hw/arm/xlnx-versal-virt.c         |  5 +++--
 hw/arm/xlnx-versal.c              |  2 ++
 hw/arm/xlnx-zynqmp.c              |  2 ++
 hw/arm/z2.c                       |  1 -
 hw/cpu/a15mpcore.c                |  1 +
 hw/cpu/a9mpcore.c                 |  2 +-
 hw/misc/xlnx-versal-crl.c         |  5 +++--
 target/arm/arm-powerctl.c         |  3 ++-
 target/arm/cpu.c                  | 13 +++++++++---
 target/arm/helper.c               | 30 ++++++++++++++-------------
 target/arm/hvf/hvf.c              |  6 ++++--
 target/arm/kvm.c                  |  1 +
 target/arm/machine.c              |  1 +
 target/arm/tcg/psci.c             |  3 ++-
 hw/arm/meson.build                | 23 +++++++++++----------
 hw/cpu/meson.build                |  2 +-
 hw/misc/meson.build               |  2 +-
 60 files changed, 178 insertions(+), 94 deletions(-)
 create mode 100644 target/arm/gtimer.h
 create mode 100644 target/arm/multiprocessing.h

-- 
2.41.0


Re: [PATCH 00/20] arm: Rework target/ headers to build various hw/ files once
Posted by Philippe Mathieu-Daudé 3 months, 2 weeks ago
On 18/1/24 21:06, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> In order to fix a bug noticed [*] by Cédric and Fabiano in my
> "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series,
> I ended reusing commits from other branches and it grew quite
> a lot. This is the first "cleanup" part, unrelated on MPCorePriv.
> 
> Please review,
> 
> Phil.
> 

[*] 
https://lore.kernel.org/qemu-devel/501c1bfe-fb26-42ab-a925-9888755c72ad@linaro.org/

> Philippe Mathieu-Daudé (18):
>    hw/arm/exynos4210: Include missing 'exec/tswap.h' header
>    hw/arm/xilinx_zynq: Include missing 'exec/tswap.h' header
>    hw/arm/smmuv3: Include missing 'hw/registerfields.h' header
>    hw/arm/xlnx-versal: Include missing 'cpu.h' header
>    target/arm/cpu-features: Include missing 'hw/registerfields.h' header
>    target/arm/cpregs: Include missing 'hw/registerfields.h' header
>    target/arm/cpregs: Include missing 'kvm-consts.h' header
>    target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header
>    target/arm: Declare ARM_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'
>    hw/cpu/a9mpcore: Build it only once
>    hw/misc/xlnx-versal-crl: Include generic 'cpu-qom.h' instead of
>      'cpu.h'
>    hw/misc/xlnx-versal-crl: Build it only once
>    target/arm: Expose M-profile register bank index definitions
>    hw/arm/armv7m: Make 'hw/intc/armv7m_nvic.h' a target agnostic header
>    target/arm: Move ARM_CPU_IRQ/FIQ definitions to 'cpu-qom.h' header
>    target/arm: Move e2h_access() helper around
>    target/arm: Move GTimer definitions to new 'gtimer.h' header
>    hw/arm: Build various units only once


Re: [PATCH 00/20] arm: Rework target/ headers to build various hw/ files once
Posted by Richard Henderson 3 months, 2 weeks ago
On 1/19/24 07:06, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> In order to fix a bug noticed [*] by Cédric and Fabiano in my
> "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series,
> I ended reusing commits from other branches and it grew quite
> a lot. This is the first "cleanup" part, unrelated on MPCorePriv.
> 
> Please review,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (18):
>    hw/arm/exynos4210: Include missing 'exec/tswap.h' header
>    hw/arm/xilinx_zynq: Include missing 'exec/tswap.h' header
>    hw/arm/smmuv3: Include missing 'hw/registerfields.h' header
>    hw/arm/xlnx-versal: Include missing 'cpu.h' header
>    target/arm/cpu-features: Include missing 'hw/registerfields.h' header
>    target/arm/cpregs: Include missing 'hw/registerfields.h' header
>    target/arm/cpregs: Include missing 'kvm-consts.h' header
>    target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header
>    target/arm: Declare ARM_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'
>    hw/cpu/a9mpcore: Build it only once
>    hw/misc/xlnx-versal-crl: Include generic 'cpu-qom.h' instead of
>      'cpu.h'
>    hw/misc/xlnx-versal-crl: Build it only once
>    target/arm: Expose M-profile register bank index definitions
>    hw/arm/armv7m: Make 'hw/intc/armv7m_nvic.h' a target agnostic header
>    target/arm: Move ARM_CPU_IRQ/FIQ definitions to 'cpu-qom.h' header
>    target/arm: Move e2h_access() helper around
>    target/arm: Move GTimer definitions to new 'gtimer.h' header
>    hw/arm: Build various units only once

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


Re: [PATCH 00/20] arm: Rework target/ headers to build various hw/ files once
Posted by Peter Maydell 3 months, 2 weeks ago
On Thu, 18 Jan 2024 at 20:06, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Hi,
>
> In order to fix a bug noticed [*] by Cédric and Fabiano in my
> "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series,
> I ended reusing commits from other branches and it grew quite
> a lot. This is the first "cleanup" part, unrelated on MPCorePriv.
>
> Please review,

Applied to target-arm.next, thanks.

-- PMM