alistair23-linux/drivers/cpufreq
Denis Kirjanov 8a10c06a20 cpufreq: powernv: Disable preemption while checking CPU throttling state
With preemption turned on we can read incorrect throttling state
while being switched to CPU on a different chip.

 BUG: using smp_processor_id() in preemptible [00000000] code: cat/7343
 caller is .powernv_cpufreq_throttle_check+0x2c/0x710
 CPU: 13 PID: 7343 Comm: cat Not tainted 4.8.0-rc5-dirty #1
 Call Trace:
 [c0000007d25b75b0] [c000000000971378] .dump_stack+0xe4/0x150 (unreliable)
 [c0000007d25b7640] [c0000000005162e4] .check_preemption_disabled+0x134/0x150
 [c0000007d25b76e0] [c0000000007b63ac] .powernv_cpufreq_throttle_check+0x2c/0x710
 [c0000007d25b7790] [c0000000007b6d18] .powernv_cpufreq_target_index+0x288/0x360
 [c0000007d25b7870] [c0000000007acee4] .__cpufreq_driver_target+0x394/0x8c0
 [c0000007d25b7920] [c0000000007b22ac] .cpufreq_set+0x7c/0xd0
 [c0000007d25b79b0] [c0000000007adf50] .store_scaling_setspeed+0x80/0xc0
 [c0000007d25b7a40] [c0000000007ae270] .store+0xa0/0x100
 [c0000007d25b7ae0] [c0000000003566e8] .sysfs_kf_write+0x88/0xb0
 [c0000007d25b7b70] [c0000000003553b8] .kernfs_fop_write+0x178/0x260
 [c0000007d25b7c10] [c0000000002ac3cc] .__vfs_write+0x3c/0x1c0
 [c0000007d25b7cf0] [c0000000002ad584] .vfs_write+0xc4/0x230
 [c0000007d25b7d90] [c0000000002aeef8] .SyS_write+0x58/0x100
 [c0000007d25b7e30] [c00000000000bfec] system_call+0x38/0xfc

Fixes: 09a972d162 (cpufreq: powernv: Report cpu frequency throttling)
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-11-16 23:29:59 +01:00
..
acpi-cpufreq.c cpufreq: acpi-cpufreq: use cached frequency mapping when possible 2016-07-21 22:28:32 +02:00
amd_freq_sensitivity.c cpufreq: Reuse new freq-table helpers 2016-07-07 00:14:27 +02:00
arm_big_little.c cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table 2016-05-05 01:40:04 +02:00
arm_big_little.h cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table 2016-05-05 01:40:04 +02:00
arm_big_little_dt.c cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table 2016-05-05 01:40:04 +02:00
at32ap-cpufreq.c
blackfin-cpufreq.c blackfin-cpufreq: Mark cpu_set_cclk() as static 2015-12-28 01:51:36 +01:00
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: make symbol brcm_avs_cpufreq_attr static 2016-11-11 01:32:53 +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: pxa: use generic platdev driver for device-tree 2016-11-11 02:08:42 +01:00
cpufreq-dt.c cpufreq: dt: Support governor tunables per policy 2016-09-13 02:39:12 +02:00
cpufreq-dt.h cpufreq: dt: Support governor tunables per policy 2016-09-13 02:39:12 +02:00
cpufreq-nforce2.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
cpufreq.c Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 19:43:08 -07:00
cpufreq_conservative.c cpufreq: conservative: Fix comment explaining frequency updates 2016-11-16 23:15:56 +01:00
cpufreq_governor.c cpufreq: conservative: Decrease frequency faster for deferred updates 2016-11-16 23:15:56 +01:00
cpufreq_governor.h cpufreq: conservative: Decrease frequency faster for deferred updates 2016-11-16 23:15:56 +01:00
cpufreq_governor_attr_set.c cpufreq: governor: Move abstract gov_attr_set code to seperate file 2016-04-02 01:09:01 +02:00
cpufreq_ondemand.c cpufreq: governor: Don't use 'timer' keyword 2016-11-11 01:48:33 +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 cpufreq: stats: New sysfs attribute for clearing statistics 2016-11-11 01:51:11 +01: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 cpufreq: davinci: Reuse cpufreq_generic_frequency_table_verify() 2016-06-09 00:58:07 +02:00
dbx500-cpufreq.c
e_powersaver.c cpufreq: e_powersaver: Use IS_ENABLED() instead of checking for built-in or module 2016-04-27 22:42:34 +02:00
elanfreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
exynos5440-cpufreq.c
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 cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
imx6q-cpufreq.c
intel_pstate.c cpufreq: intel_pstate: Use CPU load based algorithm for PM_MOBILE 2016-11-14 21:25:23 +01:00
Kconfig Merge branch 'pm-cpufreq-sched' into pm-cpufreq 2016-10-02 01:42:33 +02:00
Kconfig.arm cpufreq: brcmstb-avs-cpufreq: add debugfs support 2016-11-01 06:07:38 +01:00
Kconfig.powerpc
Kconfig.x86 cpufreq: intel_pstate: Enforce _PPC limits 2016-04-28 01:01:39 +02: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 cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
Makefile cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs 2016-11-01 06:07:37 +01:00
maple-cpufreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
mt8173-cpufreq.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2016-05-26 09:23:43 -07:00
mvebu-cpufreq.c cpufreq: mvebu: fix integer to pointer cast 2016-06-13 23:49:43 +02:00
omap-cpufreq.c remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
p4-clockmod.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
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 cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
powernow-k6.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
powernow-k7.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
powernow-k7.h
powernow-k8.c
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Disable preemption while checking CPU throttling state 2016-11-16 23:29:59 +01:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h cpufreq: e_powersaver: Use IS_ENABLED() instead of checking for built-in or module 2016-04-27 22:42:34 +02:00
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c cpufreq: Remove cpufreq_frequency_get_table() 2016-06-09 00:58:05 +02:00
pxa2xx-cpufreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
pxa3xx-cpufreq.c
qoriq-cpufreq.c cpufreq: qoriq: Fix cooling device registration issue during suspend 2016-04-25 16:07:02 +02:00
s3c24xx-cpufreq-debugfs.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
s3c24xx-cpufreq.c cpufreq: Return index from cpufreq_frequency_table_target() 2016-06-09 00:58:06 +02:00
s3c64xx-cpufreq.c
s3c2410-cpufreq.c
s3c2412-cpufreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
s3c2416-cpufreq.c
s3c2440-cpufreq.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
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 cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
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
sparc-us3-cpufreq.c
spear-cpufreq.c
speedstep-centrino.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
speedstep-ich.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
speedstep-lib.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
speedstep-lib.h
speedstep-smi.c cpufreq: Use consistent prefixing via pr_fmt 2016-04-09 01:35:18 +02:00
sti-cpufreq.c cpufreq: st: add missing \n to end of dev_err message 2016-09-26 15:11:42 +02:00
tegra20-cpufreq.c
tegra124-cpufreq.c cpufreq: tegra124: No need of setting platform-data 2016-04-09 01:12:09 +02:00
unicore2-cpufreq.c
vexpress-spc-cpufreq.c cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table 2016-05-05 01:40:04 +02:00