[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 26/73] sparc: convert to cpu_halted
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-devel] [PATCH v5 26/73] sparc: convert to cpu_halted |
Date: |
Mon, 17 Dec 2018 12:53:20 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
On 13/12/2018 05:04, Emilio G. Cota wrote:
> Cc: Fabien Chouteau <address@hidden>
> Cc: Mark Cave-Ayland <address@hidden>
> Cc: Artyom Tarasenko <address@hidden>
> Reviewed-by: Richard Henderson <address@hidden>
> Reviewed-by: Alex Bennée <address@hidden>
> Signed-off-by: Emilio G. Cota <address@hidden>
> ---
> hw/sparc/leon3.c | 2 +-
> hw/sparc/sun4m.c | 8 ++++----
> hw/sparc64/sparc64.c | 4 ++--
> target/sparc/helper.c | 2 +-
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> index fa98ab8177..0746001f91 100644
> --- a/hw/sparc/leon3.c
> +++ b/hw/sparc/leon3.c
> @@ -61,7 +61,7 @@ static void main_cpu_reset(void *opaque)
>
> cpu_reset(cpu);
>
> - cpu->halted = 0;
> + cpu_halted_set(cpu, 0);
> env->pc = s->entry;
> env->npc = s->entry + 4;
> env->regbase[6] = s->sp;
> diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
> index 3c29b68e67..5bd6512b2b 100644
> --- a/hw/sparc/sun4m.c
> +++ b/hw/sparc/sun4m.c
> @@ -168,7 +168,7 @@ static void cpu_kick_irq(SPARCCPU *cpu)
> CPUSPARCState *env = &cpu->env;
> CPUState *cs = CPU(cpu);
>
> - cs->halted = 0;
> + cpu_halted_set(cs, 0);
> cpu_check_irqs(env);
> qemu_cpu_kick(cs);
> }
> @@ -199,7 +199,7 @@ static void main_cpu_reset(void *opaque)
> CPUState *cs = CPU(cpu);
>
> cpu_reset(cs);
> - cs->halted = 0;
> + cpu_halted_set(cs, 0);
> }
>
> static void secondary_cpu_reset(void *opaque)
> @@ -208,7 +208,7 @@ static void secondary_cpu_reset(void *opaque)
> CPUState *cs = CPU(cpu);
>
> cpu_reset(cs);
> - cs->halted = 1;
> + cpu_halted_set(cs, 1);
> }
>
> static void cpu_halt_signal(void *opaque, int irq, int level)
> @@ -825,7 +825,7 @@ static void cpu_devinit(const char *cpu_type, unsigned
> int id,
> } else {
> qemu_register_reset(secondary_cpu_reset, cpu);
> cs = CPU(cpu);
> - cs->halted = 1;
> + cpu_halted_set(cs, 1);
> }
> *cpu_irqs = qemu_allocate_irqs(cpu_set_irq, cpu, MAX_PILS);
> env->prom_addr = prom_addr;
> diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c
> index 408388945e..372bbd4f5b 100644
> --- a/hw/sparc64/sparc64.c
> +++ b/hw/sparc64/sparc64.c
> @@ -100,7 +100,7 @@ static void cpu_kick_irq(SPARCCPU *cpu)
> CPUState *cs = CPU(cpu);
> CPUSPARCState *env = &cpu->env;
>
> - cs->halted = 0;
> + cpu_halted_set(cs, 0);
> cpu_check_irqs(env);
> qemu_cpu_kick(cs);
> }
> @@ -115,7 +115,7 @@ void sparc64_cpu_set_ivec_irq(void *opaque, int irq, int
> level)
> if (!(env->ivec_status & 0x20)) {
> trace_sparc64_cpu_ivec_raise_irq(irq);
> cs = CPU(cpu);
> - cs->halted = 0;
> + cpu_halted_set(cs, 0);
> env->interrupt_index = TT_IVEC;
> env->ivec_status |= 0x20;
> env->ivec_data[0] = (0x1f << 6) | irq;
> diff --git a/target/sparc/helper.c b/target/sparc/helper.c
> index 46232788c8..dd00cf7cac 100644
> --- a/target/sparc/helper.c
> +++ b/target/sparc/helper.c
> @@ -245,7 +245,7 @@ void helper_power_down(CPUSPARCState *env)
> {
> CPUState *cs = CPU(sparc_env_get_cpu(env));
>
> - cs->halted = 1;
> + cpu_halted_set(cs, 1);
> cs->exception_index = EXCP_HLT;
> env->pc = env->npc;
> env->npc = env->pc + 4;
Reviewed-by: Mark Cave-Ayland <address@hidden>
ATB,
Mark.
- [Qemu-devel] [PATCH v5 24/73] riscv: convert to cpu_halted, (continued)
- [Qemu-devel] [PATCH v5 24/73] riscv: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 08/73] tcg-runtime: define helper_cpu_halted_set, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 21/73] lm32: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 15/73] cpu: define cpu_halted helpers, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 19/73] sh4: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 13/73] alpha: convert to helper_cpu_halted_set, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 14/73] microblaze: convert to helper_cpu_halted_set, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 22/73] m68k: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 20/73] i386: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 26/73] sparc: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- Re: [Qemu-devel] [PATCH v5 26/73] sparc: convert to cpu_halted,
Mark Cave-Ayland <=
- [Qemu-devel] [PATCH v5 34/73] exec: use cpu_reset_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 28/73] gdbstub: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 30/73] cpu-exec: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 32/73] cpu: define cpu_interrupt_request helpers, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 31/73] cpu: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 39/73] i386: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 43/73] i386/hvf: convert to cpu_request_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 46/73] cris: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 40/73] i386/kvm: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 50/73] mips: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13