powernow-k8: don't crash system at boot

From: Pavel Machek
Date: Sun Oct 05 2003 - 14:03:38 EST


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?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/