mbox series

[PATCH-for-8.2?,v2,0/4] hw/arm/stm32xxx: Report error when incorrect CPU is used

Message ID 20231117071704.35040-1-philmd@linaro.org
Headers show
Series hw/arm/stm32xxx: Report error when incorrect CPU is used | expand

Message

Philippe Mathieu-Daudé Nov. 17, 2023, 7:17 a.m. UTC
Series fully reviewed.

Hi,

While reviewing this [*] series from Arnaud and Inès,
I realized STM32 based boards don't check the requested
CPU type is correct, and ignore it. Possibly confusing
users.
Since these simple boards code is used as template,
I took the opportunity to sanitize it a bit, using the
MachineClass::valid_cpu_types which seems simpler (to me)
for newcomers.

Patches are candidate for 8.2 but this is a long
standing issue, not a regression from 8.1.

Regards,

Phil.

[*] https://lore.kernel.org/qemu-devel/170003673257.14701.8139061802716120109-0@git.sr.ht/

Gavin Shan (1):
  hw/core/machine: Constify MachineClass::valid_cpu_types[]

Philippe Mathieu-Daudé (3):
  hw/arm/stm32f405: Report error when incorrect CPU is used
  hw/arm/stm32f205: Report error when incorrect CPU is used
  hw/arm/stm32f100: Report error when incorrect CPU is used

 include/hw/arm/stm32f100_soc.h |  4 ----
 include/hw/arm/stm32f205_soc.h |  4 ----
 include/hw/arm/stm32f405_soc.h |  4 ----
 include/hw/boards.h            |  2 +-
 hw/arm/netduino2.c             |  7 ++++++-
 hw/arm/netduinoplus2.c         |  7 ++++++-
 hw/arm/olimex-stm32-h405.c     |  8 ++++++--
 hw/arm/stm32f100_soc.c         |  9 ++-------
 hw/arm/stm32f205_soc.c         |  9 ++-------
 hw/arm/stm32f405_soc.c         |  8 +-------
 hw/arm/stm32vldiscovery.c      |  7 ++++++-
 hw/hppa/machine.c              | 22 ++++++++++------------
 hw/m68k/q800.c                 | 11 +++++------
 13 files changed, 45 insertions(+), 57 deletions(-)

Comments

Peter Maydell Nov. 20, 2023, 3:31 p.m. UTC | #1
On Fri, 17 Nov 2023 at 07:17, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Series fully reviewed.
>
> Hi,
>
> While reviewing this [*] series from Arnaud and Inès,
> I realized STM32 based boards don't check the requested
> CPU type is correct, and ignore it. Possibly confusing
> users.
> Since these simple boards code is used as template,
> I took the opportunity to sanitize it a bit, using the
> MachineClass::valid_cpu_types which seems simpler (to me)
> for newcomers.
>
> Patches are candidate for 8.2 but this is a long
> standing issue, not a regression from 8.1.
>



Applied to target-arm.next, thanks.

-- PMM