qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	"Fabiano Rosas" <farosas@suse.de>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 2/3] target/arm/tcg/m_helper.c: Include the full helpers only with CONFIG_ARM_V7M
Date: Thu, 1 Feb 2024 14:19:40 +0000	[thread overview]
Message-ID: <CAFEAcA-yL8BAdtkF2xaWJOeFPUWRoBbuvPSEeorwjyei3oFjDQ@mail.gmail.com> (raw)
In-Reply-To: <20240129081835.137726-3-thuth@redhat.com>

On Mon, 29 Jan 2024 at 08:18, Thomas Huth <thuth@redhat.com> wrote:
>
> If CONFIG_ARM_V7M is not set, we don't want to include the full-fledged
> helper functions that require additional functions for linking. The
> reduced set of the linux-user functions works fine as stubs in this
> case, so change the #ifdef statement accordingly.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  target/arm/tcg/m_helper.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c
> index d1f1e02acc..a5a6e96fc3 100644
> --- a/target/arm/tcg/m_helper.c
> +++ b/target/arm/tcg/m_helper.c
> @@ -22,6 +22,7 @@
>  #endif
>  #if !defined(CONFIG_USER_ONLY)
>  #include "hw/intc/armv7m_nvic.h"
> +#include CONFIG_DEVICES
>  #endif
>
>  static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
> @@ -69,7 +70,7 @@ uint32_t arm_v7m_mrs_control(CPUARMState *env, uint32_t secure)
>      return value;
>  }
>
> -#ifdef CONFIG_USER_ONLY
> +#if defined(CONFIG_USER_ONLY) || !defined(CONFIG_ARM_V7M)

This looks a bit odd. If we don't have CONFIG_ARM_V7M
why are we compiling this file at all?

>
>  void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
>  {

thanks
-- PMM


  reply	other threads:[~2024-02-01 14:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29  8:18 [PATCH v2 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M Thomas Huth
2024-01-29  8:18 ` [PATCH v2 1/3] target/arm: Move v7m-related code from cpu32.c into a separate file Thomas Huth
2024-01-29  8:54   ` Paolo Bonzini
2024-01-29 10:35     ` Peter Maydell
2024-02-01 14:17   ` Peter Maydell
2024-02-01 18:52     ` Thomas Huth
2024-02-22 10:22       ` Thomas Huth
2024-03-04 15:29       ` Peter Maydell
2024-01-29  8:18 ` [PATCH v2 2/3] target/arm/tcg/m_helper.c: Include the full helpers only with CONFIG_ARM_V7M Thomas Huth
2024-02-01 14:19   ` Peter Maydell [this message]
2024-02-01 19:12     ` Thomas Huth
2024-03-04 15:22       ` Peter Maydell
2024-03-08 12:54         ` Thomas Huth
2024-03-08 14:00           ` Peter Maydell
2024-03-08 14:14             ` Thomas Huth
2024-01-29  8:18 ` [PATCH v2 3/3] target/arm/Kconfig: Stop requiring CONFIG_ARM_V7M Thomas Huth
2024-03-01 19:12 ` [PATCH v2 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M Thomas Huth

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=CAFEAcA-yL8BAdtkF2xaWJOeFPUWRoBbuvPSEeorwjyei3oFjDQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=farosas@suse.de \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).