[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 38/40] target/xtensa: Restrict has_work() handler to sysemu
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v7 38/40] target/xtensa: Restrict has_work() handler to sysemu |
Date: |
Sat, 25 Sep 2021 16:51:16 +0200 |
Restrict has_work() to sysemu.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/xtensa/cpu.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index c1cbd03595e..5cb19a88819 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -43,18 +43,17 @@ static void xtensa_cpu_set_pc(CPUState *cs, vaddr value)
cpu->env.pc = value;
}
+#ifndef CONFIG_USER_ONLY
+
static bool xtensa_cpu_has_work(CPUState *cs)
{
-#ifndef CONFIG_USER_ONLY
XtensaCPU *cpu = XTENSA_CPU(cs);
return !cpu->env.runstall && cpu->env.pending_irq_level;
-#else
- return true;
-#endif
}
-#ifdef CONFIG_USER_ONLY
+#else /* CONFIG_USER_ONLY*/
+
static bool abi_call0;
void xtensa_set_abi_call0(void)
@@ -66,7 +65,8 @@ bool xtensa_abi_call0(void)
{
return abi_call0;
}
-#endif
+
+#endif /* CONFIG_USER_ONLY */
static void xtensa_cpu_reset(DeviceState *dev)
{
@@ -196,6 +196,7 @@ static const struct TCGCPUOps xtensa_tcg_ops = {
.debug_excp_handler = xtensa_breakpoint_handler,
#ifndef CONFIG_USER_ONLY
+ .has_work = xtensa_cpu_has_work,
.cpu_exec_interrupt = xtensa_cpu_exec_interrupt,
.do_interrupt = xtensa_cpu_do_interrupt,
.do_transaction_failed = xtensa_cpu_do_transaction_failed,
@@ -215,7 +216,6 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void
*data)
device_class_set_parent_reset(dc, xtensa_cpu_reset, &xcc->parent_reset);
cc->class_by_name = xtensa_cpu_class_by_name;
- cc->has_work = xtensa_cpu_has_work;
cc->dump_state = xtensa_cpu_dump_state;
cc->set_pc = xtensa_cpu_set_pc;
cc->gdb_read_register = xtensa_cpu_gdb_read_register;
--
2.31.1
- [PATCH v7 28/40] target/openrisc: Restrict has_work() handler to sysemu, (continued)
- [PATCH v7 28/40] target/openrisc: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 29/40] target/ppc: Introduce PowerPCCPUClass::has_work(), Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 30/40] target/ppc: Restrict has_work() handlers to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 31/40] target/riscv: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 32/40] target/rx: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 33/40] target/s390x: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 34/40] target/sh4: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 35/40] target/sparc: Remove pointless use of CONFIG_TCG definition, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 36/40] target/sparc: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 37/40] target/tricore: Restrict has_work() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 38/40] target/xtensa: Restrict has_work() handler to sysemu,
Philippe Mathieu-Daudé <=
- [PATCH v7 39/40] accel/tcg: Remove CPUClass::has_work(), Philippe Mathieu-Daudé, 2021/09/25
- [PATCH v7 40/40] accel/tcg: Simplify tcg_cpu_has_work(), Philippe Mathieu-Daudé, 2021/09/25
- Re: [PATCH v7 00/40] accel: Move has_work() from CPUClass to AccelOpsClass, Richard Henderson, 2021/09/25