Skip to contentSkip to conversation

2.4.21-pre3-ac1/2 and CONFIG_CPU_FREQ failure [rescued]

PATCH Dominik Brodowski 1 participant 1 message Jan 10, 2003 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

notifier code to the version which got into 2.5.55.

Dominik

Quoted 9 lines · Richard A Nelson

If CONFIG_CPU_FREQ is set, and CONFIG_SMP isn't, ./arch/i386/kernel/time.c will fail to compile at line 946:

#if defined(CONFIG_CPU_FREQ) && !defined(CONFIG_SMP)
cpufreq_register_notifier(&time_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
#endif

There is no definition of time_cpufreq_notifier_block

arch/i386/kernel/elanfreq.c +0 -2
diff -ruN linux-original/arch/i386/kernel/elanfreq.c linux/arch/i386/kernel/elanfreq.c
@@ -31,8 +31,6 @@
 #define REG_CSCIR 0x22 		/* Chip Setup and Control Index Register    */
 #define REG_CSCDR 0x23		/* Chip Setup and Control Data  Register    */
 
-#define SAFE_FREQ 33000		/* every Elan CPU can run at 33 MHz         */
-
 static struct cpufreq_driver *elanfreq_driver;
 
 /* Module parameter */
arch/i386/kernel/longhaul.c +1 -1
diff -ruN linux-original/arch/i386/kernel/longhaul.c linux/arch/i386/kernel/longhaul.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: longhaul.c,v 1.77 2002/10/31 21:17:40 db Exp $
+ *  $Id: longhaul.c,v 1.83 2003/01/02 22:16:26 db Exp $
  *
  *  (C) 2001  Dave Jones. <[email protected]>
  *  (C) 2002  Padraig Brady. <[email protected]>
arch/i386/kernel/longrun.c +1 -1
diff -ruN linux-original/arch/i386/kernel/longrun.c linux/arch/i386/kernel/longrun.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: longrun.c,v 1.14 2002/10/31 21:17:40 db Exp $
+ *  $Id: longrun.c,v 1.18 2003/01/02 22:16:26 db Exp $
  *
  * (C) 2002  Dominik Brodowski <[email protected]>
  *
arch/i386/kernel/p4-clockmod.c +12 -5
diff -ruN linux-original/arch/i386/kernel/p4-clockmod.c linux/arch/i386/kernel/p4-clockmod.c
@@ -213,7 +213,7 @@
 }
 
 
-int __init cpufreq_p4_init(void)
+static int __init cpufreq_p4_init(void)
 {	
 	struct cpuinfo_x86 *c = cpu_data;
 	int cpuid;
@@ -245,6 +245,16 @@
 	}
 
 	printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n");
+
+	if (!stock_freq) {
+		if (cpu_khz)
+			stock_freq = cpu_khz;
+		else {
+			printk(KERN_INFO PFX "unknown core frequency - please use module parameter 'stock_freq'\n");
+			return -EINVAL;
+		}
+	}
+
 	driver = kmalloc(sizeof(struct cpufreq_driver) +
 			 NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL);
 	if (!driver)
@@ -252,9 +262,6 @@
 
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
-	if (!stock_freq)
-		stock_freq = cpu_khz;
-
 #ifdef CONFIG_CPU_FREQ_24_API
 	for (i=0;i<NR_CPUS;i++) {
 		driver->cpu_cur_freq[i] = stock_freq;
@@ -290,7 +297,7 @@
 }
 
 
-void __exit cpufreq_p4_exit(void)
+static void __exit cpufreq_p4_exit(void)
 {
 	unsigned int i;
 
arch/i386/kernel/powernow-k6.c +1 -1
diff -ruN linux-original/arch/i386/kernel/powernow-k6.c linux/arch/i386/kernel/powernow-k6.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: powernow-k6.c,v 1.36 2002/10/31 21:17:40 db Exp $
+ *  $Id: powernow-k6.c,v 1.42 2003/01/02 22:41:08 db Exp $
  *  This file was part of Powertweak Linux (http://powertweak.sf.net)
  *  and is shared with the Linux Kernel module.
  *
arch/i386/kernel/setup.c +0 -41

59 lines not on this page · raw message

arch/i386/kernel/speedstep.c +2 -2
diff -ruN linux-original/arch/i386/kernel/speedstep.c linux/arch/i386/kernel/speedstep.c
@@ -1,5 +1,5 @@
 /*
- *  $Id: speedstep.c,v 1.58 2002/11/11 15:35:46 db Exp $
+ *  $Id: speedstep.c,v 1.64 2003/01/02 22:16:26 db Exp $
  *
  * (C) 2001  Dave Jones, Arjan van de ven.
  * (C) 2002  Dominik Brodowski <[email protected]>
@@ -659,7 +659,7 @@
 		return -ENODEV;
 	}
 
-	dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.58 $\n");
+	dprintk(KERN_INFO "cpufreq: Intel(R) SpeedStep(TM) support $Revision: 1.64 $\n");
 	dprintk(KERN_DEBUG "cpufreq: chipset 0x%x - processor 0x%x\n", 
 	       speedstep_chipset, speedstep_processor);
 
arch/i386/kernel/time.c +22 -22

81 lines not on this page · raw message

include/linux/cpufreq.h +1 -1
diff -ruN linux-original/include/linux/cpufreq.h linux/include/linux/cpufreq.h
@@ -5,7 +5,7 @@
  *            (C) 2002 Dominik Brodowski <[email protected]>
  *            
  *
- * $Id: cpufreq.h,v 1.29 2002/11/11 15:35:47 db Exp $
+ * $Id: cpufreq.h,v 1.32 2003/01/02 22:16:27 db Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
kernel/cpufreq.c +1 -1
diff -ruN linux-original/kernel/cpufreq.c linux/kernel/cpufreq.c
@@ -4,7 +4,7 @@
  *  Copyright (C) 2001 Russell King
  *            (C) 2002 Dominik Brodowski <[email protected]>
  *
- *  $Id: cpufreq.c,v 1.50 2002/11/11 15:35:48 db Exp $
+ *  $Id: cpufreq.c,v 1.55 2003/01/10 08:39:18 db Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/