qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	 Richard Henderson <richard.henderson@linaro.org>,
	qemu-arm@nongnu.org
Subject: Re: [PATCH-for-9.0? v2 1/4] hw/arm/smmu: Avoid using inlined functions with external linkage again
Date: Tue, 26 Mar 2024 18:33:07 +0100	[thread overview]
Message-ID: <7cc63c22-6113-4b48-9e73-8405a6ddd4b5@redhat.com> (raw)
In-Reply-To: <20240326171009.26696-2-philmd@linaro.org>

Hi,

On 3/26/24 18:10, Philippe Mathieu-Daudé wrote:
> Similarly to commit 9de9fa5cf2 ("hw/arm/smmu-common: Avoid using
> inlined functions with external linkage"):
>
>   None of our code base require / use inlined functions with external
>   linkage. Some places use internal inlining in the hot path. These
>   two functions are certainly not in any hot path and don't justify
>   any inlining, so these are likely oversights rather than intentional.
>
> Fix:
>
>   C compiler for the host machine: clang (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.3.9.4)")
>   ...
>   hw/arm/smmu-common.c:203:43: error: static function 'smmu_hash_remove_by_vmid' is
>   used in an inline function with external linkage [-Werror,-Wstatic-in-inline]
>       g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid);
>                                             ^
>   include/hw/arm/smmu-common.h:197:1: note: use 'static' to give inline function 'smmu_iotlb_inv_vmid' internal linkage
>   void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid);
>   ^
>   static
>   hw/arm/smmu-common.c:139:17: note: 'smmu_hash_remove_by_vmid' declared here
>   static gboolean smmu_hash_remove_by_vmid(gpointer key, gpointer value,
>                 ^
>
> Fixes: ccc3ee3871 ("hw/arm/smmuv3: Add CMDs related to stage-2")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20240313184954.42513-2-philmd@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric
> ---
>  hw/arm/smmu-common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
> index 4caedb4998..c4b540656c 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -197,7 +197,7 @@ void smmu_iotlb_inv_asid(SMMUState *s, uint16_t asid)
>      g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_asid, &asid);
>  }
>  
> -inline void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid)
> +void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid)
>  {
>      trace_smmu_iotlb_inv_vmid(vmid);
>      g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid);



  reply	other threads:[~2024-03-26 17:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 17:10 [PATCH-for-9.0? v2 0/4] overall: Avoid using inlined functions with external linkage again Philippe Mathieu-Daudé
2024-03-26 17:10 ` [PATCH-for-9.0? v2 1/4] hw/arm/smmu: " Philippe Mathieu-Daudé
2024-03-26 17:33   ` Eric Auger [this message]
2024-03-26 17:10 ` [PATCH-for-9.0? v2 2/4] accel/hvf: Un-inline hvf_arch_supports_guest_debug() Philippe Mathieu-Daudé
2024-03-26 17:10 ` [PATCH-for-9.0? v2 3/4] qtest/libqos: Reduce size_to_prdtl() declaration scope Philippe Mathieu-Daudé
2024-03-26 17:19   ` Peter Maydell
2024-03-26 17:24   ` Thomas Huth
2024-03-26 17:10 ` [PATCH-for-9.0? v2 4/4] meson: Enable -Wstatic-in-inline Philippe Mathieu-Daudé
2024-03-26 17:28   ` Thomas Huth
2024-03-27  7:49     ` Philippe Mathieu-Daudé
2024-03-27  9:26   ` Paolo Bonzini
2024-03-27 12:42     ` Philippe Mathieu-Daudé
2024-03-27 14:12       ` Paolo Bonzini

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=7cc63c22-6113-4b48-9e73-8405a6ddd4b5@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).