Cédric Le Goater <c...@kaod.org> writes: > On 06/28/2016 09:05 PM, Nikunj A Dadhania wrote: >> From: Benjamin Herrenschmidt <b...@kernel.crashing.org> >> >> The existing implementation remains same and ics-base is introduced. The >> type name "ics" is retained, and all the related functions renamed as >> ics_simple_* >> >> This will allow different implementations for the source controllers >> such as the MSI support of PHB3 on Power8 which uses in-memory state >> tables for example. >> >> Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> >> Signed-off-by: Nikunj A Dadhania <nik...@linux.vnet.ibm.com>
>> diff --git a/hw/intc/xics.c b/hw/intc/xics.c >> index bbdba84..39928d9 100644 >> --- a/hw/intc/xics.c >> +++ b/hw/intc/xics.c >> @@ -112,7 +112,7 @@ void xics_add_ics(XICSState *xics) >> { >> ICSState *ics; >> >> - ics = ICS(object_new(TYPE_ICS)); >> + ics = ICS_SIMPLE(object_new(TYPE_ICS_SIMPLE)); > > Should not that be ICS_BASE() ? No, we renamed ICS => ICS_SIMPLE (retaining the typename "ics" for migration compatibility). ICS_SIMPLE is a child of ICS_BASE >> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h >> index 8433bf9..bc10c16 100644 >> --- a/include/hw/ppc/xics.h >> +++ b/include/hw/ppc/xics.h >> @@ -118,22 +118,29 @@ struct ICPState { >> bool cap_irq_xics_enabled; >> }; >> >> -#define TYPE_ICS "ics" >> -#define ICS(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS) >> +#define TYPE_ICS_BASE "ics-base" >> +#define ICS_BASE(obj) OBJECT_CHECK(ICSState, (obj), TYPE_ICS_SIMPLE) > > should not that be TYPE_ICS_BASE ? Oops, you are right. >> #define ICS_CLASS(klass) \ >> - OBJECT_CLASS_CHECK(ICSStateClass, (klass), TYPE_ICS) >> + OBJECT_CLASS_CHECK(ICSStateClass, (klass), TYPE_ICS_SIMPLE) > > and here ? > > >> #define ICS_GET_CLASS(obj) \ >> - OBJECT_GET_CLASS(ICSStateClass, (obj), TYPE_ICS) >> + OBJECT_GET_CLASS(ICSStateClass, (obj), TYPE_ICS_SIMPLE) > > and here ? > > but I might be confusing all these ICS :) Earlier there were two 1) TYPE_ICS 2) TYPE_ICS_KVM (parent: TYPE_ICS) Now: 1) TYPE_ICS_BASE - new 2) TYPE_ICS_SIMPLE - was known as TYPE_ICS 3) TYPE_ICS_KVM - same as before (parent: TYPE_ICS_SIMPLE) Regards Nikunj