diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-18 15:03:43 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-03-12 10:35:55 +0100 |
commit | c3affe5670e5d0df8a7e06f1d6e80853633146df (patch) | |
tree | bc2a6d0877cf7aea8821053cf6c8df10f167caa5 /translate-all.c | |
parent | d8ed887bdcd29ce2e967f8b15a6a2b6dcaa11cd5 (diff) |
cpu: Pass CPUState to cpu_interrupt()
Move it to qom/cpu.h to avoid issues with include order.
Change pc_acpi_smi_interrupt() opaque to X86CPU.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'translate-all.c')
-rw-r--r-- | translate-all.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/translate-all.c b/translate-all.c index f0c7d1e4c9..1f3237e60e 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1077,8 +1077,8 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, tb_phys_invalidate(tb, -1); if (cpu != NULL) { cpu->current_tb = saved_tb; - if (env && cpu->interrupt_request && cpu->current_tb) { - cpu_interrupt(env, cpu->interrupt_request); + if (cpu->interrupt_request && cpu->current_tb) { + cpu_interrupt(cpu, cpu->interrupt_request); } } } @@ -1382,9 +1382,9 @@ void tb_check_watchpoint(CPUArchState *env) #ifndef CONFIG_USER_ONLY /* mask must never be zero, except for A20 change call */ -static void tcg_handle_interrupt(CPUArchState *env, int mask) +static void tcg_handle_interrupt(CPUState *cpu, int mask) { - CPUState *cpu = ENV_GET_CPU(env); + CPUArchState *env = cpu->env_ptr; int old_mask; old_mask = cpu->interrupt_request; @@ -1552,10 +1552,8 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) #else /* CONFIG_USER_ONLY */ -void cpu_interrupt(CPUArchState *env, int mask) +void cpu_interrupt(CPUState *cpu, int mask) { - CPUState *cpu = ENV_GET_CPU(env); - cpu->interrupt_request |= mask; cpu->tcg_exit_req = 1; } |