android_kernel_google_msm/drivers/cpufreq
Stephen Boyd b5608a5fc5 cpufreq: Avoid using smp_processor_id() in preemptible context
Even though this work item runs on only one cpu at a time (due to
queue_work_on()) it is possible for the work item to be preempted
and so use of smp_processor_id() is illegal.

BUG: using smp_processor_id() in preemptible [00000000]
code: kworker/3:1/4162 caller is dbs_refresh_callback+0xc/0x188
[<c00151b0>] (unwind_backtrace+0x0/0x120) from [<c0279058>]
(debug_smp_processor_id+0xbc/0xf0)
[<c0279058>] (debug_smp_processor_id+0xbc/0xf0) from [<c0454b54>]
(dbs_refresh_callback+0xc/0x188)
[<c0454b54>] (dbs_refresh_callback+0xc/0x188) from [<c0087290>]
(process_one_work+0x354/0x648)
[<c0087290>] (process_one_work+0x354/0x648) from [<c0089754>]
(worker_thread+0x1a8/0x2a8)
[<c0089754>] (worker_thread+0x1a8/0x2a8) from [<c008e480>]
(kthread+0x90/0xa0)
[<c008e480>] (kthread+0x90/0xa0) from [<c000f438>]
(kernel_thread_exit+0x0/0x8)

The intent of the code is to determine which CPU this work item
is running on, which we can easily do by passing that information
in a wrapper struct around the work struct. Do this so we avoid
this problem.

Change-Id: I05ca0ff2b3cbaa239930463ea0760e3e9d75145f
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-10-29 23:12:12 +08:00
..
acpi-cpufreq.c
cpufreq-nforce2.c
cpufreq.c cpufreq: Create DVFS stress test function. 2013-04-18 16:07:52 -07:00
cpufreq_conservative.c cpufreq: Use dedicated high-priority workqueues 2013-06-05 15:27:46 +00:00
cpufreq_gov_msm.c msm: dcvs: gpu minimum frequency levels 2013-03-07 15:22:18 -08:00
cpufreq_interactive.c cpufreq: interactive: Fix blocked task warnings 2013-01-10 10:38:47 -08:00
cpufreq_limit.c cpufreq: Add cpufreq limit driver 2016-10-29 23:12:10 +08:00
cpufreq_ondemand.c cpufreq: Avoid using smp_processor_id() in preemptible context 2016-10-29 23:12:12 +08:00
cpufreq_performance.c
cpufreq_powersave.c
cpufreq_stats.c cpufreq: fix sleeping in atomic context when realloc freq_table for all_time_in_state 2014-08-05 19:08:52 +00:00
cpufreq_userspace.c cpufreq: Create DVFS stress test function. 2013-04-18 16:07:52 -07:00
db8500-cpufreq.c drivers/cpufreq/db8500-cpufreq: remove references to cpu_*_map. 2012-03-29 15:38:30 +10:30
e_powersaver.c
elanfreq.c
exynos-cpufreq.c EXYNOS5250: Add support cpufreq for EXYNOS5250 2012-03-14 14:39:50 -04:00
exynos4x12-cpufreq.c
exynos4210-cpufreq.c
exynos5250-cpufreq.c EXYNOS5250: Add support cpufreq for EXYNOS5250 2012-03-14 14:39:50 -04:00
freq_table.c
gx-suspmod.c
Kconfig cpufreq: Add cpufreq limit driver 2016-10-29 23:12:10 +08:00
Kconfig.arm cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS 2012-04-13 17:57:40 -07:00
Kconfig.powerpc
Kconfig.x86
longhaul.c
longhaul.h
longrun.c
Makefile cpufreq: Add cpufreq limit driver 2016-10-29 23:12:10 +08:00
maple-cpufreq.c
mperf.c
mperf.h
omap-cpufreq.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
p4-clockmod.c
pcc-cpufreq.c
powernow-k6.c
powernow-k7.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
powernow-k7.h
powernow-k8.c
powernow-k8.h
s3c64xx-cpufreq.c
s3c2416-cpufreq.c
s5pv210-cpufreq.c
sc520_freq.c
speedstep-centrino.c
speedstep-ich.c
speedstep-lib.c
speedstep-lib.h
speedstep-smi.c