[PATCH 1/4] target/s390x: Remove unused s390_cpu_[un]halt() user stubs

Philippe Mathieu-Daudé posted 4 patches 4 months, 1 week ago
Maintainers: Thomas Huth <thuth@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>
[PATCH 1/4] target/s390x: Remove unused s390_cpu_[un]halt() user stubs
Posted by Philippe Mathieu-Daudé 4 months, 1 week ago
Since commit da944885469 ("target/s390x: make helper.c
sysemu-only") target/s390x/helper.c is only built for
system mode, so s390_cpu_halt() and s390_cpu_unhalt()
are never called from user mode.

Fixes: da944885469 ("target/s390x: make helper.c sysemu-only")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/s390x/s390x-internal.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h
index a4ba6227ab4..6894f0a2569 100644
--- a/target/s390x/s390x-internal.h
+++ b/target/s390x/s390x-internal.h
@@ -246,16 +246,6 @@ void s390_cpu_finalize(Object *obj);
 void s390_cpu_system_class_init(CPUClass *cc);
 void s390_cpu_machine_reset_cb(void *opaque);
 bool s390_cpu_has_work(CPUState *cs);
-
-#else
-static inline unsigned int s390_cpu_halt(S390CPU *cpu)
-{
-    return 0;
-}
-
-static inline void s390_cpu_unhalt(S390CPU *cpu)
-{
-}
 #endif /* CONFIG_USER_ONLY */
 
 
-- 
2.49.0


Re: [PATCH 1/4] target/s390x: Remove unused s390_cpu_[un]halt() user stubs
Posted by Thomas Huth 4 months, 1 week ago
On 08/07/2025 11.57, Philippe Mathieu-Daudé wrote:
> Since commit da944885469 ("target/s390x: make helper.c
> sysemu-only") target/s390x/helper.c is only built for
> system mode, so s390_cpu_halt() and s390_cpu_unhalt()
> are never called from user mode.
> 
> Fixes: da944885469 ("target/s390x: make helper.c sysemu-only")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/s390x/s390x-internal.h | 10 ----------
>   1 file changed, 10 deletions(-)

There is another call to s390_cpu_unhalt() in target/s390x/tcg/excp_helper.c 
but it is protected by an #ifdef ... so this should be fine.

Reviewed-by: Thomas Huth <thuth@redhat.com>