alistair23-linux/drivers/cpufreq
Rafael J. Wysocki 2f0ba790df 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+
2017-03-27 19:33:09 +02:00
..
acpi-cpufreq.c cpufreq: Remove CPU hotplug callbacks only if they were initialized 2016-12-21 02:52:52 +01:00
amd_freq_sensitivity.c cpufreq: Reuse new freq-table helpers 2016-07-07 00:14:27 +02:00
arm_big_little.c
arm_big_little.h
arm_big_little_dt.c
at32ap-cpufreq.c
blackfin-cpufreq.c
bmips-cpufreq.c cpufreq: bmips-cpufreq: CPUfreq driver for Broadcom's BMIPS SoCs 2017-02-09 01:22:44 +01:00
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata() 2017-02-09 01:22:46 +01:00
cppc_cpufreq.c cpufreq / CPPC: Add MODULE_DEVICE_TABLE for cppc_cpufreq driver 2016-10-21 15:11:23 +02:00
cpufreq-dt-platdev.c cpufreq: dt: Don't use generic platdev driver for ti-cpufreq platforms 2017-02-09 22:59:00 +01:00
cpufreq-dt.c PM / OPP: Rename dev_pm_opp_get_suspend_opp() and return OPP rate 2017-01-27 11:49:09 +01:00
cpufreq-dt.h cpufreq: dt: Support governor tunables per policy 2016-09-13 02:39:12 +02:00
cpufreq-nforce2.c
cpufreq.c cpufreq: Fix creation of symbolic links to policy directories 2017-03-27 19:33:09 +02:00
cpufreq_conservative.c cpufreq: conservative: Fix comment explaining frequency updates 2016-11-16 23:15:56 +01:00
cpufreq_governor.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/cpufreq.h> 2017-03-02 08:42:30 +01:00
cpufreq_governor.h sched/headers: Prepare for new header dependencies before moving code to <linux/sched/cpufreq.h> 2017-03-02 08:42:30 +01:00
cpufreq_governor_attr_set.c
cpufreq_ondemand.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/cpufreq.h> 2017-03-02 08:42:30 +01:00
cpufreq_ondemand.h cpufreq: ondemand: Don't keep a copy of freq_table pointer 2016-06-09 00:58:06 +02:00
cpufreq_performance.c cpufreq: governor: Get rid of governor events 2016-06-02 23:24:15 +02:00
cpufreq_powersave.c cpufreq: governor: Get rid of governor events 2016-06-02 23:24:15 +02:00
cpufreq_stats.c Power management updates for v4.11-rc1 2017-02-20 17:41:31 -08:00
cpufreq_userspace.c cpufreq: governor: Get rid of governor events 2016-06-02 23:24:15 +02:00
cris-artpec3-cpufreq.c
cris-etraxfs-cpufreq.c
davinci-cpufreq.c ARM: davinci: da850: fix da850_set_pll0rate() 2017-01-02 15:02:51 +05:30
dbx500-cpufreq.c
e_powersaver.c
elanfreq.c
exynos5440-cpufreq.c PM / OPP: Update OPP users to put reference 2017-01-30 09:22:21 +01:00
freq_table.c cpufreq: Handle sorted frequency tables more efficiently 2016-07-07 00:13:20 +02:00
gx-suspmod.c
highbank-cpufreq.c
ia64-acpi-cpufreq.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
imx6q-cpufreq.c PM / OPP: Update OPP users to put reference 2017-01-30 09:22:21 +01:00
intel_pstate.c Merge branch 'pm-cpufreq' 2017-03-09 15:12:27 +01:00
Kconfig cpufreq: qoriq: add ARM64 SoCs support 2017-02-09 14:33:01 +01:00
Kconfig.arm cpufreq: CPPC: add ACPI_PROCESSOR dependency 2017-02-16 01:00:03 +01:00
Kconfig.powerpc
Kconfig.x86 sched/x86: Change CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO 2016-11-30 08:27:08 +01:00
kirkwood-cpufreq.c cpufreq: kirkwood: add missing \n to end of dev_err messages 2016-09-26 15:10:58 +02:00
longhaul.c Power management material for v4.7-rc1 2016-05-16 19:17:22 -07:00
longhaul.h
longrun.c
loongson1-cpufreq.c CPUFREQ: Loongson1: Replace goto out with return in ls1x_cpufreq_probe() 2016-05-13 14:02:08 +02:00
loongson2_cpufreq.c
Makefile cpufreq: ti: Add cpufreq driver to determine available OPPs at runtime 2017-02-09 22:57:48 +01:00
maple-cpufreq.c
mt8173-cpufreq.c PM / OPP: Update OPP users to put reference 2017-01-30 09:22:21 +01:00
mvebu-cpufreq.c cpufreq: mvebu: fix integer to pointer cast 2016-06-13 23:49:43 +02:00
omap-cpufreq.c PM / OPP: Update OPP users to put reference 2017-01-30 09:22:21 +01:00
p4-clockmod.c
pasemi-cpufreq.c
pcc-cpufreq.c Revert "cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency" 2016-07-22 23:51:06 +02:00
pmac32-cpufreq.c powerpc updates for 4.7 2016-05-20 10:12:41 -07:00
pmac64-cpufreq.c
powernow-k6.c
powernow-k7.c
powernow-k7.h
powernow-k8.c
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Add boost files to export ultra-turbo frequencies 2017-02-03 23:59:41 +01:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c cpufreq: Remove CPUFREQ_START notifier event 2017-02-04 00:05:30 +01:00
pxa2xx-cpufreq.c
pxa3xx-cpufreq.c
qoriq-cpufreq.c cpufreq: qoriq: clean up unused code 2017-02-23 23:01:49 +01:00
s3c24xx-cpufreq-debugfs.c
s3c24xx-cpufreq.c cpufreq: Return index from cpufreq_frequency_table_target() 2016-06-09 00:58:06 +02:00
s3c64xx-cpufreq.c cpufreq: s3c64xx: remove incorrect __init annotation 2016-12-21 02:54:18 +01:00
s3c2410-cpufreq.c
s3c2412-cpufreq.c
s3c2416-cpufreq.c cpufreq: s3c2416: double free on driver init error path 2017-02-09 01:22:45 +01:00
s3c2440-cpufreq.c
s5pv210-cpufreq.c ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
sa1100-cpufreq.c
sa1110-cpufreq.c ARM: sa1100: move StrongARM CPU ID checks to cputype.h 2016-08-23 10:25:17 +01:00
sc520_freq.c
scpi-cpufreq.c cpufreq-SCPI: Delete unnecessary assignment for the field "owner" 2016-08-18 03:42:32 +02:00
sfi-cpufreq.c
sh-cpufreq.c
sparc-us2e-cpufreq.c sched/core: Remove the tsk_cpus_allowed() wrapper 2017-03-02 08:42:24 +01:00
sparc-us3-cpufreq.c sched/core: Remove the tsk_cpus_allowed() wrapper 2017-03-02 08:42:24 +01:00
spear-cpufreq.c
speedstep-centrino.c
speedstep-ich.c
speedstep-lib.c
speedstep-lib.h
speedstep-smi.c
sti-cpufreq.c PM / OPP: Return opp_table from dev_pm_opp_set_*() routines 2017-01-30 09:22:21 +01:00
tegra20-cpufreq.c
tegra124-cpufreq.c
ti-cpufreq.c cpufreq: make ti-cpufreq explicitly non-modular 2017-02-16 00:58:52 +01:00
unicore2-cpufreq.c
vexpress-spc-cpufreq.c