Thread (23 messages) 23 messages, 4 authors, 2020-01-22

Re: [PATCH 1/4] PM / EM: and devices to Energy Model

From: Quentin Perret <hidden>
Date: 2020-01-21 09:32:06
Also in: dri-devel, linux-arm-msm, linux-mediatek, linux-omap, linux-pm, lkml

On Monday 20 Jan 2020 at 18:38:41 (+0000), Lukasz Luba wrote:
I think we could avoid this additional argument 'cpumask'. I have
checked the cpufreq_cpu_get function, which should do be good for this:

---------->8-------------------------
static int _get_sharing_cpus(struct device *cpu_dev, struct cpumask *span)
{
        struct cpufreq_policy *policy;

        policy = cpufreq_cpu_get(cpu_dev->id);
        if (policy) {
                cpumask_copy(span, policy->cpus);
That should be with 'policy->related_cpus', but yes if the policy
cpumasks have been populated this approach is OK I think.
                cpufreq_cpu_put(policy);
                return 0;
        } else {
                return -EINVAL;
        }
}
--------------------------8<-------------------------------
Thanks,
Quentin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help