[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v10 26/73] sparc: convert to cpu_halted
From: |
Robert Foley |
Subject: |
[PATCH v10 26/73] sparc: convert to cpu_halted |
Date: |
Wed, 17 Jun 2020 17:01:44 -0400 |
From: "Emilio G. Cota" <cota@braap.org>
Cc: Fabien Chouteau <chouteau@adacore.com>
Cc: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Robert Foley <robert.foley@linaro.org>
---
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 d40b7891f6..aea1b4200f 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -132,7 +132,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 ee52b5cbbc..12f9ac1b61 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -193,7 +193,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);
}
@@ -224,7 +224,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)
@@ -233,7 +233,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)
@@ -832,7 +832,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 100b2fab17..fe9c678459 100644
--- a/hw/sparc64/sparc64.c
+++ b/hw/sparc64/sparc64.c
@@ -101,7 +101,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);
}
@@ -116,7 +116,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 07d87efa4e..90dfb1e92f 100644
--- a/target/sparc/helper.c
+++ b/target/sparc/helper.c
@@ -244,7 +244,7 @@ void helper_power_down(CPUSPARCState *env)
{
CPUState *cs = env_cpu(env);
- cs->halted = 1;
+ cpu_halted_set(cs, 1);
cs->exception_index = EXCP_HLT;
env->pc = env->npc;
env->npc = env->pc + 4;
--
2.17.1
- [PATCH v10 14/73] cpu: define cpu_halted helpers, (continued)
- [PATCH v10 14/73] cpu: define cpu_halted helpers, Robert Foley, 2020/06/17
- [PATCH v10 12/73] alpha: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 15/73] tcg-runtime: convert to cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 13/73] microblaze: convert to helper_cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 17/73] arm: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 16/73] hw/semihosting: convert to cpu_halted_set, Robert Foley, 2020/06/17
- [PATCH v10 18/73] ppc: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 19/73] sh4: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 21/73] lm32: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 20/73] i386: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 26/73] sparc: convert to cpu_halted,
Robert Foley <=
- [PATCH v10 27/73] xtensa: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 25/73] s390x: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 29/73] openrisc: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 32/73] cpu: define cpu_interrupt_request helpers, Robert Foley, 2020/06/17
- [PATCH v10 22/73] m68k: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 23/73] mips: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 28/73] gdbstub: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 34/73] exec: use cpu_reset_interrupt, Robert Foley, 2020/06/17
- [PATCH v10 30/73] cpu-exec: convert to cpu_halted, Robert Foley, 2020/06/17
- [PATCH v10 33/73] ppc: use cpu_reset_interrupt, Robert Foley, 2020/06/17