If policy->cpus is same for all cpus in a cluster that should not be a problem. Probably there's something else that need to check. I have feelings that your patch may not be correct. I hope it works though.
Thanks, Yuantian
-----Original Message----- From: Viresh Kumar [mailto:viresh.kumar@linaro.org] Sent: Tuesday, September 02, 2014 3:10 PM To: Tang Yuantian-B29983 Cc: Rafael Wysocki; linaro-kernel@lists.linaro.org; linux-pm@vger.kernel.org; Zhang Hongbo-B45939; Li Yang-Leo-R58472 Subject: Re: [PATCH 2/2] cpufreq: ppc-corenet: remove per-cpu variable 'cpu_mask'
On 2 September 2014 12:32, Yuantian Tang Yuantian.Tang@freescale.com wrote:
I am saying your patch 2 probably is wrong, not patch 1.
Okay, it looked initially that both are screwed up :)
Consider following case: On T4240 platform, we have 3 cluster with 8 cpu in each cluster. We offline 4 5 6 7 cpu and then online them back.
i.e. last four CPUs of first cluster..
Cpu 4's policy->cpus is 0, 1, 2, 3, 4 Cpu 5's policy->cpus is 0, 1, 2, 3, 4, 5.
How? And how is this patch going to touch policy->cpus? CPU 0-7 should be sharing a single 'struct cpufreq_policy' and so policy->cpus should be same for all..