Re: [TEGRA194_CPUFREQ Patch v2 2/3] cpufreq: Add Tegra194 cpufreq driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



07.04.2020 21:55, sumitg пишет:
...
>>> + * Returns freq in KHz on success, 0 if cpu is offline
>>
>> I don't see any checks in the code about whether CPU is offline.
>>
>> Googling for "queue_work_on offline cpu" suggests that this function
>> should hang.
>>
> Tried this and didn't get crash or hang.
> show_cpuinfo_cur_freq() returns "<unknown>" value on reading frequency
> from a cluster having both it's cores offline.
> If only one cpu is offline, then frequency of other online cpu which is
> managing the policy of that cluster is returned.
> Have still added below check as guard in get|set() freq calls.
>     if (!cpu_online(cpu))
>         return -EINVAL;
> Thankyou for the input.

If CPUFreq core takes care of taking into account the offline CPU, then
the check isn't needed. It also wouldn't be enough if there was a
problem here.



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux