[PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n

Thomas Huth posted 4 patches 4 years, 6 months ago
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test asan failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190921150420.30743-1-thuth@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>
default-configs/arm-softmmu.mak |   3 -
hw/arm/Makefile.objs            |   2 +
hw/{intc => arm}/armv7m_nvic.c  |   0
hw/arm/trace-events             |  17 +++
hw/intc/Makefile.objs           |   1 -
hw/intc/trace-events            |  17 ---
target/arm/Makefile.objs        |   1 +
target/arm/cpu.c                | 166 +--------------------------
target/arm/cpu64.c              |  17 +--
target/arm/internals.h          |  18 +++
target/arm/v7m.c                | 193 ++++++++++++++++++++++++++++++++
11 files changed, 234 insertions(+), 201 deletions(-)
rename hw/{intc => arm}/armv7m_nvic.c (100%)
create mode 100644 target/arm/v7m.c
[PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n
Posted by Thomas Huth 4 years, 6 months ago
We've got CONFIG_ARM_V7M, but it currently can't be disabled.
Here are some patches that should allow to disable the switch
(if the corresponding boards are disabled, too).

RFC -> v1:
 - Move the definitions into internals.h instead of cpu.h in the 1st patch
 - Instead of creating an ugly stubs file, simply make armv7m_nvic.c
   mandatory for linking.

Thomas Huth (4):
  target/arm: Make cpu_register() and set_feature() available for other
    files
  target/arm: Move cortex-m related functions to new file v7m.c
  hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm
    builds
  default-configs: Do not enforce CONFIG_ARM_V7M anymore

 default-configs/arm-softmmu.mak |   3 -
 hw/arm/Makefile.objs            |   2 +
 hw/{intc => arm}/armv7m_nvic.c  |   0
 hw/arm/trace-events             |  17 +++
 hw/intc/Makefile.objs           |   1 -
 hw/intc/trace-events            |  17 ---
 target/arm/Makefile.objs        |   1 +
 target/arm/cpu.c                | 166 +--------------------------
 target/arm/cpu64.c              |  17 +--
 target/arm/internals.h          |  18 +++
 target/arm/v7m.c                | 193 ++++++++++++++++++++++++++++++++
 11 files changed, 234 insertions(+), 201 deletions(-)
 rename hw/{intc => arm}/armv7m_nvic.c (100%)
 create mode 100644 target/arm/v7m.c

-- 
2.18.1


Re: [PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n
Posted by Philippe Mathieu-Daudé 4 years, 6 months ago
Hi Thomas,

On 9/21/19 5:04 PM, Thomas Huth wrote:
> We've got CONFIG_ARM_V7M, but it currently can't be disabled.
> Here are some patches that should allow to disable the switch
> (if the corresponding boards are disabled, too).

What about the ARMv4/v5/v6/v7r?

Re: [PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n
Posted by Thomas Huth 4 years, 6 months ago
On 23/09/2019 10.37, Philippe Mathieu-Daudé wrote:
> Hi Thomas,
> 
> On 9/21/19 5:04 PM, Thomas Huth wrote:
>> We've got CONFIG_ARM_V7M, but it currently can't be disabled.
>> Here are some patches that should allow to disable the switch
>> (if the corresponding boards are disabled, too).
> 
> What about the ARMv4/v5/v6/v7r?

We don't have config switches for these yet, do we? You started to
introduce them in some of your TCG-disablement patches which are not
merged yet, so that's something that should be addressed once they are
merged, or directly in your series. Here, I wanted to provide you with
these patches so that the arm_cpu_register() is available for your
patches / later clean-up patches ... I mentioned that in the RFC cover
letter
(https://www.mail-archive.com/qemu-devel@nongnu.org/msg641907.html) but
forgot to copy / update that paragraph for this cover letter here again :-/

 Thomas

Re: [PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n
Posted by Philippe Mathieu-Daudé 4 years, 6 months ago
On 9/23/19 10:50 AM, Thomas Huth wrote:
> On 23/09/2019 10.37, Philippe Mathieu-Daudé wrote:
>> Hi Thomas,
>>
>> On 9/21/19 5:04 PM, Thomas Huth wrote:
>>> We've got CONFIG_ARM_V7M, but it currently can't be disabled.
>>> Here are some patches that should allow to disable the switch
>>> (if the corresponding boards are disabled, too).
>>
>> What about the ARMv4/v5/v6/v7r?
> 
> We don't have config switches for these yet, do we? You started to
> introduce them in some of your TCG-disablement patches which are not
> merged yet, so that's something that should be addressed once they are
> merged, or directly in your series. Here, I wanted to provide you with
> these patches so that the arm_cpu_register() is available for your
> patches / later clean-up patches ... I mentioned that in the RFC cover
> letter
> (https://www.mail-archive.com/qemu-devel@nongnu.org/msg641907.html) but
> forgot to copy / update that paragraph for this cover letter here again :-/

Oh OK, I thought it was a complete replacement of my series, now I
understand this only address the V7M case which is the sole switch
available as of today.

Thanks,

Phil.