[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 04/29] target/ppc: prepare to split interrupt masking and
From: |
Matheus Ferst |
Subject: |
[RFC PATCH v2 04/29] target/ppc: prepare to split interrupt masking and delivery by excp_model |
Date: |
Tue, 27 Sep 2022 17:15:19 -0300 |
No functional change intended.
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
v2:
- Use "generic" instead of "legacy" to name the original methods (farosas).
---
target/ppc/excp_helper.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index c6381489b6..6da4dba616 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -1678,7 +1678,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;
@@ -1790,7 +1790,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);
@@ -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);
--
2.25.1
- [RFC PATCH v2 00/29] PowerPC interrupt rework, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 01/29] target/ppc: define PPC_INTERRUPT_* values directly, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 02/29] target/ppc: always use ppc_set_irq to set env->pending_interrupts, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 03/29] target/ppc: split interrupt masking and delivery from ppc_hw_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 05/29] target/ppc: create an interrupt masking method for POWER9/POWER10, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 04/29] target/ppc: prepare to split interrupt masking and delivery by excp_model,
Matheus Ferst <=
- [RFC PATCH v2 06/29] target/ppc: remove unused interrupts from p9_pending_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 08/29] target/ppc: remove unused interrupts from p9_deliver_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 07/29] target/ppc: create an interrupt delivery method for POWER9/POWER10, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 09/29] target/ppc: remove generic architecture checks from p9_deliver_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 10/29] target/ppc: move power-saving interrupt masking out of cpu_has_work_POWER9, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 11/29] target/ppc: add power-saving interrupt masking logic to p9_next_unmasked_interrupt, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 12/29] target/ppc: create an interrupt masking method for POWER8, Matheus Ferst, 2022/09/27
- [RFC PATCH v2 13/29] target/ppc: remove unused interrupts from p8_pending_interrupt, Matheus Ferst, 2022/09/27