diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-27 19:33:09 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-27 19:33:09 +0200 |
commit | 2f0ba790df51721794c11abc7a076d407392f648 (patch) | |
tree | 161cef43a1b7043076e91651b302dd0804d5bdf2 /drivers/scsi/hosts.c | |
parent | ff010472fb75670cb5c08671e820eeea3af59c87 (diff) |
cpufreq: Fix creation of symbolic links to policy directories
The cpufreq core only tries to create symbolic links from CPU
directories in sysfs to policy directories in cpufreq_add_dev(),
either when a given CPU is registered or when the cpufreq driver
is registered, whichever happens first. That is not sufficient,
however, because cpufreq_add_dev() may be called for an offline CPU
whose policy object has not been created yet and, quite obviously,
the symbolic cannot be added in that case.
Fix that by making cpufreq_online() attempt to add symbolic links to
policy objects for the CPUs in the related_cpus mask of every new
policy object created by it.
The cpufreq_driver_lock locking around the for_each_cpu() loop
in cpufreq_online() is dropped, because it is not necessary and the
code is somewhat simpler without it. Moreover, failures to create
a symbolic link will not be regarded as hard errors any more and
the CPUs without those links will not be taken offline automatically,
but that should not be problematic in practice.
Reported-and-tested-by: Prashanth Prakash <pprakash@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 4.9+ <stable@vger.kernel.org> # 4.9+
Diffstat (limited to 'drivers/scsi/hosts.c')
0 files changed, 0 insertions, 0 deletions