Skip to content

Commit 65c575b

Browse files
philmdrth7680
authored andcommitted
target/rx: 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 798ac8b commit 65c575b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

target/rx/cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ static const struct SysemuCPUOps rx_sysemu_ops = {
186186
static const struct TCGCPUOps rx_tcg_ops = {
187187
.initialize = rx_translate_init,
188188
.synchronize_from_tb = rx_cpu_synchronize_from_tb,
189-
.cpu_exec_interrupt = rx_cpu_exec_interrupt,
190189
.tlb_fill = rx_cpu_tlb_fill,
191190

192191
#ifndef CONFIG_USER_ONLY
192+
.cpu_exec_interrupt = rx_cpu_exec_interrupt,
193193
.do_interrupt = rx_cpu_do_interrupt,
194194
#endif /* !CONFIG_USER_ONLY */
195195
};

target/rx/cpu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ typedef RXCPU ArchCPU;
124124
#define CPU_RESOLVING_TYPE TYPE_RX_CPU
125125

126126
const char *rx_crname(uint8_t cr);
127+
#ifndef CONFIG_USER_ONLY
127128
void rx_cpu_do_interrupt(CPUState *cpu);
128129
bool rx_cpu_exec_interrupt(CPUState *cpu, int int_req);
130+
#endif /* !CONFIG_USER_ONLY */
129131
void rx_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
130132
int rx_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
131133
int rx_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);

target/rx/helper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte)
4040
env->psw_c = FIELD_EX32(psw, PSW, C);
4141
}
4242

43+
#ifndef CONFIG_USER_ONLY
44+
4345
#define INT_FLAGS (CPU_INTERRUPT_HARD | CPU_INTERRUPT_FIR)
4446
void rx_cpu_do_interrupt(CPUState *cs)
4547
{
@@ -142,6 +144,8 @@ bool rx_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
142144
return false;
143145
}
144146

147+
#endif /* !CONFIG_USER_ONLY */
148+
145149
hwaddr rx_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
146150
{
147151
return addr;

0 commit comments

Comments
 (0)