[PATCH 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M

Thomas Huth posted 3 patches 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240126084001.879548-1-thuth@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
target/arm/tcg/cpu-v7m.c   | 292 +++++++++++++++++++++++++++++++++++++
target/arm/tcg/cpu32.c     | 261 ---------------------------------
target/arm/tcg/m_helper.c  |   3 +-
target/arm/Kconfig         |   4 -
target/arm/tcg/meson.build |   4 +
5 files changed, 298 insertions(+), 266 deletions(-)
create mode 100644 target/arm/tcg/cpu-v7m.c
[PATCH 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M
Posted by Thomas Huth 10 months ago
We've got a switch to disable v7m code since a long time - but it
currently cannot be disabled since linking then fails due to missing
functions. But thanks to the clean-ups that have been done during the
past years, it's not that difficult anymore to finally make it possible
to disable CONFIG_ARM_V7M: We just have to move some v7m-related code
out of cpu32.c to a separate file (that we only compile if the switch
CONFIG_ARM_V7M is enabled) and make sure to use the stub functions in
m_helper.c if it is disabled. Then we can finally remove the hard-coded
"select ARM_V7M" from the Kconfig file.

Thomas Huth (3):
  target/arm: Move v7m-related code from cpu32.c into a separate file
  target/arm/tcg/m_helper.c: Include the full helpers only with
    CONFIG_ARM_V7M
  target/arm/Kconfig: Stop requiring CONFIG_ARM_V7M

 target/arm/tcg/cpu-v7m.c   | 292 +++++++++++++++++++++++++++++++++++++
 target/arm/tcg/cpu32.c     | 261 ---------------------------------
 target/arm/tcg/m_helper.c  |   3 +-
 target/arm/Kconfig         |   4 -
 target/arm/tcg/meson.build |   4 +
 5 files changed, 298 insertions(+), 266 deletions(-)
 create mode 100644 target/arm/tcg/cpu-v7m.c

-- 
2.43.0
Re: [PATCH 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M
Posted by Fabiano Rosas 10 months ago
Thomas Huth <thuth@redhat.com> writes:

> We've got a switch to disable v7m code since a long time - but it
> currently cannot be disabled since linking then fails due to missing
> functions. But thanks to the clean-ups that have been done during the
> past years, it's not that difficult anymore to finally make it possible
> to disable CONFIG_ARM_V7M: We just have to move some v7m-related code
> out of cpu32.c to a separate file (that we only compile if the switch
> CONFIG_ARM_V7M is enabled) and make sure to use the stub functions in
> m_helper.c if it is disabled. Then we can finally remove the hard-coded
> "select ARM_V7M" from the Kconfig file.
>
> Thomas Huth (3):
>   target/arm: Move v7m-related code from cpu32.c into a separate file
>   target/arm/tcg/m_helper.c: Include the full helpers only with
>     CONFIG_ARM_V7M
>   target/arm/Kconfig: Stop requiring CONFIG_ARM_V7M
>
>  target/arm/tcg/cpu-v7m.c   | 292 +++++++++++++++++++++++++++++++++++++
>  target/arm/tcg/cpu32.c     | 261 ---------------------------------
>  target/arm/tcg/m_helper.c  |   3 +-
>  target/arm/Kconfig         |   4 -
>  target/arm/tcg/meson.build |   4 +
>  5 files changed, 298 insertions(+), 266 deletions(-)
>  create mode 100644 target/arm/tcg/cpu-v7m.c

Tested-by: Fabiano Rosas <farosas@suse.de>