> -----Original Message----- > From: cpufreq-owner@xxxxxxxxxxxxxxx [mailto:cpufreq-owner@xxxxxxxxxxxxxxx] > On Behalf Of Viresh Kumar > Sent: 2013年4月25日 19:27 > To: Tang Yuantian-B29983 > Cc: rjw@xxxxxxx; cpufreq@xxxxxxxxxxxxxxx; linux-pm@xxxxxxxxxxxxxxx; Lists > linaro-kernel > Subject: Re: [PATCH] cpufreq: Fix the driver can not be unloaded issue > > On 25 April 2013 16:08, Tang Yuantian-B29983 <B29983@xxxxxxxxxxxxx> wrote: > > 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. > > 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).. Exactly. Currently, we don't consider the offline cpus when setting policy->cpus. Probably other platforms do the same thing. Thanks, Yuantian > -- > To unsubscribe from this list: send the line "unsubscribe cpufreq" in the > body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at > http://vger.kernel.org/majordomo-info.html ?韬{.n?????%??檩??w?{.n???珉z??^n?■???h?璀?{?夸z罐?+€?zf"?????i?????_璁?:+v??撸?