Skip to content

Commit 798ac8b

Browse files
philmdrth7680
authored andcommitted
target/sparc: 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 73166ca commit 798ac8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

target/sparc/cpu.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static void sparc_cpu_reset(DeviceState *dev)
7777
env->cache_control = 0;
7878
}
7979

80+
#ifndef CONFIG_USER_ONLY
8081
static bool sparc_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
8182
{
8283
if (interrupt_request & CPU_INTERRUPT_HARD) {
@@ -96,6 +97,7 @@ static bool sparc_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
9697
}
9798
return false;
9899
}
100+
#endif /* !CONFIG_USER_ONLY */
99101

100102
static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info)
101103
{
@@ -863,10 +865,10 @@ static const struct SysemuCPUOps sparc_sysemu_ops = {
863865
static const struct TCGCPUOps sparc_tcg_ops = {
864866
.initialize = sparc_tcg_init,
865867
.synchronize_from_tb = sparc_cpu_synchronize_from_tb,
866-
.cpu_exec_interrupt = sparc_cpu_exec_interrupt,
867868
.tlb_fill = sparc_cpu_tlb_fill,
868869

869870
#ifndef CONFIG_USER_ONLY
871+
.cpu_exec_interrupt = sparc_cpu_exec_interrupt,
870872
.do_interrupt = sparc_cpu_do_interrupt,
871873
.do_transaction_failed = sparc_cpu_do_transaction_failed,
872874
.do_unaligned_access = sparc_cpu_do_unaligned_access,

0 commit comments

Comments
 (0)