qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 8/8] ppc/xics: Split ICS into ics-base and ic


From: Nikunj A Dadhania
Subject: Re: [Qemu-devel] [PATCH v2 8/8] ppc/xics: Split ICS into ics-base and ics class
Date: Thu, 30 Jun 2016 15:24:30 +0530
User-agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu)

Cédric Le Goater <address@hidden> writes:

> On 06/28/2016 09:05 PM, Nikunj A Dadhania wrote:
>> From: Benjamin Herrenschmidt <address@hidden>
>> 
>> 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 <address@hidden>
>> Signed-off-by: Nikunj A Dadhania <address@hidden>

>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]