/[linux-patches]/genpatches-2.6/tags/2.6.12-12/1305_k8-powernow-oops.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.12-12/1305_k8-powernow-oops.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137 - (show annotations) (download)
Tue Aug 9 21:23:12 2005 UTC (12 years, 11 months ago) by dsd
File size: 1799 byte(s)
2.6.12-12 release
1 From: Dave Jones <davej@redhat.com>
2 Date: Thu, 28 Jul 2005 16:38:21 +0000 (-0700)
3 Subject: powernow-k8 requires that a data structure for
4 X-Git-Tag: v2.6.13-rc4
5 X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=03938c3f1062b0f279a0ef937a471d4db83702ed
6
7 powernow-k8 requires that a data structure for
8 each core be created in the _cpu_init function
9 call. The cpufreq infrastructure doesn't call
10 _cpu_init for the second core in each processor.
11 Some systems crashed when _get was called with
12 an odd-numbered core because it tried to
13 dereference a NULL pointer since the data
14 structure had not been created.
15
16 The attached patch solves the problem by
17 initializing data structures for all shared
18 cores in the _cpu_init function. It should
19 apply to 2.6.12-rc6 and has been tested by
20 AMD and Sun.
21
22 Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
23 Signed-off-by: Dave Jones <davej@redhat.com>
24 ---
25
26 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
27 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
28 @@ -44,7 +44,7 @@
29
30 #define PFX "powernow-k8: "
31 #define BFX PFX "BIOS error: "
32 -#define VERSION "version 1.40.2"
33 +#define VERSION "version 1.40.4"
34 #include "powernow-k8.h"
35
36 /* serialize freq changes */
37 @@ -978,7 +978,7 @@ static int __init powernowk8_cpu_init(st
38 {
39 struct powernow_k8_data *data;
40 cpumask_t oldmask = CPU_MASK_ALL;
41 - int rc;
42 + int rc, i;
43
44 if (!check_supported_cpu(pol->cpu))
45 return -ENODEV;
46 @@ -1064,7 +1064,9 @@ static int __init powernowk8_cpu_init(st
47 printk("cpu_init done, current fid 0x%x, vid 0x%x\n",
48 data->currfid, data->currvid);
49
50 - powernow_data[pol->cpu] = data;
51 + for_each_cpu_mask(i, cpu_core_map[pol->cpu]) {
52 + powernow_data[i] = data;
53 + }
54
55 return 0;
56

  ViewVC Help
Powered by ViewVC 1.1.20