|
|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I got an oops on a dual core system because the lost tick handler
called cpufreq_get() on core 1 and powernow tried to follow
a NULL powernow_data[] pointer there.
Initialize powernow_data for all cores of a CPU.
Cc: jacob.shin@xxxxxxx
Cc: davej@xxxxxxxxxx
Signed-off-by: Andi Kleen <ak@xxxxxxx>
---
arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -54,7 +54,7 @@ static DECLARE_MUTEX(fidvid_sem);
static struct powernow_k8_data *powernow_data[NR_CPUS];
#ifndef CONFIG_SMP
-static cpumask_t cpu_core_map[1];
+static cpumask_t cpu_core_map[1] = { CPU_MASK_ALL };
#endif
/* Return a frequency in MHz, given an input fid */
@@ -977,7 +977,7 @@ static int __cpuinit powernowk8_cpu_init
{
struct powernow_k8_data *data;
cpumask_t oldmask = CPU_MASK_ALL;
- int rc;
+ int rc, i;
if (!cpu_online(pol->cpu))
return -ENODEV;
@@ -1063,7 +1063,8 @@ static int __cpuinit powernowk8_cpu_init
printk("cpu_init done, current fid 0x%x, vid 0x%x\n",
data->currfid, data->currvid);
- powernow_data[pol->cpu] = data;
+ for_each_cpu_mask(i, cpu_core_map[pol->cpu])
+ powernow_data[i] = data;
return 0;
-
: send the line "unsubscribe linux-x86_64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux MIPS Home] [Kernel] [Linux ia64] [DCCP] [Linux ARM list] [Linux] [Photo] [Yosemite News] [MIPS Architecture] [Linux SCSI] [Linux Hams] [Site Home]
![]() |