[PATCH V2 1/2] powerpc/powernv: new function to access OPAL msglog

Andrew Donnellan andrew.donnellan at au1.ibm.com
Thu Feb 11 18:31:40 AEDT 2016


On 11/02/16 18:14, Joel Stanley wrote:
> Looks like you didn't break it much. Congratulations on being the new
> memcons maintainer!

Argh, I forgot the golden rule of kernel development - if you touch it, 
you own it... :)

> There's one issue with your error handling.
>
>> diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
>> index 4e0da5a..0256d07 100644
>> --- a/arch/powerpc/platforms/powernv/opal.c
>> +++ b/arch/powerpc/platforms/powernv/opal.c
>> @@ -724,6 +724,9 @@ static int __init opal_init(void)
>>                  of_node_put(leds);
>>          }
>>
>> +       /* Initialise OPAL message log interface */
>> +       opal_msglog_init();
>
> If this fails due to eg. the magic number being wrong.
>
>> +
>>          /* Create "opal" kobject under /sys/firmware */
>>          rc = opal_sysfs_init();
>>          if (rc == 0) {
>> @@ -739,8 +742,8 @@ static int __init opal_init(void)
>>                  opal_platform_dump_init();
>>                  /* Setup system parameters interface */
>>                  opal_sys_param_init();
>> -               /* Setup message log interface. */
>> -               opal_msglog_init();
>> +               /* Setup message log sysfs interface. */
>> +               opal_msglog_sysfs_init();
>
> This will succeed, leaving you with a sysfs file attached to a broken driver.

V3 on its way...

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan at au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited



More information about the Linuxppc-dev mailing list