[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 3/6] xics: move registration of global state to realiz
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH 3/6] xics: move registration of global state to realize() |
Date: |
Tue, 6 Aug 2013 18:27:50 +1000 |
Registration of global state belongs into realize so move it there.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/intc/xics.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index c5dad2f..436c788 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -692,6 +692,17 @@ static void xics_realize(DeviceState *dev, Error **errp)
ICSState *ics = icp->ics;
int i;
+ /* Registration of global state belongs into realize */
+ spapr_rtas_register("ibm,set-xive", rtas_set_xive);
+ spapr_rtas_register("ibm,get-xive", rtas_get_xive);
+ spapr_rtas_register("ibm,int-off", rtas_int_off);
+ spapr_rtas_register("ibm,int-on", rtas_int_on);
+
+ spapr_register_hypercall(H_CPPR, h_cppr);
+ spapr_register_hypercall(H_IPI, h_ipi);
+ spapr_register_hypercall(H_XIRR, h_xirr);
+ spapr_register_hypercall(H_EOI, h_eoi);
+
ics->nr_irqs = icp->nr_irqs;
ics->offset = XICS_IRQ_BASE;
ics->icp = icp;
@@ -730,16 +741,6 @@ static void xics_class_init(ObjectClass *oc, void *data)
dc->props = xics_properties;
dc->reset = xics_reset;
k->cpu_setup = xics_cpu_setup;
-
- spapr_rtas_register("ibm,set-xive", rtas_set_xive);
- spapr_rtas_register("ibm,get-xive", rtas_get_xive);
- spapr_rtas_register("ibm,int-off", rtas_int_off);
- spapr_rtas_register("ibm,int-on", rtas_int_on);
-
- spapr_register_hypercall(H_CPPR, h_cppr);
- spapr_register_hypercall(H_IPI, h_ipi);
- spapr_register_hypercall(H_XIRR, h_xirr);
- spapr_register_hypercall(H_EOI, h_eoi);
}
static const TypeInfo xics_info = {
--
1.8.3.2
- [Qemu-ppc] [PATCH 0/6 v2] xics: reworks and in-kernel support, Alexey Kardashevskiy, 2013/08/06
- [Qemu-ppc] [PATCH 1/6] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN, Alexey Kardashevskiy, 2013/08/06
- [Qemu-ppc] [PATCH 2/6] xics: add pre_save/post_load/cpu_setup dispatchers, Alexey Kardashevskiy, 2013/08/06
- [Qemu-ppc] [PATCH 3/6] xics: move registration of global state to realize(),
Alexey Kardashevskiy <=
- [Qemu-ppc] [PATCH 4/6] xics: minor changes and cleanups, Alexey Kardashevskiy, 2013/08/06
- [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Alexey Kardashevskiy, 2013/08/06
- Re: [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Andreas Färber, 2013/08/06
- Re: [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Alexey Kardashevskiy, 2013/08/07
- Re: [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Andreas Färber, 2013/08/07
- Re: [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Alexey Kardashevskiy, 2013/08/07
- Re: [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Andreas Färber, 2013/08/07
- Re: [Qemu-ppc] [PATCH 5/6] xics: split to xics and xics-common, Alexey Kardashevskiy, 2013/08/07