]> Git Repo - qemu.git/commitdiff
target-xtensa: Use cpu_exec_interrupt qom hook
authorRichard Henderson <[email protected]>
Sat, 13 Sep 2014 16:45:18 +0000 (09:45 -0700)
committerPeter Maydell <[email protected]>
Thu, 25 Sep 2014 17:54:21 +0000 (18:54 +0100)
Cc: Max Filippov <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Max Filippov <[email protected]>
Message-id: 1410626734[email protected]
Signed-off-by: Peter Maydell <[email protected]>
cpu-exec.c
target-xtensa/cpu-qom.h
target-xtensa/cpu.c
target-xtensa/helper.c

index fe313b48f30a9c0314d6532c39dacc1e2c30e7e8..304867d4bd65992069acccd622dea0c09b4d54dd 100644 (file)
@@ -669,12 +669,6 @@ int cpu_exec(CPUArchState *env)
                         cc->do_interrupt(cpu);
                         next_tb = 0;
                     }
                         cc->do_interrupt(cpu);
                         next_tb = 0;
                     }
-#elif defined(TARGET_XTENSA)
-                    if (interrupt_request & CPU_INTERRUPT_HARD) {
-                        cpu->exception_index = EXC_IRQ;
-                        cc->do_interrupt(cpu);
-                        next_tb = 0;
-                    }
 #endif
                     /* The target hook has 3 exit conditions:
                        False when the interrupt isn't processed,
 #endif
                     /* The target hook has 3 exit conditions:
                        False when the interrupt isn't processed,
index f320486a6892ff292f9d79889b75ed3aeca252c7..9de5c6eb9f30f82ec8c1622d0f4e20f5674ef851 100644 (file)
@@ -84,6 +84,7 @@ static inline XtensaCPU *xtensa_env_get_cpu(const CPUXtensaState *env)
 #define ENV_OFFSET offsetof(XtensaCPU, env)
 
 void xtensa_cpu_do_interrupt(CPUState *cpu);
 #define ENV_OFFSET offsetof(XtensaCPU, env)
 
 void xtensa_cpu_do_interrupt(CPUState *cpu);
+bool xtensa_cpu_exec_interrupt(CPUState *cpu, int interrupt_request);
 void xtensa_cpu_dump_state(CPUState *cpu, FILE *f,
                            fprintf_function cpu_fprintf, int flags);
 hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
 void xtensa_cpu_dump_state(CPUState *cpu, FILE *f,
                            fprintf_function cpu_fprintf, int flags);
 hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
index 936d526d410a33afafc7a26d112a4736d5bb8ec9..51c41d526db391c310de39293e876dd0eada55a5 100644 (file)
@@ -142,6 +142,7 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data)
     cc->class_by_name = xtensa_cpu_class_by_name;
     cc->has_work = xtensa_cpu_has_work;
     cc->do_interrupt = xtensa_cpu_do_interrupt;
     cc->class_by_name = xtensa_cpu_class_by_name;
     cc->has_work = xtensa_cpu_has_work;
     cc->do_interrupt = xtensa_cpu_do_interrupt;
+    cc->cpu_exec_interrupt = xtensa_cpu_exec_interrupt;
     cc->dump_state = xtensa_cpu_dump_state;
     cc->set_pc = xtensa_cpu_set_pc;
     cc->gdb_read_register = xtensa_cpu_gdb_read_register;
     cc->dump_state = xtensa_cpu_dump_state;
     cc->set_pc = xtensa_cpu_set_pc;
     cc->gdb_read_register = xtensa_cpu_gdb_read_register;
index 6671e402899332b1d1fa561b3f3bd39071299518..d84d259cf890b27e53b7b0b386f35962b3841407 100644 (file)
@@ -256,6 +256,16 @@ void xtensa_cpu_do_interrupt(CPUState *cs)
     check_interrupts(env);
 }
 
     check_interrupts(env);
 }
 
+bool xtensa_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
+{
+    if (interrupt_request & CPU_INTERRUPT_HARD) {
+        cs->exception_index = EXC_IRQ;
+        xtensa_cpu_do_interrupt(cs);
+        return true;
+    }
+    return false;
+}
+
 static void reset_tlb_mmu_all_ways(CPUXtensaState *env,
         const xtensa_tlb *tlb, xtensa_tlb_entry entry[][MAX_TLB_WAY_SIZE])
 {
 static void reset_tlb_mmu_all_ways(CPUXtensaState *env,
         const xtensa_tlb *tlb, xtensa_tlb_entry entry[][MAX_TLB_WAY_SIZE])
 {
This page took 0.030416 seconds and 4 git commands to generate.