[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/30] ppc/e500: Allocate IRQ lines with qdev_init_gpio_in()
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 04/30] ppc/e500: Allocate IRQ lines with qdev_init_gpio_in() |
Date: |
Mon, 18 Jul 2022 14:21:42 -0300 |
From: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220705145814.461723-5-clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/ppc/e500.c | 8 ++++----
hw/ppc/ppc.c | 5 +----
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 7f7f5b3452..757cfaa62f 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -861,7 +861,6 @@ void ppce500_init(MachineState *machine)
for (i = 0; i < smp_cpus; i++) {
PowerPCCPU *cpu;
CPUState *cs;
- qemu_irq *input;
cpu = POWERPC_CPU(object_new(machine->cpu_type));
env = &cpu->env;
@@ -885,9 +884,10 @@ void ppce500_init(MachineState *machine)
firstenv = env;
}
- input = (qemu_irq *)env->irq_inputs;
- irqs[i].irq[OPENPIC_OUTPUT_INT] = input[PPCE500_INPUT_INT];
- irqs[i].irq[OPENPIC_OUTPUT_CINT] = input[PPCE500_INPUT_CINT];
+ irqs[i].irq[OPENPIC_OUTPUT_INT] =
+ qdev_get_gpio_in(DEVICE(cpu), PPCE500_INPUT_INT);
+ irqs[i].irq[OPENPIC_OUTPUT_CINT] =
+ qdev_get_gpio_in(DEVICE(cpu), PPCE500_INPUT_CINT);
env->spr_cb[SPR_BOOKE_PIR].default_value = cs->cpu_index = i;
env->mpic_iack = pmc->ccsrbar_base + MPC8544_MPIC_REGS_OFFSET + 0xa0;
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index 161e5f9087..690f448cb9 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -474,10 +474,7 @@ static void ppce500_set_irq(void *opaque, int pin, int
level)
void ppce500_irq_init(PowerPCCPU *cpu)
{
- CPUPPCState *env = &cpu->env;
-
- env->irq_inputs = (void **)qemu_allocate_irqs(&ppce500_set_irq,
- cpu, PPCE500_INPUT_NB);
+ qdev_init_gpio_in(DEVICE(cpu), ppce500_set_irq, PPCE500_INPUT_NB);
}
/* Enable or Disable the E500 EPR capability */
--
2.36.1
- [PULL 00/30] ppc queue, Daniel Henrique Barboza, 2022/07/18
- [PULL 01/30] ppc64: Allocate IRQ lines with qdev_init_gpio_in(), Daniel Henrique Barboza, 2022/07/18
- [PULL 02/30] ppc/40x: Allocate IRQ lines with qdev_init_gpio_in(), Daniel Henrique Barboza, 2022/07/18
- [PULL 03/30] ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in(), Daniel Henrique Barboza, 2022/07/18
- [PULL 04/30] ppc/e500: Allocate IRQ lines with qdev_init_gpio_in(),
Daniel Henrique Barboza <=
- [PULL 05/30] ppc: Remove unused irq_inputs, Daniel Henrique Barboza, 2022/07/18
- [PULL 06/30] hw/ppc: pass random seed to fdt, Daniel Henrique Barboza, 2022/07/18
- [PULL 07/30] target/ppc/kvm: Skip current and parent directories in kvmppc_find_cpu_dt, Daniel Henrique Barboza, 2022/07/18
- [PULL 08/30] target/ppc: Fix gen_priv_exception error value in mfspr/mtspr, Daniel Henrique Barboza, 2022/07/18
- [PULL 11/30] target/ppc: fix exception error code in helper_{load, store}_dcr, Daniel Henrique Barboza, 2022/07/18
- [PULL 09/30] target/ppc: fix exception error value in slbfee, Daniel Henrique Barboza, 2022/07/18
- [PULL 13/30] target/ppc: fix exception error code in spr_write_excp_vector, Daniel Henrique Barboza, 2022/07/18
- [PULL 12/30] target/ppc: fix PMU Group A register read/write exceptions, Daniel Henrique Barboza, 2022/07/18
- [PULL 10/30] target/ppc: remove mfdcrux and mtdcrux, Daniel Henrique Barboza, 2022/07/18
- [PULL 16/30] target/ppc: receive DisasContext explicitly in GEN_PRIV, Daniel Henrique Barboza, 2022/07/18