[PATCH] enable RTAS /proc for PowerPC/CHRP platform
nd at bplan-gmbh.de
Wed Oct 18 15:51:52 EST 2006
Christoph Hellwig wrote:
>> --- a/arch/powerpc/kernel/rtas-proc.c 2006-10-14
>> +++ b/arch/powerpc/kernel/rtas-proc.c 2006-10-16
>> @@ -253,43 +253,70 @@ static void get_location_code(struct seq
>> static void check_location_string(struct seq_file *m, char *c);
>> static void check_location(struct seq_file *m, char *c);
>> +#ifdef CONFIG_PPC64
>> +#define PROCRTAS_ROOT "ppc64"
>> +#define PROCRTAS_ROOT "ppc"
> Please don't do any pathname changes. Even if ppc64 isn't correct it's
> what applications expect and what we should provide for a coherent user
However, in this case 'ppc' (could be 32 or 64 as it is not specified)
is more generic than 'ppc64'.
> This should be the only change you need, and it should follow kernel
> coding style, aka:
> if (!machine_is(pseries) && !machine_is(chrp))
> return -ENODEV;
>> rtas_node = of_find_node_by_name(NULL, "rtas");
>> if (rtas_node == NULL)
>> return -ENODEV;
> And given this check I wonder why we need the platform check at all. It
> should be safe to just remove it.
Indeed, however I can only test on CHRP. I'll remove the check in the
The patch also include a small code to create the /proc/ppc/rtas entry.
Should this be done here, or somewhere in arch/powerpc/chrp/setup.c ?
I will re submit a patch as soon as I can.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 249 bytes
Desc: not available
More information about the Linuxppc-dev