[PATCH v8 17/74] hw/semihosting: convert to cpu_halted_set

Robert Foley posted 74 patches 5 years, 7 months ago
Maintainers: Roman Bolshakov <r.bolshakov@yadro.com>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>, Palmer Dabbelt <palmer@dabbelt.com>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Artyom Tarasenko <atar4qemu@gmail.com>, "Alex Bennée" <alex.bennee@linaro.org>, Cornelia Huck <cohuck@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Aurelien Jarno <aurelien@aurel32.net>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, David Hildenbrand <david@redhat.com>, Laurent Vivier <laurent@vivier.eu>, Paolo Bonzini <pbonzini@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <rth@twiddle.net>, Sagar Karandikar <sagark@eecs.berkeley.edu>, Sunil Muthuswamy <sunilmut@microsoft.com>, Max Filippov <jcmvbkbc@gmail.com>, Alistair Francis <Alistair.Francis@wdc.com>
There is a newer version of this series
[PATCH v8 17/74] hw/semihosting: convert to cpu_halted_set
Posted by Robert Foley 5 years, 7 months ago
Signed-off-by: Robert Foley <robert.foley@linaro.org>
---
 hw/semihosting/console.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/semihosting/console.c b/hw/semihosting/console.c
index 6346bd7f50..f70085f3c1 100644
--- a/hw/semihosting/console.c
+++ b/hw/semihosting/console.c
@@ -131,7 +131,7 @@ static void console_wake_up(gpointer data, gpointer user_data)
 {
     CPUState *cs = (CPUState *) data;
     /* cpu_handle_halt won't know we have work so just unbung here */
-    cs->halted = 0;
+    cpu_halted_set(cs, 0);
     qemu_cpu_kick(cs);
 }
 
@@ -154,7 +154,7 @@ target_ulong qemu_semihosting_console_inc(CPUArchState *env)
     g_assert(current_cpu);
     if (fifo8_is_empty(&c->fifo)) {
         c->sleeping_cpus = g_slist_prepend(c->sleeping_cpus, current_cpu);
-        current_cpu->halted = 1;
+        cpu_halted_set(current_cpu, 1);
         current_cpu->exception_index = EXCP_HALTED;
         cpu_loop_exit(current_cpu);
         /* never returns */
-- 
2.17.1


Re: [PATCH v8 17/74] hw/semihosting: convert to cpu_halted_set
Posted by Alex Bennée 5 years, 6 months ago
Robert Foley <robert.foley@linaro.org> writes:

> Signed-off-by: Robert Foley <robert.foley@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  hw/semihosting/console.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/semihosting/console.c b/hw/semihosting/console.c
> index 6346bd7f50..f70085f3c1 100644
> --- a/hw/semihosting/console.c
> +++ b/hw/semihosting/console.c
> @@ -131,7 +131,7 @@ static void console_wake_up(gpointer data, gpointer user_data)
>  {
>      CPUState *cs = (CPUState *) data;
>      /* cpu_handle_halt won't know we have work so just unbung here */
> -    cs->halted = 0;
> +    cpu_halted_set(cs, 0);
>      qemu_cpu_kick(cs);
>  }
>  
> @@ -154,7 +154,7 @@ target_ulong qemu_semihosting_console_inc(CPUArchState *env)
>      g_assert(current_cpu);
>      if (fifo8_is_empty(&c->fifo)) {
>          c->sleeping_cpus = g_slist_prepend(c->sleeping_cpus, current_cpu);
> -        current_cpu->halted = 1;
> +        cpu_halted_set(current_cpu, 1);
>          current_cpu->exception_index = EXCP_HALTED;
>          cpu_loop_exit(current_cpu);
>          /* never returns */


-- 
Alex Bennée