[PATCH 1/3] hw/ppc: Do not open-code cpu_resume() in spin_kick()

Philippe Mathieu-Daudé posted 3 patches 3 days, 21 hours ago
Maintainers: Bernhard Beschow <shentey@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, Chinmay Rath <rathc@linux.ibm.com>
[PATCH 1/3] hw/ppc: Do not open-code cpu_resume() in spin_kick()
Posted by Philippe Mathieu-Daudé 3 days, 21 hours ago
In order to make the code easier to follow / review,
use the cpu_resume() helper instead of open-coding it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/ppc/ppce500_spin.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c
index 2310f62a91e..bc70e50e926 100644
--- a/hw/ppc/ppce500_spin.c
+++ b/hw/ppc/ppce500_spin.c
@@ -99,8 +99,7 @@ static void spin_kick(CPUState *cs, run_on_cpu_data data)
 
     cs->halted = 0;
     cs->exception_index = -1;
-    cs->stopped = false;
-    qemu_cpu_kick(cs);
+    cpu_resume(cs);
 }
 
 static void spin_write(void *opaque, hwaddr addr, uint64_t value,
-- 
2.51.0


Re: [PATCH 1/3] hw/ppc: Do not open-code cpu_resume() in spin_kick()
Posted by Richard Henderson 3 days, 21 hours ago
On 9/24/25 10:30, Philippe Mathieu-Daudé wrote:
> In order to make the code easier to follow / review,
> use the cpu_resume() helper instead of open-coding it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/ppc/ppce500_spin.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c
> index 2310f62a91e..bc70e50e926 100644
> --- a/hw/ppc/ppce500_spin.c
> +++ b/hw/ppc/ppce500_spin.c
> @@ -99,8 +99,7 @@ static void spin_kick(CPUState *cs, run_on_cpu_data data)
>   
>       cs->halted = 0;
>       cs->exception_index = -1;
> -    cs->stopped = false;
> -    qemu_cpu_kick(cs);
> +    cpu_resume(cs);
>   }
>   
>   static void spin_write(void *opaque, hwaddr addr, uint64_t value,

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

r~