Skip to content

Commit

Permalink
target/xtensa: drop function xtensa_timer_irq
Browse files Browse the repository at this point in the history
It's a one-liner used in a single place, move its implementation there
and remove its declaration.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
jcmvbkbc committed Jan 28, 2019
1 parent fa92bd4 commit 3f75038
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions hw/xtensa/pic_cpu.c
Expand Up @@ -77,18 +77,13 @@ static void xtensa_set_irq(void *opaque, int irq, int active)
}
}

void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active)
{
qemu_set_irq(env->irq_inputs[env->config->timerint[id]], active);
}

static void xtensa_ccompare_cb(void *opaque)
{
XtensaCcompareTimer *ccompare = opaque;
CPUXtensaState *env = ccompare->env;
unsigned i = ccompare - env->ccompare;

xtensa_timer_irq(env, i, 1);
qemu_set_irq(env->irq_inputs[env->config->timerint[i]], 1);
}

void xtensa_irq_init(CPUXtensaState *env)
Expand Down
1 change: 0 additions & 1 deletion target/xtensa/cpu.h
Expand Up @@ -570,7 +570,6 @@ void xtensa_sim_open_console(Chardev *chr);
void check_interrupts(CPUXtensaState *s);
void xtensa_irq_init(CPUXtensaState *env);
void *xtensa_get_extint(CPUXtensaState *env, unsigned extint);
void xtensa_timer_irq(CPUXtensaState *env, uint32_t id, uint32_t active);
int cpu_xtensa_signal_handler(int host_signum, void *pinfo, void *puc);
void xtensa_cpu_list(FILE *f, fprintf_function cpu_fprintf);
void xtensa_sync_window_from_phys(CPUXtensaState *env);
Expand Down

0 comments on commit 3f75038

Please sign in to comment.