remarkable-linux/drivers/cpufreq
Rafael J. Wysocki 2dd3e724b4 cpufreq: governor: Use lockless timer function
It is possible to get rid of the timer_lock spinlock used by the
governor timer function for synchronization, but a couple of races
need to be avoided.

The first race is between multiple dbs_timer_handler() instances
that may be running in parallel with each other on different
CPUs.  Namely, one of them has to queue up the work item, but it
cannot be queued up more than once.  To achieve that,
atomic_inc_return() can be used on the skip_work field of
struct cpu_common_dbs_info.

The second race is between an already running dbs_timer_handler()
and gov_cancel_work().  In that case the dbs_timer_handler() might
not notice the skip_work incrementation in gov_cancel_work() and
it might queue up its work item after gov_cancel_work() had
returned (and that work item would corrupt skip_work going
forward).  To prevent that from happening, gov_cancel_work()
can be made wait for the timer function to complete (on all CPUs)
right after skip_work has been incremented.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2015-12-09 22:26:13 +01:00
..
acpi-cpufreq.c cpufreq: acpi_cpufreq: prevent crash on reading freqdomain_cpus 2015-10-08 21:47:13 +02:00
amd_freq_sensitivity.c
arm_big_little.c cpufreq: arm_big_little: fix frequency check when bL switcher is active 2015-11-02 01:58:27 +01:00
arm_big_little.h PM / OPP: Prefix exported opp routines with dev_pm_opp_ 2015-09-15 02:03:16 +02:00
arm_big_little_dt.c PM / OPP: Prefix exported opp routines with dev_pm_opp_ 2015-09-15 02:03:16 +02:00
at32ap-cpufreq.c
blackfin-cpufreq.c
cppc_cpufreq.c cpufreq: CPPC: Initialize and check CPUFreq CPU co-ord type correctly 2015-11-23 22:21:18 +01:00
cpufreq-dt.c PM / OPP: Prefix exported opp routines with dev_pm_opp_ 2015-09-15 02:03:16 +02:00
cpufreq-nforce2.c cpufreq: nforce2: Fix typo in comment to function nforce2_init() 2015-06-15 15:45:24 +02:00
cpufreq.c cpufreq: use last policy after online for drivers with ->setpolicy 2015-12-02 23:50:33 +01:00
cpufreq_conservative.c cpufreq: governor: Pass policy as argument to ->gov_dbs_timer() 2015-12-07 02:20:22 +01:00
cpufreq_governor.c cpufreq: governor: Use lockless timer function 2015-12-09 22:26:13 +01:00
cpufreq_governor.h cpufreq: governor: Use lockless timer function 2015-12-09 22:26:13 +01:00
cpufreq_ondemand.c cpufreq: ondemand: update update_sampling_rate() to make it more efficient 2015-12-09 22:26:12 +01:00
cpufreq_performance.c
cpufreq_powersave.c
cpufreq_stats.c
cpufreq_userspace.c
cris-artpec3-cpufreq.c
cris-etraxfs-cpufreq.c
davinci-cpufreq.c
dbx500-cpufreq.c
e_powersaver.c ACPI / processor: Drop an unused argument of a cleanup routine 2015-07-22 22:11:16 +02:00
elanfreq.c
exynos5440-cpufreq.c PM / OPP: Prefix exported opp routines with dev_pm_opp_ 2015-09-15 02:03:16 +02:00
freq_table.c cpufreq: Allow drivers to enable boost support after registering driver 2015-08-07 03:25:23 +02:00
gx-suspmod.c cpufreq: gx-suspmod: Fix two typos in two comments 2015-06-15 15:46:15 +02:00
highbank-cpufreq.c
hisi-acpu-cpufreq.c cpufreq: hisilicon: add acpu driver 2015-04-02 02:24:54 +02:00
ia64-acpi-cpufreq.c cpufreq: ia64: Fix a memory leak in acpi_cpufreq_cpu_exit() 2015-07-22 22:27:40 +02:00
imx6q-cpufreq.c Merge branch 'pm-opp' 2015-11-02 00:54:37 +01:00
integrator-cpufreq.c cpufreq: integrator: Fix module autoload for OF platform driver 2015-09-25 23:29:35 +02:00
intel_pstate.c intel_pstate: Fix "performance" mode behavior with HWP enabled 2015-11-25 23:37:44 +01:00
Kconfig cpufreq: qoriq: rename the driver 2015-03-18 22:35:16 +01:00
Kconfig.arm cpufreq: SCPI: Depend on SCPI clk driver 2015-11-23 23:50:27 +01:00
Kconfig.powerpc cpufreq: qoriq: rename the driver 2015-03-18 22:35:16 +01:00
Kconfig.x86 Revert "cpufreq: intel_pstate: Use ACPI perf configuration" 2015-11-19 00:20:42 +01:00
kirkwood-cpufreq.c
longhaul.c
longhaul.h
longrun.c
loongson2_cpufreq.c CPUFREQ: Loongson2: Fix broken build due to incorrect include. 2015-08-03 09:24:59 +02:00
ls1x-cpufreq.c MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
Makefile ARM: SoC driver updates for v4.4 2015-11-10 15:00:03 -08:00
maple-cpufreq.c
mt8173-cpufreq.c PM / OPP: Prefix exported opp routines with dev_pm_opp_ 2015-09-15 02:03:16 +02:00
omap-cpufreq.c
p4-clockmod.c p4-clockmod: Replace cpu_sibling_mask() with topology_sibling_cpumask() 2015-05-27 15:22:16 +02:00
pasemi-cpufreq.c
pcc-cpufreq.c
pmac32-cpufreq.c
pmac64-cpufreq.c
powernow-k6.c
powernow-k7.c ACPI / processor: Drop an unused argument of a cleanup routine 2015-07-22 22:11:16 +02:00
powernow-k7.h
powernow-k8.c ACPI / processor: Drop an unused argument of a cleanup routine 2015-07-22 22:11:16 +02:00
powernow-k8.h
powernv-cpufreq.c cpufreq : powernv: Report Pmax throttling if capped below nominal frequency 2015-09-26 03:03:06 +02:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event 2015-09-01 15:50:38 +02:00
pxa2xx-cpufreq.c cpufreq: pxa: make pxa_freqs arrays const 2015-05-05 00:49:38 +02:00
pxa3xx-cpufreq.c
qoriq-cpufreq.c cpufreq: qoriq: optimize the CPU frequency switching time 2015-06-15 15:47:28 +02:00
s3c24xx-cpufreq-debugfs.c
s3c24xx-cpufreq.c cpufreq: s3c: remove last use of resume_clocks callback 2015-02-19 06:36:53 +01:00
s3c64xx-cpufreq.c
s3c2410-cpufreq.c
s3c2412-cpufreq.c
s3c2416-cpufreq.c cpufreq: s3c: remove incorrect __init annotations 2015-02-19 06:36:53 +01:00
s3c2440-cpufreq.c
s5pv210-cpufreq.c cpufreq: s5pv210-cpufreq: fix wrong do_div() usage 2015-11-05 22:50:48 +01:00
sa1100-cpufreq.c
sa1110-cpufreq.c
sc520_freq.c
scpi-cpufreq.c cpufreq: arm_big_little: add SCPI interface driver 2015-09-28 11:53:38 +01:00
sfi-cpufreq.c cpufreq: sfi: use kmemdup rather than duplicating its implementation 2015-09-01 15:51:15 +02:00
sh-cpufreq.c
sparc-us2e-cpufreq.c
sparc-us3-cpufreq.c
spear-cpufreq.c
speedstep-centrino.c
speedstep-ich.c speedstep-ich: Replace cpu_sibling_mask() with topology_sibling_cpumask() 2015-05-27 15:22:16 +02:00
speedstep-lib.c cpufreq: speedstep-lib: Use monotonic clock 2015-09-01 15:51:43 +02:00
speedstep-lib.h
speedstep-smi.c
tegra20-cpufreq.c cpufreq: tegra20: remove superfluous CONFIG_PM ifdefs 2015-09-26 03:00:57 +02:00
tegra124-cpufreq.c cpufreq: Add cpufreq driver for Tegra124 2015-07-16 09:34:09 +02:00
unicore2-cpufreq.c
vexpress-spc-cpufreq.c