/[packages]/cauldron/kernel-rt/current/SOURCES/cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch
ViewVC logotype

Contents of /cauldron/kernel-rt/current/SOURCES/cpufreq-powernow-k8-remove-usage-of-smp_processor_id-in-preemptible-code.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 312035 - (show annotations) (download)
Thu Nov 1 11:06:13 2012 UTC (8 years, 10 months ago) by tmb
File size: 2492 byte(s)
revert cpufreq/powenow-k8 fix that is also in -rt patch
1 From e4df1cbcc1f329e53a1fff7450b2229e0addff20 Mon Sep 17 00:00:00 2001
2 From: Andreas Herrmann <andreas.herrmann3@amd.com>
3 Date: Tue, 23 Oct 2012 00:55:10 +0200
4 Subject: cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code
5
6 From: Andreas Herrmann <andreas.herrmann3@amd.com>
7
8 commit e4df1cbcc1f329e53a1fff7450b2229e0addff20 upstream.
9
10 Commit 6889125b8b4e09c5e53e6ecab3433bed1ce198c9
11 (cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU)
12 causes powernow-k8 to trigger a preempt warning, e.g.:
13
14 BUG: using smp_processor_id() in preemptible [00000000] code: cpufreq/3776
15 caller is powernowk8_target+0x20/0x49
16 Pid: 3776, comm: cpufreq Not tainted 3.6.0 #9
17 Call Trace:
18 [<ffffffff8125b447>] debug_smp_processor_id+0xc7/0xe0
19 [<ffffffff814877e7>] powernowk8_target+0x20/0x49
20 [<ffffffff81482b02>] __cpufreq_driver_target+0x82/0x8a
21 [<ffffffff81484fc6>] cpufreq_governor_performance+0x4e/0x54
22 [<ffffffff81482c50>] __cpufreq_governor+0x8c/0xc9
23 [<ffffffff81482e6f>] __cpufreq_set_policy+0x1a9/0x21e
24 [<ffffffff814839af>] store_scaling_governor+0x16f/0x19b
25 [<ffffffff81484f16>] ? cpufreq_update_policy+0x124/0x124
26 [<ffffffff8162b4a5>] ? _raw_spin_unlock_irqrestore+0x2c/0x49
27 [<ffffffff81483640>] store+0x60/0x88
28 [<ffffffff811708c0>] sysfs_write_file+0xf4/0x130
29 [<ffffffff8111243b>] vfs_write+0xb5/0x151
30 [<ffffffff811126e0>] sys_write+0x4a/0x71
31 [<ffffffff816319a9>] system_call_fastpath+0x16/0x1b
32
33 Fix this by by always using work_on_cpu().
34
35 Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
36 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
37 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38
39 ---
40 drivers/cpufreq/powernow-k8.c | 9 +--------
41 1 file changed, 1 insertion(+), 8 deletions(-)
42
43 --- a/drivers/cpufreq/powernow-k8.c
44 +++ b/drivers/cpufreq/powernow-k8.c
45 @@ -1223,14 +1223,7 @@ static int powernowk8_target(struct cpuf
46 struct powernowk8_target_arg pta = { .pol = pol, .targfreq = targfreq,
47 .relation = relation };
48
49 - /*
50 - * Must run on @pol->cpu. cpufreq core is responsible for ensuring
51 - * that we're bound to the current CPU and pol->cpu stays online.
52 - */
53 - if (smp_processor_id() == pol->cpu)
54 - return powernowk8_target_fn(&pta);
55 - else
56 - return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
57 + return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
58 }
59
60 /* Driver entry point to verify the policy and range of frequencies */

  ViewVC Help
Powered by ViewVC 1.1.28