[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/30] target/avr: Restrict has_work() handler to sysemu and T
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 10/30] target/avr: Restrict has_work() handler to sysemu and TCG |
Date: |
Thu, 2 Sep 2021 18:15:23 +0200 |
Restrict has_work() to TCG sysemu.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/avr/cpu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index e9fa54c9777..6267cc6d530 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -32,6 +32,7 @@ static void avr_cpu_set_pc(CPUState *cs, vaddr value)
cpu->env.pc_w = value / 2; /* internally PC points to words */
}
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
static bool avr_cpu_has_work(CPUState *cs)
{
AVRCPU *cpu = AVR_CPU(cs);
@@ -40,6 +41,7 @@ static bool avr_cpu_has_work(CPUState *cs)
return (cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_RESET))
&& cpu_interrupts_enabled(env);
}
+#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
static void avr_cpu_synchronize_from_tb(CPUState *cs,
const TranslationBlock *tb)
@@ -198,6 +200,7 @@ static const struct TCGCPUOps avr_tcg_ops = {
.tlb_fill = avr_cpu_tlb_fill,
#ifndef CONFIG_USER_ONLY
+ .has_work = avr_cpu_has_work,
.cpu_exec_interrupt = avr_cpu_exec_interrupt,
.do_interrupt = avr_cpu_do_interrupt,
#endif /* !CONFIG_USER_ONLY */
@@ -214,7 +217,6 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
cc->class_by_name = avr_cpu_class_by_name;
- cc->has_work = avr_cpu_has_work;
cc->dump_state = avr_cpu_dump_state;
cc->set_pc = avr_cpu_set_pc;
cc->memory_rw_debug = avr_cpu_memory_rw_debug;
--
2.31.1
- [PATCH v3 06/30] accel/whpx: Implement AccelOpsClass::has_work(), (continued)
- [PATCH v3 09/30] target/arm: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 10/30] target/avr: Restrict has_work() handler to sysemu and TCG,
Philippe Mathieu-Daudé <=
- [PATCH v3 11/30] target/cris: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 12/30] target/hexagon: Remove unused has_work() handler, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 13/30] target/hppa: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 14/30] target/i386: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 15/30] target/m68k: Restrict has_work() handler to sysemu and TCG, Philippe Mathieu-Daudé, 2021/09/02