From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Fabiano Rosas <farosas@suse.de>
Subject: Re: [PATCH 1/3] target/arm: Move v7m-related code from cpu32.c into a separate file
Date: Fri, 26 Jan 2024 18:02:20 +0100 [thread overview]
Message-ID: <d20632bb-54f7-4f9a-afc4-535bea6f5da2@redhat.com> (raw)
In-Reply-To: <17455043-25cf-4978-afdd-147e689a1abd@linaro.org>
On 26/01/2024 11.44, Philippe Mathieu-Daudé wrote:
> Hi Thomas,
>
> On 26/1/24 09:39, Thomas Huth wrote:
>> Move the code to a separate file so that we do not have to compile
>> it anymore if CONFIG_ARM_V7M is not set.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> target/arm/tcg/cpu-v7m.c | 292 +++++++++++++++++++++++++++++++++++++
>> target/arm/tcg/cpu32.c | 261 ---------------------------------
>> target/arm/tcg/meson.build | 4 +
>> 3 files changed, 296 insertions(+), 261 deletions(-)
>> create mode 100644 target/arm/tcg/cpu-v7m.c
>>
>> diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c
>> new file mode 100644
>> index 0000000000..d61873ab6d
>> --- /dev/null
>> +++ b/target/arm/tcg/cpu-v7m.c
>> @@ -0,0 +1,292 @@
>> +/*
>> + * QEMU ARM V7 TCG-only CPUs.
>
> s/V7/v7M/
ok
>> + *
>> + * Copyright (c) 2012 SUSE LINUX Products GmbH
>> + *
>> + * This code is licensed under the GNU GPL v2 or later.
>> + *
>> + * SPDX-License-Identifier: GPL-2.0-or-later
>> + */
>> +
>> +#include "qemu/osdep.h"
>> +#include "cpu.h"
>> +#include "hw/core/tcg-cpu-ops.h"
>> +#include "internals.h"
>> +#include "hw/intc/armv7m_nvic.h"
>> +
>> +/* CPU models. These are not needed for the AArch64 linux-user build. */
>> +#if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
>
> Could we do that in meson instead?
I don't think so... (see below)
>> diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
>> index 6fca38f2cc..8c7f6b43f3 100644
>> --- a/target/arm/tcg/meson.build
>> +++ b/target/arm/tcg/meson.build
>> @@ -52,6 +52,10 @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
>> 'sve_helper.c',
>> ))
>> +arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files(
>
> -> arm_system_ss
Don't we still need the code for the 32-bit qemu-arm binary? See:
$ ./qemu-arm -cpu help | grep cortex-m
cortex-m0
cortex-m3
cortex-m33
cortex-m4
cortex-m55
cortex-m7
So I don't think we should add this to arm_system_ss only, should we?
Thomas
>> + 'cpu-v7m.c'
>> +))
>
next prev parent reply other threads:[~2024-01-26 17:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 8:39 [PATCH 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M Thomas Huth
2024-01-26 8:39 ` [PATCH 1/3] target/arm: Move v7m-related code from cpu32.c into a separate file Thomas Huth
2024-01-26 10:44 ` Philippe Mathieu-Daudé
2024-01-26 17:02 ` Thomas Huth [this message]
2024-01-26 8:40 ` [PATCH 2/3] target/arm/tcg/m_helper.c: Include the full helpers only with CONFIG_ARM_V7M Thomas Huth
2024-01-26 8:40 ` [PATCH 3/3] target/arm/Kconfig: Stop requiring CONFIG_ARM_V7M Thomas Huth
2024-01-26 13:44 ` [PATCH 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M Fabiano Rosas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d20632bb-54f7-4f9a-afc4-535bea6f5da2@redhat.com \
--to=thuth@redhat.com \
--cc=farosas@suse.de \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).