1
0
Fork 0
alistair23-linux/drivers/cpufreq
Andreas Herrmann e4df1cbcc1 cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code
Commit 6889125b8b
(cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU)
causes powernow-k8 to trigger a preempt warning, e.g.:

  BUG: using smp_processor_id() in preemptible [00000000] code: cpufreq/3776
  caller is powernowk8_target+0x20/0x49
  Pid: 3776, comm: cpufreq Not tainted 3.6.0 #9
  Call Trace:
   [<ffffffff8125b447>] debug_smp_processor_id+0xc7/0xe0
   [<ffffffff814877e7>] powernowk8_target+0x20/0x49
   [<ffffffff81482b02>] __cpufreq_driver_target+0x82/0x8a
   [<ffffffff81484fc6>] cpufreq_governor_performance+0x4e/0x54
   [<ffffffff81482c50>] __cpufreq_governor+0x8c/0xc9
   [<ffffffff81482e6f>] __cpufreq_set_policy+0x1a9/0x21e
   [<ffffffff814839af>] store_scaling_governor+0x16f/0x19b
   [<ffffffff81484f16>] ? cpufreq_update_policy+0x124/0x124
   [<ffffffff8162b4a5>] ? _raw_spin_unlock_irqrestore+0x2c/0x49
   [<ffffffff81483640>] store+0x60/0x88
   [<ffffffff811708c0>] sysfs_write_file+0xf4/0x130
   [<ffffffff8111243b>] vfs_write+0xb5/0x151
   [<ffffffff811126e0>] sys_write+0x4a/0x71
   [<ffffffff816319a9>] system_call_fastpath+0x16/0x1b

Fix this by by always using work_on_cpu().

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-10-23 00:55:10 +02:00
..
Kconfig cpufreq: Add a generic cpufreq-cpu0 driver 2012-09-09 22:06:34 +02:00
Kconfig.arm cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS 2012-04-13 17:57:40 -07:00
Kconfig.powerpc powerpc/cpufreq: Add cpufreq driver for Momentum Maple boards 2011-07-19 15:13:04 +10:00
Kconfig.x86 acpi-cpufreq: Add compatibility for legacy AMD cpb sysfs knob 2012-09-09 22:05:20 +02:00
Makefile cpufreq: Add a generic cpufreq-cpu0 driver 2012-09-09 22:06:34 +02:00
acpi-cpufreq.c acpi-cpufreq: Add compatibility for legacy AMD cpb sysfs knob 2012-09-09 22:05:20 +02:00
cpufreq-cpu0.c cpufreq: Add a generic cpufreq-cpu0 driver 2012-09-09 22:06:34 +02:00
cpufreq-nforce2.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
cpufreq.c cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch 2012-07-20 21:39:25 +02:00
cpufreq_conservative.c Power management updates for 3.7-rc1 2012-10-02 18:32:35 -07:00
cpufreq_ondemand.c Power management updates for 3.7-rc1 2012-10-02 18:32:35 -07:00
cpufreq_performance.c [CPUFREQ] use dynamic debug instead of custom infrastructure 2011-05-04 11:50:57 -04:00
cpufreq_powersave.c [CPUFREQ] use dynamic debug instead of custom infrastructure 2011-05-04 11:50:57 -04:00
cpufreq_stats.c Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
cpufreq_userspace.c [CPUFREQ] cpufreq:userspace: fix cpu_cur_freq updation 2012-01-06 10:10:53 -05:00
db8500-cpufreq.c ARM: ux500: core U9540 support 2012-05-02 00:25:13 +02:00
e_powersaver.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
elanfreq.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
exynos-cpufreq.c EXYNOS: bugfix on retrieving old_index from freqs.old 2012-07-20 11:58:34 +02:00
exynos4x12-cpufreq.c EXYNOS4X12: Add support cpufreq for EXYNOS4X12 2012-03-14 14:39:47 -04:00
exynos4210-cpufreq.c [CPUFREQ] EXYNOS4210: update the name of EXYNOS clock register 2012-02-29 22:24:38 -05:00
exynos5250-cpufreq.c [CPUFREQ] EXYNOS5250: Add support max 1.7GHz for EXYNOS5250 2012-07-19 13:20:25 +09:00
freq_table.c [CPUFREQ] use dynamic debug instead of custom infrastructure 2011-05-04 11:50:57 -04:00
gx-suspmod.c cpufreq/gx: Fix the compile error 2012-02-02 15:32:12 -08:00
longhaul.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
longhaul.h sections: fix section conflicts in drivers/cpufreq 2012-09-14 21:10:46 +02:00
longrun.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
maple-cpufreq.c powerpc/cpufreq: Add cpufreq driver for Momentum Maple boards 2011-07-19 15:13:04 +10:00
mperf.c [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
mperf.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
omap-cpufreq.c cpufreq: OMAP: use get_cpu_device() instead of omap_device API 2012-10-08 14:58:56 -07:00
p4-clockmod.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
pcc-cpufreq.c drivers/cpufreq/pcc-cpufreq.c: fix error return code 2012-08-08 20:49:25 +02:00
powernow-k6.c powernow-k6: Really enable auto-loading 2012-02-13 15:26:03 -08:00
powernow-k7.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
powernow-k7.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
powernow-k8.c cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code 2012-10-23 00:55:10 +02:00
powernow-k8.h cpufreq: Remove support for hardware P-state chips from powernow-k8 2012-09-09 22:05:30 +02:00
s3c64xx-cpufreq.c [CPUFREQ] s3c64xx: Fix mis-cherry pick of VDDINT 2012-02-29 22:24:38 -05:00
s3c2416-cpufreq.c cpufreq: Fix typo in cpufreq driver 2012-07-20 10:37:40 +02:00
s5pv210-cpufreq.c [CPUFREQ] s5pv210: make needlessly global symbols static 2011-07-13 18:30:00 -04:00
sc520_freq.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
speedstep-centrino.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
speedstep-ich.c cpufreq: Fix typo in cpufreq driver 2012-07-20 10:37:40 +02:00
speedstep-lib.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
speedstep-lib.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
speedstep-smi.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00