[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9b884a27-0b1e-f8b0-c2c5-3246432c6853@linux.vnet.ibm.com>
Date: Fri, 28 Jul 2017 09:34:53 +0530
From: Shilpasri G Bhat <shilpa.bhat@...ux.vnet.ibm.com>
To: Cyril Bur <cyrilbur@...il.com>, stewart@...ux.vnet.ibm.com
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
benh@...nel.crashing.org, paulus@...ba.org, mpe@...erman.id.au,
ego@...ux.vnet.ibm.com, svaidy@...ux.vnet.ibm.com
Subject: Re: [PATCH V8 1/3] powernv: powercap: Add support for powercap
framework
Hi Cyril,
On 07/28/2017 07:09 AM, Cyril Bur wrote:
> Is there any reason that pcap_attrs needs to be contiguous? If not, I
> feel like you could eliminate the entire loop below (and the last one
> as well maybe) and just do the assignment of pattr_groups[].attrs[] up
> there.
>
> In fact do you even need to store pcap_attrs? If you kcalloc them as
> you need them (in the loop above), you can always free them again on
> error by freeing pattr_groups[].attrs[] right?
>
> I'll admit I've become quite confused as to the layout of the sysfs dir
> that you're creating here - would you mind showing what the expected
> layout will be?
>
> I'll take more of a look once thats more clear in my head
>
> Thanks,
>
> Cyril
The sysfs layout looks as below:
# ls /sys/firmware/opal/powercap/
system-powercap
# ls /sys/firmware/opal/powercap/system-powercap/
powercap-current powercap-max powercap-min
# grep . /sys/firmware/opal/powercap/system-powercap/*
/sys/firmware/opal/powercap/system-powercap/powercap-current:2375
/sys/firmware/opal/powercap/system-powercap/powercap-max:2375
/sys/firmware/opal/powercap/system-powercap/powercap-min:1945
Thanks and Regards,
Shilpa
Powered by blists - more mailing lists