I am saying your patch 2 probably is wrong, not patch 1. 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. Cpu 4's policy->cpus is 0, 1, 2, 3, 4 Cpu 5's policy->cpus is 0, 1, 2, 3, 4, 5. .... So cpu 4 and 5's policy->cpus are not right, they should be 0, 1, 2, 3, 4, 5, 6, 7.
Thanks, Yuantian
-----Original Message----- From: Viresh Kumar [mailto:viresh.kumar@linaro.org] Sent: Tuesday, September 02, 2014 2:49 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:16, Yuantian Tang Yuantian.Tang@freescale.com wrote:
Hello Viresh:
Probably it is not right considering the CPU cluster and CPU hotplug case.
So in case of hotplug the worst that can happen is policy->cpu gets updated. But because we are all concerned about cpu_data here, which is stored in per-cpu variables and is updated for all online CPUs, it should work.
I would like to see how that fails :)