[PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform
Srivatsa S. Bhat
srivatsa.bhat at linux.vnet.ibm.com
Thu Mar 27 21:21:28 EST 2014
On 03/27/2014 03:29 PM, Viresh Kumar wrote:
> On 27 March 2014 15:00, Gautham R Shenoy <ego at linux.vnet.ibm.com> wrote:
>> As of now, I prefer this patch be based on code that is in the -next
>> tree. I'll get rid of the per-core locking once the serialization
>> patch of the core is accepted.
>
[...]
>>>> + pr_debug("cpu %d pmsr %lx pstate_id %d frequency %d kHz \n",
>>>> + smp_processor_id(), pmspr_val, freq_data->pstate_id,
>>>
>>> s/smp_processor_id/raw_smp_processor_id ?
>>
>> No. This function is called via smp_call_function(). So we have
>> preempt_disable on and it is safe to use smp_processor_id.
>
> My question wasn't about being safe, but avoiding the complexity
> of debug_smp_processor_id(). raw_smp_processor_id() can execute
> very quickly.
>
smp_processor_id() maps to debug_smp_processor_id() only if
CONFIG_DEBUG_PREEMPT is set. Otherwise, it is same as raw_smp_processor_id().
So I think its best to keep it as it is.
Regards,
Srivatsa S. Bhat
More information about the Linuxppc-dev
mailing list