Skip to content

Commit

Permalink
target/ppc: prepare to split interrupt masking and delivery by excp_m…
Browse files Browse the repository at this point in the history
…odel

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Message-Id: <20221011204829.1641124-5-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
mferst authored and danielhb committed Oct 28, 2022
1 parent de76b85 commit ba2898f
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions target/ppc/excp_helper.c
Expand Up @@ -1684,7 +1684,7 @@ void ppc_cpu_do_interrupt(CPUState *cs)
powerpc_excp(cpu, cs->exception_index);
}

static int ppc_next_unmasked_interrupt(CPUPPCState *env)
static int ppc_next_unmasked_interrupt_generic(CPUPPCState *env)
{
bool async_deliver;

Expand Down Expand Up @@ -1796,7 +1796,15 @@ static int ppc_next_unmasked_interrupt(CPUPPCState *env)
return 0;
}

static void ppc_deliver_interrupt(CPUPPCState *env, int interrupt)
static int ppc_next_unmasked_interrupt(CPUPPCState *env)
{
switch (env->excp_model) {
default:
return ppc_next_unmasked_interrupt_generic(env);
}
}

static void ppc_deliver_interrupt_generic(CPUPPCState *env, int interrupt)
{
PowerPCCPU *cpu = env_archcpu(env);
CPUState *cs = env_cpu(env);
Expand Down Expand Up @@ -1900,6 +1908,14 @@ static void ppc_deliver_interrupt(CPUPPCState *env, int interrupt)
}
}

static void ppc_deliver_interrupt(CPUPPCState *env, int interrupt)
{
switch (env->excp_model) {
default:
ppc_deliver_interrupt_generic(env, interrupt);
}
}

void ppc_cpu_do_system_reset(CPUState *cs)
{
PowerPCCPU *cpu = POWERPC_CPU(cs);
Expand Down

0 comments on commit ba2898f

Please sign in to comment.