[PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

Viresh Kumar viresh.kumar at linaro.org
Sat Mar 22 00:12:50 EST 2014


On 21 March 2014 18:34, Gautham R Shenoy <ego at linux.vnet.ibm.com> wrote:
> Consider the case when pmspr = 0x00feffffffffffff;
>
> We are interested in extracting the value 'fe'. And ensure that when
> we store this value into an int, we get the sign extension right.
>
> So the following doesn't work:
>
>    pstate_id = (pmspr_val >> 48) & 0xFFFFFFFF;

What about pstate_id = (pmspr_val >> 48) & 0xFF; ??


More information about the Linuxppc-dev mailing list