[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c |
Date: |
Tue, 24 Sep 2019 11:52:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 9/23/19 4:34 PM, Peter Maydell wrote:
> On Sat, 21 Sep 2019 at 16:04, Thomas Huth <address@hidden> wrote:
>>
>> We are going to make CONFIG_ARM_V7M optional, so the related cortex-m
>> CPUs should only be created if the switch is enabled. This can best
>> be done if the code resides in a separate file, thus move the related
>> functions to a new file v7m.c which only gets compiled if CONFIG_ARM_V7M
>> is enabled.
>>
>> Signed-off-by: Thomas Huth <address@hidden>
>> ---
>> target/arm/Makefile.objs | 1 +
>> target/arm/cpu.c | 146 -----------------------------
>> target/arm/v7m.c | 193 +++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 194 insertions(+), 146 deletions(-)
>> create mode 100644 target/arm/v7m.c
>
> Calling the new file something with 'cpu' in it would help
> to convey that it does the same kinds of things as
> cpu.c and cpu64.c. Maybe cpu-m.c or cpu-v7m.c ?
I agree to your other comment:
From a CONFIG switch point of view I don't think it's
worth being able to #ifdef out the various flavours of
M-profile individually.
So I'm in favor of using cpu-m.c.
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, (continued)
[PATCH 4/4] default-configs: Do not enforce CONFIG_ARM_V7M anymore, Thomas Huth, 2019/09/21
[PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Thomas Huth, 2019/09/21
Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Peter Maydell, 2019/09/23
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c,
Philippe Mathieu-Daudé <=
Re: [PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n, Philippe Mathieu-Daudé, 2019/09/23