Skip to content

Commit f364a7f

Browse files
philmdrth7680
authored andcommitted
target/xtensa: Restrict cpu_exec_interrupt() handler to sysemu
Restrict cpu_exec_interrupt() and its callees to sysemu. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Warner Losh <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
1 parent 65c575b commit f364a7f

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

target/xtensa/cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = {
192192

193193
static const struct TCGCPUOps xtensa_tcg_ops = {
194194
.initialize = xtensa_translate_init,
195-
.cpu_exec_interrupt = xtensa_cpu_exec_interrupt,
196195
.tlb_fill = xtensa_cpu_tlb_fill,
197196
.debug_excp_handler = xtensa_breakpoint_handler,
198197

199198
#ifndef CONFIG_USER_ONLY
199+
.cpu_exec_interrupt = xtensa_cpu_exec_interrupt,
200200
.do_interrupt = xtensa_cpu_do_interrupt,
201201
.do_transaction_failed = xtensa_cpu_do_transaction_failed,
202202
.do_unaligned_access = xtensa_cpu_do_unaligned_access,

target/xtensa/cpu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,14 +566,14 @@ struct XtensaCPU {
566566
bool xtensa_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
567567
MMUAccessType access_type, int mmu_idx,
568568
bool probe, uintptr_t retaddr);
569+
#ifndef CONFIG_USER_ONLY
569570
void xtensa_cpu_do_interrupt(CPUState *cpu);
570571
bool xtensa_cpu_exec_interrupt(CPUState *cpu, int interrupt_request);
571-
#ifndef CONFIG_USER_ONLY
572572
void xtensa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr,
573573
unsigned size, MMUAccessType access_type,
574574
int mmu_idx, MemTxAttrs attrs,
575575
MemTxResult response, uintptr_t retaddr);
576-
#endif /* !CONFIG_USER_ONLY */
576+
#endif
577577
void xtensa_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
578578
hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
579579
void xtensa_count_regs(const XtensaConfig *config,

target/xtensa/exc_helper.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,6 @@ void xtensa_cpu_do_interrupt(CPUState *cs)
255255
}
256256
check_interrupts(env);
257257
}
258-
#else
259-
void xtensa_cpu_do_interrupt(CPUState *cs)
260-
{
261-
}
262-
#endif
263258

264259
bool xtensa_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
265260
{
@@ -270,3 +265,5 @@ bool xtensa_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
270265
}
271266
return false;
272267
}
268+
269+
#endif /* !CONFIG_USER_ONLY */

0 commit comments

Comments
 (0)