[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 10/29] xics: move reset and cpu_setup
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 10/29] xics: move reset and cpu_setup |
Date: |
Fri, 25 Oct 2013 23:27:35 +0200 |
From: Alexey Kardashevskiy <address@hidden>
This simple change makes following patches nicer.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Acked-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/intc/xics.c | 72 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index bb018d1..a0d71ef 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -30,6 +30,42 @@
#include "hw/ppc/spapr.h"
#include "hw/ppc/xics.h"
+void xics_cpu_setup(XICSState *icp, PowerPCCPU *cpu)
+{
+ CPUState *cs = CPU(cpu);
+ CPUPPCState *env = &cpu->env;
+ ICPState *ss = &icp->ss[cs->cpu_index];
+
+ assert(cs->cpu_index < icp->nr_servers);
+
+ switch (PPC_INPUT(env)) {
+ case PPC_FLAGS_INPUT_POWER7:
+ ss->output = env->irq_inputs[POWER7_INPUT_INT];
+ break;
+
+ case PPC_FLAGS_INPUT_970:
+ ss->output = env->irq_inputs[PPC970_INPUT_INT];
+ break;
+
+ default:
+ fprintf(stderr, "XICS interrupt controller does not support this CPU "
+ "bus model\n");
+ abort();
+ }
+}
+
+static void xics_reset(DeviceState *d)
+{
+ XICSState *icp = XICS(d);
+ int i;
+
+ for (i = 0; i < icp->nr_servers; i++) {
+ device_reset(DEVICE(&icp->ss[i]));
+ }
+
+ device_reset(DEVICE(icp->ics));
+}
+
/*
* ICP: Presentation layer
*/
@@ -600,42 +636,6 @@ static void rtas_int_on(PowerPCCPU *cpu, sPAPREnvironment
*spapr,
* XICS
*/
-static void xics_reset(DeviceState *d)
-{
- XICSState *icp = XICS(d);
- int i;
-
- for (i = 0; i < icp->nr_servers; i++) {
- device_reset(DEVICE(&icp->ss[i]));
- }
-
- device_reset(DEVICE(icp->ics));
-}
-
-void xics_cpu_setup(XICSState *icp, PowerPCCPU *cpu)
-{
- CPUState *cs = CPU(cpu);
- CPUPPCState *env = &cpu->env;
- ICPState *ss = &icp->ss[cs->cpu_index];
-
- assert(cs->cpu_index < icp->nr_servers);
-
- switch (PPC_INPUT(env)) {
- case PPC_FLAGS_INPUT_POWER7:
- ss->output = env->irq_inputs[POWER7_INPUT_INT];
- break;
-
- case PPC_FLAGS_INPUT_970:
- ss->output = env->irq_inputs[PPC970_INPUT_INT];
- break;
-
- default:
- fprintf(stderr, "XICS interrupt controller does not support this CPU "
- "bus model\n");
- abort();
- }
-}
-
static void xics_realize(DeviceState *dev, Error **errp)
{
XICSState *icp = XICS(dev);
--
1.8.1.4
- [Qemu-ppc] [PULL 00/29] ppc patch queue 2013-10-25, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 07/29] spapr: Add ibm, purr property on power7 and newer, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 02/29] pseries: Fix loading of little endian kernels, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 04/29] target-ppc: Little Endian Correction to Load/Store Vector Element, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 03/29] ppc: Add CFAR, DAR and DSISR to the dictionary of printable registers, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 19/29] xics: Implement H_IPOLL, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 11/29] spapr: move cpu_setup after kvmppc_set_papr, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 20/29] xics: Implement H_XIRR_X, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 10/29] xics: move reset and cpu_setup,
Alexander Graf <=
- [Qemu-ppc] [PULL 05/29] PPC: Fix L2CR write accesses, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 08/29] spapr-rtas: fix h_rtas parameters reading, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 15/29] xics: add missing const specifiers to TypeInfo, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 12/29] xics: replace fprintf with error_report, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 21/29] xics-kvm: enable irqfd for MSI, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 22/29] spapr-pci: enable irqfd for INTx, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 09/29] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 13/29] xics: add pre_save/post_load dispatchers, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 14/29] xics: convert init() to realize(), Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 18/29] xics-kvm: Support for in-kernel XICS interrupt controller, Alexander Graf, 2013/10/25