qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] hw/arm: Move various objects to softmmu_ss to build them once (part 1)
@ 2023-01-10 16:43 Philippe Mathieu-Daudé
  2023-01-10 16:43 ` [PATCH 01/18] hw/arm: Move various units to softmmu_ss[] Philippe Mathieu-Daudé
                   ` (17 more replies)
  0 siblings, 18 replies; 35+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-10 16:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: ale, Andrey Smirnov, Thomas Huth, Peter Maydell, Alex Bennée,
	qemu-arm, Philippe Mathieu-Daudé, Niek Linnenbank,
	Jean-Christophe Dubois, Antonio Caggiano, Rob Herring,
	Antony Pavlov, Jan Kiszka, Beniamino Galvani

Hi,

This series unifies various objects from libqemu-arm-softmmu.fa.p
and libqemu-aarch64-softmmu.fa.p into libcommon.fa.p.

So instead of building each object twice, one for 32-bit ARM ARM
and another for 64-bit Aarch64, hardware-related objects are built
once.

Part #1 is the low hanging fruits :) Also I cut the series under
20 patches to ease review digestion.

The overall logic is to only access ARMCPU as opaque pointer when
possible. This way we don't depend on the (target/arm/) "cpu.h"
header which contains target-specific definitions and forces units
to be added in Meson's arm_ss[] specific source set.

In order to reduce use of "target/arm/cpu.h" by hardware units,
we split the hardware-facing definitions in the new "hw/arm/cpu.h"
header.

Finally, instead of using object_initialize() on the full ARMCPU
variable, we use object_new(TYPE ARM_CPU). Since QOM types are
registered with their class/instance size, we don't need to provide
sizeof(ARMCPU) to allocate the object.

Please review,

Phil.

Based-on: <20230109115316.2235-1-philmd@linaro.org>
          "hw/arm: Cleanups before pflash refactor"

Philippe Mathieu-Daudé (18):
  hw/arm: Move various units to softmmu_ss[]
  hw/arm/boot: Include missing 'exec/cpu-all.h' header
  target/arm/cpregs: Include missing 'target/arm/cpu.h' header
  hw/arm: Use full "target/arm/cpu.h" path to include target's "cpu.h"
  target/arm: Move CPU QOM type definitions to "hw/arm/cpu.h"
  target/arm: Move CPU definitions consumed by HW model to
    "hw/arm/cpu.h"
  hw/arm: Move more units to softmmu_ss[]
  hw/arm: Move units to softmmu[] by replacing "{target ->
    hw}/arm/cpu.h"
  hw/arm/armv7m: Remove 'target/arm/cpu.h' from NVIC header
  hw/arm: Move various armv7m-related units to softmmu_ss[]
  hw/arm/digic: Remove unnecessary target_long use
  hw/arm/digic: Replace object_initialize(ARMCPU) by object_new(ARMCPU)
  hw/arm/fsl-imx: Correct GPIO/GPT index in QOM tree
  hw/arm/fsl-imx25: Replace object_initialize(ARMCPU) by object_new()
  hw/arm/fsl-imx31: Replace object_initialize(ARMCPU) by object_new()
  hw/arm/fsl-imx7: Replace object_initialize(ARMCPU) by object_new()
  hw/arm/fsl-imx6: Replace object_initialize(ARMCPU) by object_new()
  hw/arm/allwinner: Replace object_initialize(ARMCPU) by object_new()

 hw/arm/allwinner-a10.c         | 10 ++--
 hw/arm/allwinner-h3.c          | 14 +++---
 hw/arm/armv7m.c                |  2 +
 hw/arm/boot.c                  |  1 +
 hw/arm/collie.c                |  1 -
 hw/arm/cubieboard.c            |  2 +-
 hw/arm/digic.c                 |  7 +--
 hw/arm/digic_boards.c          |  2 +-
 hw/arm/fsl-imx25.c             |  9 ++--
 hw/arm/fsl-imx31.c             |  9 ++--
 hw/arm/fsl-imx6.c              | 14 +++---
 hw/arm/fsl-imx6ul.c            | 12 ++---
 hw/arm/fsl-imx7.c              | 10 ++--
 hw/arm/gumstix.c               |  1 -
 hw/arm/highbank.c              |  2 +-
 hw/arm/imx25_pdk.c             |  2 +-
 hw/arm/integratorcp.c          |  2 +-
 hw/arm/kzm.c                   |  2 +-
 hw/arm/mainstone.c             |  2 +-
 hw/arm/mcimx6ul-evk.c          |  2 +-
 hw/arm/mcimx7d-sabre.c         |  2 +-
 hw/arm/meson.build             | 83 ++++++++++++++++++----------------
 hw/arm/musicpal.c              |  2 +-
 hw/arm/omap_sx1.c              |  1 -
 hw/arm/palm.c                  |  2 +-
 hw/arm/sabrelite.c             |  2 +-
 hw/arm/spitz.c                 |  2 +-
 hw/arm/strongarm.c             |  2 +-
 hw/arm/z2.c                    |  1 -
 include/hw/arm/allwinner-a10.h |  4 +-
 include/hw/arm/allwinner-h3.h  |  4 +-
 include/hw/arm/cpu.h           | 77 +++++++++++++++++++++++++++++++
 include/hw/arm/digic.h         |  4 +-
 include/hw/arm/fsl-imx25.h     |  4 +-
 include/hw/arm/fsl-imx31.h     |  4 +-
 include/hw/arm/fsl-imx6.h      |  4 +-
 include/hw/arm/fsl-imx6ul.h    |  4 +-
 include/hw/arm/fsl-imx7.h      |  4 +-
 include/hw/intc/armv7m_nvic.h  |  2 +-
 target/arm/cpregs.h            |  2 +
 target/arm/cpu-qom.h           | 28 +-----------
 target/arm/cpu.h               | 42 ++---------------
 42 files changed, 205 insertions(+), 181 deletions(-)
 create mode 100644 include/hw/arm/cpu.h

-- 
2.38.1



^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2025-04-02 15:30 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10 16:43 [PATCH 00/18] hw/arm: Move various objects to softmmu_ss to build them once (part 1) Philippe Mathieu-Daudé
2023-01-10 16:43 ` [PATCH 01/18] hw/arm: Move various units to softmmu_ss[] Philippe Mathieu-Daudé
2023-01-11 19:53   ` Richard Henderson
2023-01-10 16:43 ` [PATCH 02/18] hw/arm/boot: Include missing 'exec/cpu-all.h' header Philippe Mathieu-Daudé
2023-01-11 19:55   ` Richard Henderson
2023-01-10 16:43 ` [PATCH 03/18] target/arm/cpregs: Include missing 'target/arm/cpu.h' header Philippe Mathieu-Daudé
2023-01-11 19:56   ` Richard Henderson
2023-01-10 16:43 ` [PATCH 04/18] hw/arm: Use full "target/arm/cpu.h" path to include target's "cpu.h" Philippe Mathieu-Daudé
2023-01-11 19:58   ` Richard Henderson
2023-01-10 16:43 ` [PATCH 05/18] target/arm: Move CPU QOM type definitions to "hw/arm/cpu.h" Philippe Mathieu-Daudé
2023-01-11 20:02   ` Richard Henderson
2023-01-12  7:17     ` Philippe Mathieu-Daudé
2025-04-02  4:06       ` Philippe Mathieu-Daudé
2025-04-02  4:59         ` Philippe Mathieu-Daudé
2025-04-02 15:29         ` Pierrick Bouvier
2023-01-10 16:43 ` [PATCH 06/18] target/arm: Move CPU definitions consumed by HW model " Philippe Mathieu-Daudé
2025-04-02  4:08   ` Philippe Mathieu-Daudé
2023-01-10 16:43 ` [PATCH 07/18] hw/arm: Move more units to softmmu_ss[] Philippe Mathieu-Daudé
2023-01-10 16:43 ` [PATCH 08/18] hw/arm: Move units to softmmu[] by replacing "{target -> hw}/arm/cpu.h" Philippe Mathieu-Daudé
2023-01-10 16:43 ` [PATCH 09/18] hw/arm/armv7m: Remove 'target/arm/cpu.h' from NVIC header Philippe Mathieu-Daudé
2023-01-10 16:43 ` [PATCH 10/18] hw/arm: Move various armv7m-related units to softmmu_ss[] Philippe Mathieu-Daudé
2023-01-10 16:43 ` [PATCH 11/18] hw/arm/digic: Remove unnecessary target_long use Philippe Mathieu-Daudé
2023-01-11 20:04   ` Richard Henderson
2023-01-10 16:44 ` [PATCH 12/18] hw/arm/digic: Replace object_initialize(ARMCPU) by object_new(ARMCPU) Philippe Mathieu-Daudé
2023-01-10 16:52   ` Peter Maydell
2023-01-11  9:01     ` Philippe Mathieu-Daudé
2023-01-25 11:58     ` Alex Bennée
2023-01-26 12:43       ` Peter Maydell
2023-01-10 16:44 ` [PATCH 13/18] hw/arm/fsl-imx: Correct GPIO/GPT index in QOM tree Philippe Mathieu-Daudé
2025-04-02  4:12   ` Philippe Mathieu-Daudé
2023-01-10 16:44 ` [PATCH 14/18] hw/arm/fsl-imx25: Replace object_initialize(ARMCPU) by object_new() Philippe Mathieu-Daudé
2023-01-10 16:44 ` [PATCH 15/18] hw/arm/fsl-imx31: " Philippe Mathieu-Daudé
2023-01-10 16:44 ` [PATCH 16/18] hw/arm/fsl-imx7: " Philippe Mathieu-Daudé
2023-01-10 16:44 ` [PATCH 17/18] hw/arm/fsl-imx6: " Philippe Mathieu-Daudé
2023-01-10 16:44 ` [PATCH 18/18] hw/arm/allwinner: " Philippe Mathieu-Daudé

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).