target/alpha: Restrict cpu_exec_interrupt() handler to sysemu
Restrict cpu_exec_interrupt() and its callees to sysemu. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210911165434.531552-7-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
120964219d
commit
9354e6947a
@ -218,10 +218,10 @@ static const struct SysemuCPUOps alpha_sysemu_ops = {
|
|||||||
|
|
||||||
static const struct TCGCPUOps alpha_tcg_ops = {
|
static const struct TCGCPUOps alpha_tcg_ops = {
|
||||||
.initialize = alpha_translate_init,
|
.initialize = alpha_translate_init,
|
||||||
.cpu_exec_interrupt = alpha_cpu_exec_interrupt,
|
|
||||||
.tlb_fill = alpha_cpu_tlb_fill,
|
.tlb_fill = alpha_cpu_tlb_fill,
|
||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
|
.cpu_exec_interrupt = alpha_cpu_exec_interrupt,
|
||||||
.do_interrupt = alpha_cpu_do_interrupt,
|
.do_interrupt = alpha_cpu_do_interrupt,
|
||||||
.do_transaction_failed = alpha_cpu_do_transaction_failed,
|
.do_transaction_failed = alpha_cpu_do_transaction_failed,
|
||||||
.do_unaligned_access = alpha_cpu_do_unaligned_access,
|
.do_unaligned_access = alpha_cpu_do_unaligned_access,
|
||||||
|
@ -274,10 +274,10 @@ struct AlphaCPU {
|
|||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
extern const VMStateDescription vmstate_alpha_cpu;
|
extern const VMStateDescription vmstate_alpha_cpu;
|
||||||
#endif
|
|
||||||
|
|
||||||
void alpha_cpu_do_interrupt(CPUState *cpu);
|
void alpha_cpu_do_interrupt(CPUState *cpu);
|
||||||
bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
bool alpha_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
||||||
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags);
|
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags);
|
||||||
hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
hwaddr alpha_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
||||||
int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
|
int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
|
||||||
|
@ -293,7 +293,6 @@ bool alpha_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
|
|||||||
prot, mmu_idx, TARGET_PAGE_SIZE);
|
prot, mmu_idx, TARGET_PAGE_SIZE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif /* USER_ONLY */
|
|
||||||
|
|
||||||
void alpha_cpu_do_interrupt(CPUState *cs)
|
void alpha_cpu_do_interrupt(CPUState *cs)
|
||||||
{
|
{
|
||||||
@ -348,7 +347,6 @@ void alpha_cpu_do_interrupt(CPUState *cs)
|
|||||||
|
|
||||||
cs->exception_index = -1;
|
cs->exception_index = -1;
|
||||||
|
|
||||||
#if !defined(CONFIG_USER_ONLY)
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case EXCP_RESET:
|
case EXCP_RESET:
|
||||||
i = 0x0000;
|
i = 0x0000;
|
||||||
@ -404,7 +402,6 @@ void alpha_cpu_do_interrupt(CPUState *cs)
|
|||||||
|
|
||||||
/* Switch to PALmode. */
|
/* Switch to PALmode. */
|
||||||
env->flags |= ENV_FLAG_PAL_MODE;
|
env->flags |= ENV_FLAG_PAL_MODE;
|
||||||
#endif /* !USER_ONLY */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
@ -451,6 +448,8 @@ bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* !CONFIG_USER_ONLY */
|
||||||
|
|
||||||
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
{
|
{
|
||||||
static const char linux_reg_names[31][4] = {
|
static const char linux_reg_names[31][4] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user