Denis Kirjanov
89c728ed92
cpufreq: powernv: Disable preemption while checking CPU throttling state
commit 8a10c06a20 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19 20:18:06 +01:00
..
2016-07-21 22:28:32 +02:00
2016-07-07 00:14:27 +02:00
2016-05-05 01:40:04 +02:00
2016-05-05 01:40:04 +02:00
2016-05-05 01:40:04 +02:00
2016-10-14 12:46:13 -07:00
2016-10-13 14:42:06 +02:00
2016-04-02 01:09:01 +02:00
2016-08-16 22:14:55 +02:00
2016-06-02 23:24:39 +02:00
2016-07-07 00:14:27 +02:00
2016-06-09 00:58:06 +02:00
2016-06-02 23:24:15 +02:00
2016-06-02 23:24:15 +02:00
2016-06-09 00:58:05 +02:00
2016-06-02 23:24:15 +02:00
2016-09-16 23:57:04 +02:00
2017-01-06 10:40:15 +01:00
2016-09-13 02:39:12 +02:00
2016-04-09 01:35:18 +02:00
2016-10-03 19:43:08 -07:00
2016-06-09 00:58:07 +02:00
2016-04-27 22:42:34 +02:00
2016-04-09 01:35:18 +02:00
2016-07-07 00:13:20 +02:00
2016-04-09 01:35:18 +02:00
2016-10-24 23:20:25 +02:00
2016-10-02 01:42:33 +02:00
2016-04-25 16:18:24 +02:00
2016-04-28 01:01:39 +02:00
2016-09-26 15:10:58 +02:00
2016-05-16 19:17:22 -07:00
2016-05-13 14:02:08 +02:00
2016-04-09 01:35:18 +02:00
2016-05-19 10:02:26 -07:00
2016-04-09 01:35:18 +02:00
2016-05-26 09:23:43 -07:00
2016-06-13 23:49:43 +02:00
2016-05-27 15:26:11 -07:00
2016-04-09 01:35:18 +02:00
2016-07-22 23:51:06 +02:00
2016-05-20 10:12:41 -07:00
2016-04-09 01:35:18 +02:00
2016-04-09 01:35:18 +02:00
2016-04-09 01:35:18 +02:00
2017-01-19 20:18:06 +01:00
2016-06-09 00:58:05 +02:00
2016-04-27 22:42:34 +02:00
2016-04-09 01:35:18 +02:00
2016-04-25 16:07:02 +02:00
2016-04-09 01:35:18 +02:00
2016-06-09 00:58:06 +02:00
2016-04-09 01:35:18 +02:00
2016-04-09 01:35:18 +02:00
2016-08-01 18:36:01 -04:00
2016-08-23 10:25:17 +01:00
2016-04-09 01:35:18 +02:00
2016-08-18 03:42:32 +02:00
2016-04-09 01:35:18 +02:00
2016-04-09 01:35:18 +02:00
2016-04-09 01:35:18 +02:00
2016-04-09 01:35:18 +02:00
2016-09-26 15:11:42 +02:00
2016-04-09 01:12:09 +02:00
2016-05-05 01:40:04 +02:00