On 25 April 2013 08:16, Tang Yuantian-B29983 B29983@freescale.com wrote:
I believed what you said is correct and went on testing this on my platform. 2 clusters with 2 and 3 cpus... And so i have multiple cpus per cluster or policy structure.
insmod/rmmod worked as expected without any issues.
So, for me there are no such issues. BTW, i tested this on latest rc from Linus and also on latest code from linux-next.
I am sure the counts are very well balanced and there are no issues in the latest code Atleast.
That's wired. I will have more tests on this. Thanks.
I found another bug you can try. It is also found on multiple cpus per cluster. Test step: 1. compile the driver as module. 2. hot-unplug one cpu( any one is OK) 3. insmod module 4. hot-plug the cpu ----> will cause error.
Or test step also can be: 1. hot-unplug all the cpus in one cluster 2. hot-plug the cpus in this cluster. When the second cpu gets hot-pluged, error will occur.
That's because the second cpu will call the cpufreq_add_dev_symlink() to Create the first cpu's "cpufreq link" which is already created. That needs more work to make a patch, hope you can fix it.
Thanks, Yuantian
On 25 April 2013 16:08, Tang Yuantian-B29983 B29983@freescale.com wrote:
Haven't tested it now but i know why that can happen. It will happen only if driver->init() isn't setting policy->cpus correctly. You need to set both online & offline cpus, but in your setup it looks you are setting only online cpus and so cpufreq core isn't able to use the earlier policy struct for offline cpus.
And so it created a new struct cpufreq_policy for second cpu and trying to add links for all other cpus too... (which share this policy)..
On 26 April 2013 07:09, Tang Yuantian-B29983 B29983@freescale.com wrote:
But this is a requirement of cpufreq framework and drivers must adapt to it. Let me know which drivers don't meet this requirement and i will get them fixed.
linaro-kernel@lists.linaro.org