[PATCH] hw/arm: remove `inline` from `smmu_iotlb_inv_vmid_s1`

Roman Kiryanov posted 1 patch 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250717205735.2345674-1-rkir@google.com
Maintainers: Eric Auger <eric.auger@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmu-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hw/arm: remove `inline` from `smmu_iotlb_inv_vmid_s1`
Posted by Roman Kiryanov 4 months ago
this function is declared in smmu-common.h without
`inline`. It is also used outside of this file
which causes linking errors because the non-inline
version is not generated.

Signed-off-by: Will Hollins <whollins@google.com>
Signed-off-by: Roman Kiryanov <rkir@google.com>
---
 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 f39b99e526..0dcaf2f589 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -319,7 +319,7 @@ void smmu_iotlb_inv_vmid(SMMUState *s, int vmid)
     g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid);
 }
 
-inline void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid)
+void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid)
 {
     trace_smmu_iotlb_inv_vmid_s1(vmid);
     g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid_s1, &vmid);
-- 
2.50.0.727.gbf7dc18ff4-goog
Re: [PATCH] hw/arm: remove `inline` from `smmu_iotlb_inv_vmid_s1`
Posted by Philippe Mathieu-Daudé 4 months ago
On 17/7/25 22:57, Roman Kiryanov wrote:
> this function is declared in smmu-common.h without
> `inline`. It is also used outside of this file
> which causes linking errors because the non-inline
> version is not generated.
> 
> Signed-off-by: Will Hollins <whollins@google.com>
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
>   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 f39b99e526..0dcaf2f589 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -319,7 +319,7 @@ void smmu_iotlb_inv_vmid(SMMUState *s, int vmid)
>       g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid);
>   }
>   
> -inline void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid)
> +void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid)
>   {
>       trace_smmu_iotlb_inv_vmid_s1(vmid);
>       g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid_s1, &vmid);

Already posted (but missed):
https://lore.kernel.org/qemu-devel/20250214072029.515379-1-jansef.jian@hj-micro.com/
Re: [PATCH] hw/arm: remove `inline` from `smmu_iotlb_inv_vmid_s1`
Posted by Richard Henderson 4 months ago
On 7/17/25 13:57, Roman Kiryanov wrote:
> this function is declared in smmu-common.h without
> `inline`. It is also used outside of this file
> which causes linking errors because the non-inline
> version is not generated.
> 
> Signed-off-by: Will Hollins <whollins@google.com>
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
>   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 f39b99e526..0dcaf2f589 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -319,7 +319,7 @@ void smmu_iotlb_inv_vmid(SMMUState *s, int vmid)
>       g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid);
>   }
>   
> -inline void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid)
> +void smmu_iotlb_inv_vmid_s1(SMMUState *s, int vmid)
>   {
>       trace_smmu_iotlb_inv_vmid_s1(vmid);
>       g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid_s1, &vmid);

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~