aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/xics.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2017-02-27 15:29:32 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-03-01 11:23:40 +1100
commit6449da4545d35ce207f23a1dcc6189291ecf1a5f (patch)
tree5ed6a8c8f39c549b417f44e532e58956b91e4961 /hw/intc/xics.c
parenta7ff1212e99ff072dfb8db62d5e6d8ce9f4b486c (diff)
ppc/xics: move InterruptStatsProvider to the sPAPR machine
It provides a better monitor output of the ICP and ICS objects, else the objects are printed out of order. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/xics.c')
-rw-r--r--hw/intc/xics.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index ce6e8d75b8..5bcb9550ab 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -93,10 +93,8 @@ void xics_cpu_setup(XICSFabric *xi, PowerPCCPU *cpu)
}
}
-static void icp_pic_print_info(InterruptStatsProvider *obj,
- Monitor *mon)
+void icp_pic_print_info(ICPState *icp, Monitor *mon)
{
- ICPState *icp = ICP(obj);
int cpu_index = icp->cs ? icp->cs->cpu_index : -1;
if (!icp->output) {
@@ -107,10 +105,8 @@ static void icp_pic_print_info(InterruptStatsProvider *obj,
icp->pending_priority, icp->mfrr);
}
-static void ics_simple_pic_print_info(InterruptStatsProvider *obj,
- Monitor *mon)
+void ics_pic_print_info(ICSState *ics, Monitor *mon)
{
- ICSState *ics = ICS_SIMPLE(obj);
uint32_t i;
monitor_printf(mon, "ICS %4x..%4x %p\n",
@@ -369,12 +365,10 @@ static void icp_realize(DeviceState *dev, Error **errp)
static void icp_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
- InterruptStatsProviderClass *ic = INTERRUPT_STATS_PROVIDER_CLASS(klass);
dc->reset = icp_reset;
dc->vmsd = &vmstate_icp_server;
dc->realize = icp_realize;
- ic->print_info = icp_pic_print_info;
}
static const TypeInfo icp_info = {
@@ -383,10 +377,6 @@ static const TypeInfo icp_info = {
.instance_size = sizeof(ICPState),
.class_init = icp_class_init,
.class_size = sizeof(ICPStateClass),
- .interfaces = (InterfaceInfo[]) {
- { TYPE_INTERRUPT_STATS_PROVIDER },
- { }
- },
};
/*
@@ -632,7 +622,6 @@ static void ics_simple_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
ICSStateClass *isc = ICS_BASE_CLASS(klass);
- InterruptStatsProviderClass *ic = INTERRUPT_STATS_PROVIDER_CLASS(klass);
isc->realize = ics_simple_realize;
dc->props = ics_simple_properties;
@@ -641,7 +630,6 @@ static void ics_simple_class_init(ObjectClass *klass, void *data)
isc->reject = ics_simple_reject;
isc->resend = ics_simple_resend;
isc->eoi = ics_simple_eoi;
- ic->print_info = ics_simple_pic_print_info;
}
static const TypeInfo ics_simple_info = {
@@ -651,10 +639,6 @@ static const TypeInfo ics_simple_info = {
.class_init = ics_simple_class_init,
.class_size = sizeof(ICSStateClass),
.instance_init = ics_simple_initfn,
- .interfaces = (InterfaceInfo[]) {
- { TYPE_INTERRUPT_STATS_PROVIDER },
- { }
- },
};
static void ics_base_realize(DeviceState *dev, Error **errp)