cpufreq: acpi-cpufreq: Don't set policy->related_cpus from .init()
authorViresh Kumar <viresh.kumar@linaro.org>
Sun, 24 Mar 2013 15:58:12 +0000 (15:58 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Mar 2013 14:13:32 +0000 (15:13 +0100)
commitaa77a52764a92216b61a6c8079b5c01937c046cd
tree0f5bf41e858e29c298af56d7ce1379f6acedd8ce
parent187da1d97f3a949b967274d7ee2f95d3a4f39251
cpufreq: acpi-cpufreq: Don't set policy->related_cpus from .init()

With the addition of following patch:

fcf8058 cpufreq: Simplify cpufreq_add_dev()

cpufreq driver's .init() routine must initialize policy->cpus with
mask of all possible CPUs (Online + Offline) that share the clock.
Then the core would copy this mask onto policy->related_cpus and will
reset policy->cpus to carry only online cpus.

acpi-cpufreq driver wasn't updated with this assumption and so
sometimes when we try to hot[un]plug CPUs at run time, sysfs
directories get corrupted.

This patch fixes acpi-cpufreq driver against this corruption.

Reported-and-tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/acpi-cpufreq.c