[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/24] spapr: introduce a spapr_irq_set_lsi() helper
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 16/24] spapr: introduce a spapr_irq_set_lsi() helper |
Date: |
Fri, 15 Dec 2017 16:54:27 +1100 |
From: Cédric Le Goater <address@hidden>
It will make synchronisation easier with the XIVE interrupt mode when
available. The 'irq' parameter refers to the global IRQ number space.
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 53c2c58a25..02cc7ffd4d 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3582,6 +3582,14 @@ static int ics_find_free_block(ICSState *ics, int num,
int alignnum)
return -1;
}
+/*
+ * Allocate the IRQ number and set the IRQ type, LSI or MSI
+ */
+static void spapr_irq_set_lsi(sPAPRMachineState *spapr, int irq, bool lsi)
+{
+ ics_set_irq_type(spapr->ics, irq - spapr->ics->offset, lsi);
+}
+
int spapr_irq_alloc(sPAPRMachineState *spapr, int irq_hint, bool lsi,
Error **errp)
{
@@ -3606,7 +3614,7 @@ int spapr_irq_alloc(sPAPRMachineState *spapr, int
irq_hint, bool lsi,
irq += ics->offset;
}
- ics_set_irq_type(ics, irq - ics->offset, lsi);
+ spapr_irq_set_lsi(spapr, irq, lsi);
trace_spapr_irq_alloc(irq);
return irq;
@@ -3645,10 +3653,10 @@ int spapr_irq_alloc_block(sPAPRMachineState *spapr, int
num, bool lsi,
return -1;
}
+ first += ics->offset;
for (i = first; i < first + num; ++i) {
- ics_set_irq_type(ics, i, lsi);
+ spapr_irq_set_lsi(spapr, i, lsi);
}
- first += ics->offset;
trace_spapr_irq_alloc_block(first, num, lsi, align);
--
2.14.3
- [Qemu-devel] [PULL 00/24] ppc-for-2.12 queue 20171215, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 01/24] target/ppc: Use tcg_gen_lookup_and_goto_ptr, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 02/24] ppc/xics: remove useless if condition, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 03/24] spapr: Add pseries-2.12 machine type, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 04/24] spapr_cpu_core: instantiate CPUs separately, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 06/24] nvram: add AT24Cx i2c eeprom, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 05/24] e500: name openpic and pci host bridge, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 10/24] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 12/24] spapr/rtas: do not reset the MSR in stop-self command, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 09/24] e500: fix pci host bridge class/type, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 16/24] spapr: introduce a spapr_irq_set_lsi() helper,
David Gibson <=
- [Qemu-devel] [PULL 13/24] ppc/xics: introduce an icp_create() helper, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 20/24] spapr_events: drop bogus cell from "interrupt-ranges" property, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 07/24] pcc: define the Power-saving mode Exit Cause Enable bits in PowerPCCPUClass, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 14/24] ppc/xics: assign of the CPU 'intc' pointer under the core, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 15/24] spapr: move the IRQ allocation routines under the machine, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 08/24] openpic: debug w/ info_report(), David Gibson, 2017/12/15
- [Qemu-devel] [PULL 18/24] spapr: replace numa_get_node() with lookup in pc-dimm list, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 22/24] spapr: Rename machine init functions for clarity, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 19/24] spapr: fix LSI interrupt specifiers in the device tree, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 24/24] spapr: don't initialize PATB entry if max-cpu-compat < power9, David Gibson, 2017/12/15