[PATCH 0/3] hw/arm/v7m: Remove Cortex-M &first_cpu uses

Philippe Mathieu-Daudé posted 3 patches 2 months, 3 weeks ago
include/hw/arm/nrf51_soc.h |  2 +-
hw/arm/b-l475e-iot01a.c    |  2 +-
hw/arm/microbit.c          |  2 +-
hw/arm/mps2-tz.c           |  2 +-
hw/arm/mps2.c              |  2 +-
hw/arm/msf2-som.c          |  2 +-
hw/arm/musca.c             |  2 +-
hw/arm/netduino2.c         |  2 +-
hw/arm/netduinoplus2.c     |  2 +-
hw/arm/nrf51_soc.c         | 18 +++++++++---------
hw/arm/olimex-stm32-h405.c |  2 +-
hw/arm/stellaris.c         | 23 ++++++++++++-----------
hw/arm/stm32vldiscovery.c  |  2 +-
13 files changed, 32 insertions(+), 31 deletions(-)
[PATCH 0/3] hw/arm/v7m: Remove Cortex-M &first_cpu uses
Posted by Philippe Mathieu-Daudé 2 months, 3 weeks ago
After renaming a pair of fields in NRF51 & Stellaris boards,
remove the &first_cpu global uses in Cortex-M boards.

Rational is &first_cpu is going to be restricted to generic
accelerator code, then be removed. Similarly the global
'cpus_queue' containing target-agnostic CPUs is going to be
restricted to generic accelerator, thus hw/ won't have direct
access to it anymore.

Note, Cortex-A boards already have been dealt with in
https://lore.kernel.org/qemu-devel/20231212162935.42910-1-philmd@linaro.org/
"hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv"

Philippe Mathieu-Daudé (3):
  hw/arm/nrf51: Rename ARMv7MState 'cpu' -> 'armv7m'
  hw/arm/stellaris: Add 'armv7m' local variable
  hw/arm/v7m: Remove use of &first_cpu in machine_init()

 include/hw/arm/nrf51_soc.h |  2 +-
 hw/arm/b-l475e-iot01a.c    |  2 +-
 hw/arm/microbit.c          |  2 +-
 hw/arm/mps2-tz.c           |  2 +-
 hw/arm/mps2.c              |  2 +-
 hw/arm/msf2-som.c          |  2 +-
 hw/arm/musca.c             |  2 +-
 hw/arm/netduino2.c         |  2 +-
 hw/arm/netduinoplus2.c     |  2 +-
 hw/arm/nrf51_soc.c         | 18 +++++++++---------
 hw/arm/olimex-stm32-h405.c |  2 +-
 hw/arm/stellaris.c         | 23 ++++++++++++-----------
 hw/arm/stm32vldiscovery.c  |  2 +-
 13 files changed, 32 insertions(+), 31 deletions(-)

-- 
2.47.1


Re: [PATCH 0/3] hw/arm/v7m: Remove Cortex-M &first_cpu uses
Posted by Peter Maydell 2 months, 1 week ago
On Sun, 12 Jan 2025 at 22:56, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> After renaming a pair of fields in NRF51 & Stellaris boards,
> remove the &first_cpu global uses in Cortex-M boards.
>
> Rational is &first_cpu is going to be restricted to generic
> accelerator code, then be removed. Similarly the global
> 'cpus_queue' containing target-agnostic CPUs is going to be
> restricted to generic accelerator, thus hw/ won't have direct
> access to it anymore.
>
> Note, Cortex-A boards already have been dealt with in
> https://lore.kernel.org/qemu-devel/20231212162935.42910-1-philmd@linaro.org/
> "hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv"
>
> Philippe Mathieu-Daudé (3):
>   hw/arm/nrf51: Rename ARMv7MState 'cpu' -> 'armv7m'
>   hw/arm/stellaris: Add 'armv7m' local variable
>   hw/arm/v7m: Remove use of &first_cpu in machine_init()



Applied to target-arm.next, thanks.

-- PMM