Re: [PATCH] cpufreq: Fix the driver can not be unloaded issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)..
--
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




[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux