public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* powernow-k8: don't crash system at boot
@ 2003-10-05 19:00 Pavel Machek
  2003-10-07 16:03 ` Dave Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2003-10-05 19:00 UTC (permalink / raw)
  To: paul.devriendt, davej, kernel list,
	Rusty trivial patch monkey Russell

Hi!

powernow-k8 module fails to initialize government on boot, leading to
nasty crash at boot.

This fixes it. Plus find_closest_find really wants to be static. Fix
it, too.
								Pavel

Index: arch/i386/kernel/cpu/cpufreq/powernow-k8.c
===================================================================
RCS file: /home/pavel/sf/bitbucket/bkcvs/linux-2.5/arch/i386/kernel/cpu/cpufreq/powernow-k8.c,v
retrieving revision 1.2
diff -u -u -r1.2 powernow-k8.c
--- arch/i386/kernel/cpu/cpufreq/powernow-k8.c	1 Oct 2003 17:33:23 -0000	1.2
+++ arch/i386/kernel/cpu/cpufreq/powernow-k8.c	5 Oct 2003 18:41:50 -0000
@@ -718,7 +718,7 @@
 
 /* Converts a frequency (that might not necessarily be a multiple of 200) */
 /* to a fid.                                                              */
-u32
+static u32
 find_closest_fid(u32 freq, int searchup)
 {
 	if (searchup == SEARCH_UP)
@@ -971,6 +971,7 @@
 	pol->cpuinfo.max_freq = 1000 * find_freq_from_fid(ppst[numps-1].fid);
 	pol->min = 1000 * find_freq_from_fid(ppst[0].fid);
 	pol->max = 1000 * find_freq_from_fid(ppst[batps - 1].fid);
+	pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
 
 	printk(KERN_INFO PFX "cpu_init done, current fid 0x%x, vid 0x%x\n",
 	       currfid, currvid);



-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-07 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-05 19:00 powernow-k8: don't crash system at boot Pavel Machek
2003-10-07 16:03 ` Dave Jones
2003-10-07 16:12   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox