[Skiboot] [PATCH v2] platform/astbmc: Do not delete compatible property

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Sun Apr 2 18:59:15 AEST 2017


On 03/15/2017 11:29 AM, Oliver O'Halloran wrote:
> On Tue, Mar 14, 2017 at 2:19 AM, Vasant Hegde
> <hegdevasant at linux.vnet.ibm.com> wrote:
>> P9 onwards OPAL is building device tree for BMC based system using
>> HDAT. We are populating bmc/compatible node with ast bmc version.
>> Hence do not delete this property.
>>
>> CC: Jeremy Kerr <jk at ozlabs.org>
>> CC: Ananth N Mavinakayanahalli <ananth at linux.vnet.ibm.com>
>> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
>> ---
>> Changes in v2:
>>   - Updated description
>>
>> -Vasant
>>
>>  platforms/astbmc/common.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c
>> index 6f29e61..dba22ae 100644
>> --- a/platforms/astbmc/common.c
>> +++ b/platforms/astbmc/common.c
>> @@ -275,6 +275,10 @@ static void del_compatible(struct dt_node *node)
>>  {
>>         struct dt_property *prop;
>>
>> +       /* Do not delete compatible property on P9 */
>> +       if (proc_gen > proc_gen_p8)
>> +               return;
>> +
>>         prop = __dt_find_property(node, "compatible");
>>         if (prop)
>>                 dt_del_property(node, prop);
>> --
>
> I'm not sure this is the best fix for this. This function is only
> called from astbmc_fixup_bmc_sensors() which exists to fix up issues
> with the hostboot provided FDT on P8. Given we generate the entire DT
> from the HDAT on P9 I don't really see the point of calling it at all.
> Could we add a proc_gen check around the call to
> astbmc_fixup_bmc_sensors() instead?

Yep. Makes sense. Fixed in V3.

-Vasant



More information about the Skiboot mailing list