vserver 1.9.3
[linux-2.6.git] / arch / i386 / kernel / cpu / cpufreq / powernow-k7.c
1 /*
2  *  AMD K7 Powernow driver.
3  *  (C) 2003 Dave Jones <davej@codemonkey.org.uk> on behalf of SuSE Labs.
4  *  (C) 2003-2004 Dave Jones <davej@redhat.com>
5  *
6  *  Licensed under the terms of the GNU GPL License version 2.
7  *  Based upon datasheets & sample CPUs kindly provided by AMD.
8  *
9  * Errata 5: Processor may fail to execute a FID/VID change in presence of interrupt.
10  * - We cli/sti on stepping A0 CPUs around the FID/VID transition.
11  * Errata 15: Processors with half frequency multipliers may hang upon wakeup from disconnect.
12  * - We disable half multipliers if ACPI is used on A0 stepping CPUs.
13  */
14
15 #include <linux/config.h>
16 #include <linux/kernel.h>
17 #include <linux/module.h>
18 #include <linux/moduleparam.h>
19 #include <linux/init.h>
20 #include <linux/cpufreq.h>
21 #include <linux/slab.h>
22 #include <linux/string.h>
23 #include <linux/dmi.h>
24
25 #include <asm/msr.h>
26 #include <asm/timex.h>
27 #include <asm/io.h>
28 #include <asm/system.h>
29
30 #ifdef CONFIG_X86_POWERNOW_K7_ACPI
31 #include <linux/acpi.h>
32 #include <acpi/processor.h>
33 #endif
34
35 #include "powernow-k7.h"
36
37 #define PFX "powernow: "
38
39
40 struct psb_s {
41         u8 signature[10];
42         u8 tableversion;
43         u8 flags;
44         u16 settlingtime;
45         u8 reserved1;
46         u8 numpst;
47 };
48
49 struct pst_s {
50         u32 cpuid;
51         u8 fsbspeed;
52         u8 maxfid;
53         u8 startvid;
54         u8 numpstates;
55 };
56
57 #ifdef CONFIG_X86_POWERNOW_K7_ACPI
58 union powernow_acpi_control_t {
59         struct {
60                 unsigned long fid:5,
61                 vid:5,
62                 sgtc:20,
63                 res1:2;
64         } bits;
65         unsigned long val;
66 };
67 #endif
68
69 /* divide by 1000 to get VID. */
70 static int mobile_vid_table[32] = {
71     2000, 1950, 1900, 1850, 1800, 1750, 1700, 1650,
72     1600, 1550, 1500, 1450, 1400, 1350, 1300, 0,
73     1275, 1250, 1225, 1200, 1175, 1150, 1125, 1100,
74     1075, 1050, 1024, 1000, 975, 950, 925, 0,
75 };
76
77 /* divide by 10 to get FID. */
78 static int fid_codes[32] = {
79     110, 115, 120, 125, 50, 55, 60, 65,
80     70, 75, 80, 85, 90, 95, 100, 105,
81     30, 190, 40, 200, 130, 135, 140, 210,
82     150, 225, 160, 165, 170, 180, -1, -1,
83 };
84
85 /* This parameter is used in order to force ACPI instead of legacy method for
86  * configuration purpose.
87  */
88
89 static int acpi_force;
90 static int debug;
91
92 static struct cpufreq_frequency_table *powernow_table;
93
94 static unsigned int can_scale_bus;
95 static unsigned int can_scale_vid;
96 static unsigned int minimum_speed=-1;
97 static unsigned int maximum_speed;
98 static unsigned int number_scales;
99 static unsigned int fsb;
100 static unsigned int latency;
101 static char have_a0;
102
103 static void dprintk(const char *fmt, ...)
104 {
105         char s[256];
106         va_list args;
107
108         if (debug==0)
109                 return;
110
111         va_start(args,fmt);
112         vsprintf(s, fmt, args);
113         printk(s);
114         va_end(args);
115 }
116
117
118 static int check_fsb(unsigned int fsbspeed)
119 {
120         int delta;
121         unsigned int f = fsb / 1000;
122
123         delta = (fsbspeed > f) ? fsbspeed - f : f - fsbspeed;
124         return (delta < 5);
125 }
126
127 static int check_powernow(void)
128 {
129         struct cpuinfo_x86 *c = cpu_data;
130         unsigned int maxei, eax, ebx, ecx, edx;
131
132         if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 !=6)) {
133 #ifdef MODULE
134                 printk (KERN_INFO PFX "This module only works with AMD K7 CPUs\n");
135 #endif
136                 return 0;
137         }
138
139         /* Get maximum capabilities */
140         maxei = cpuid_eax (0x80000000);
141         if (maxei < 0x80000007) {       /* Any powernow info ? */
142 #ifdef MODULE
143                 printk (KERN_INFO PFX "No powernow capabilities detected\n");
144 #endif
145                 return 0;
146         }
147
148         if ((c->x86_model == 6) && (c->x86_mask == 0)) {
149                 printk (KERN_INFO PFX "K7 660[A0] core detected, enabling errata workarounds\n");
150                 have_a0 = 1;
151         }
152
153         cpuid(0x80000007, &eax, &ebx, &ecx, &edx);
154
155         /* Check we can actually do something before we say anything.*/
156         if (!(edx & (1 << 1 | 1 << 2)))
157                 return 0;
158
159         printk (KERN_INFO PFX "PowerNOW! Technology present. Can scale: ");
160
161         if (edx & 1 << 1) {
162                 printk ("frequency");
163                 can_scale_bus=1;
164         }
165
166         if ((edx & (1 << 1 | 1 << 2)) == 0x6)
167                 printk (" and ");
168
169         if (edx & 1 << 2) {
170                 printk ("voltage");
171                 can_scale_vid=1;
172         }
173
174         printk (".\n");
175         return 1;
176 }
177
178
179 static int get_ranges (unsigned char *pst)
180 {
181         unsigned int j;
182         unsigned int speed;
183         u8 fid, vid;
184
185         powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) * (number_scales + 1)), GFP_KERNEL);
186         if (!powernow_table)
187                 return -ENOMEM;
188         memset(powernow_table, 0, (sizeof(struct cpufreq_frequency_table) * (number_scales + 1)));
189
190         for (j=0 ; j < number_scales; j++) {
191                 fid = *pst++;
192
193                 powernow_table[j].frequency = (fsb * fid_codes[fid]) / 10;
194                 powernow_table[j].index = fid; /* lower 8 bits */
195
196                 speed = powernow_table[j].frequency;
197
198                 if ((fid_codes[fid] % 10)==5) {
199 #ifdef CONFIG_X86_POWERNOW_K7_ACPI
200                         if (have_a0 == 1)
201                                 powernow_table[j].frequency = CPUFREQ_ENTRY_INVALID;
202 #endif
203                 }
204
205                 dprintk (KERN_INFO PFX "   FID: 0x%x (%d.%dx [%dMHz])  ", fid,
206                         fid_codes[fid] / 10, fid_codes[fid] % 10, speed/1000);
207
208                 if (speed < minimum_speed)
209                         minimum_speed = speed;
210                 if (speed > maximum_speed)
211                         maximum_speed = speed;
212
213                 vid = *pst++;
214                 powernow_table[j].index |= (vid << 8); /* upper 8 bits */
215                 dprintk ("VID: 0x%x (%d.%03dV)\n", vid, mobile_vid_table[vid]/1000,
216                         mobile_vid_table[vid]%1000);
217         }
218         powernow_table[number_scales].frequency = CPUFREQ_TABLE_END;
219         powernow_table[number_scales].index = 0;
220
221         return 0;
222 }
223
224
225 static void change_FID(int fid)
226 {
227         union msr_fidvidctl fidvidctl;
228
229         rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
230         if (fidvidctl.bits.FID != fid) {
231                 fidvidctl.bits.SGTC = latency;
232                 fidvidctl.bits.FID = fid;
233                 fidvidctl.bits.VIDC = 0;
234                 fidvidctl.bits.FIDC = 1;
235                 wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
236         }
237 }
238
239
240 static void change_VID(int vid)
241 {
242         union msr_fidvidctl fidvidctl;
243
244         rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
245         if (fidvidctl.bits.VID != vid) {
246                 fidvidctl.bits.SGTC = latency;
247                 fidvidctl.bits.VID = vid;
248                 fidvidctl.bits.FIDC = 0;
249                 fidvidctl.bits.VIDC = 1;
250                 wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
251         }
252 }
253
254
255 static void change_speed (unsigned int index)
256 {
257         u8 fid, vid;
258         struct cpufreq_freqs freqs;
259         union msr_fidvidstatus fidvidstatus;
260         int cfid;
261
262         /* fid are the lower 8 bits of the index we stored into
263          * the cpufreq frequency table in powernow_decode_bios,
264          * vid are the upper 8 bits.
265          */
266
267         fid = powernow_table[index].index & 0xFF;
268         vid = (powernow_table[index].index & 0xFF00) >> 8;
269
270         freqs.cpu = 0;
271
272         rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
273         cfid = fidvidstatus.bits.CFID;
274         freqs.old = fsb * fid_codes[cfid] / 10;
275
276         freqs.new = powernow_table[index].frequency;
277
278         cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
279
280         /* Now do the magic poking into the MSRs.  */
281
282         if (have_a0 == 1)       /* A0 errata 5 */
283                 local_irq_disable();
284
285         if (freqs.old > freqs.new) {
286                 /* Going down, so change FID first */
287                 change_FID(fid);
288                 change_VID(vid);
289         } else {
290                 /* Going up, so change VID first */
291                 change_VID(vid);
292                 change_FID(fid);
293         }
294
295
296         if (have_a0 == 1)
297                 local_irq_enable();
298
299         cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
300 }
301
302
303 #ifdef CONFIG_X86_POWERNOW_K7_ACPI
304
305 struct acpi_processor_performance *acpi_processor_perf;
306
307 static int powernow_acpi_init(void)
308 {
309         int i;
310         int retval = 0;
311         union powernow_acpi_control_t pc;
312
313         if (acpi_processor_perf != NULL && powernow_table != NULL) {
314                 retval = -EINVAL;
315                 goto err0;
316         }
317
318         acpi_processor_perf = kmalloc(sizeof(struct acpi_processor_performance),
319                                       GFP_KERNEL);
320
321         if (!acpi_processor_perf) {
322                 retval = -ENOMEM;
323                 goto err0;
324         }
325
326         memset(acpi_processor_perf, 0, sizeof(struct acpi_processor_performance));
327
328         if (acpi_processor_register_performance(acpi_processor_perf, 0)) {
329                 retval = -EIO;
330                 goto err1;
331         }
332
333         if (acpi_processor_perf->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) {
334                 retval = -ENODEV;
335                 goto err2;
336         }
337
338         if (acpi_processor_perf->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) {
339                 retval = -ENODEV;
340                 goto err2;
341         }
342
343         number_scales = acpi_processor_perf->state_count;
344
345         if (number_scales < 2) {
346                 retval = -ENODEV;
347                 goto err2;
348         }
349
350         powernow_table = kmalloc((number_scales + 1) * (sizeof(struct cpufreq_frequency_table)), GFP_KERNEL);
351         if (!powernow_table) {
352                 retval = -ENOMEM;
353                 goto err2;
354         }
355
356         memset(powernow_table, 0, ((number_scales + 1) * sizeof(struct cpufreq_frequency_table)));
357
358         pc.val = (unsigned long) acpi_processor_perf->states[0].control;
359         for (i = 0; i < number_scales; i++) {
360                 u8 fid, vid;
361                 unsigned int speed;
362
363                 pc.val = (unsigned long) acpi_processor_perf->states[i].control;
364                 dprintk (KERN_INFO PFX "acpi:  P%d: %d MHz %d mW %d uS control %08x SGTC %d\n",
365                          i,
366                          (u32) acpi_processor_perf->states[i].core_frequency,
367                          (u32) acpi_processor_perf->states[i].power,
368                          (u32) acpi_processor_perf->states[i].transition_latency,
369                          (u32) acpi_processor_perf->states[i].control,
370                          pc.bits.sgtc);
371
372                 vid = pc.bits.vid;
373                 fid = pc.bits.fid;
374
375                 powernow_table[i].frequency = fsb * fid_codes[fid] / 10;
376                 powernow_table[i].index = fid; /* lower 8 bits */
377                 powernow_table[i].index |= (vid << 8); /* upper 8 bits */
378
379                 speed = powernow_table[i].frequency;
380
381                 if ((fid_codes[fid] % 10)==5) {
382                         if (have_a0 == 1)
383                                 powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
384                 }
385
386                 dprintk (KERN_INFO PFX "   FID: 0x%x (%d.%dx [%dMHz])  ", fid,
387                         fid_codes[fid] / 10, fid_codes[fid] % 10, speed/1000);
388                 dprintk ("VID: 0x%x (%d.%03dV)\n", vid, mobile_vid_table[vid]/1000,
389                         mobile_vid_table[vid]%1000);
390
391                 if (latency < pc.bits.sgtc)
392                         latency = pc.bits.sgtc;
393
394                 if (speed < minimum_speed)
395                         minimum_speed = speed;
396                 if (speed > maximum_speed)
397                         maximum_speed = speed;
398         }
399
400         powernow_table[i].frequency = CPUFREQ_TABLE_END;
401         powernow_table[i].index = 0;
402
403         return 0;
404
405 err2:
406         acpi_processor_unregister_performance(acpi_processor_perf, 0);
407 err1:
408         kfree(acpi_processor_perf);
409 err0:
410         printk(KERN_WARNING PFX "ACPI perflib can not be used in this platform\n");
411         acpi_processor_perf = NULL;
412         return retval;
413 }
414 #else
415 static int powernow_acpi_init(void)
416 {
417         printk(KERN_INFO PFX "no support for ACPI processor found."
418                "  Please recompile your kernel with ACPI processor\n");
419         return -EINVAL;
420 }
421 #endif
422
423 static int powernow_decode_bios (int maxfid, int startvid)
424 {
425         struct psb_s *psb;
426         struct pst_s *pst;
427         unsigned int i, j;
428         unsigned char *p;
429         unsigned int etuple;
430         unsigned int ret;
431
432         etuple = cpuid_eax(0x80000001);
433
434         for (i=0xC0000; i < 0xffff0 ; i+=16) {
435
436                 p = phys_to_virt(i);
437
438                 if (memcmp(p, "AMDK7PNOW!",  10) == 0){
439                         dprintk (KERN_INFO PFX "Found PSB header at %p\n", p);
440                         psb = (struct psb_s *) p;
441                         dprintk (KERN_INFO PFX "Table version: 0x%x\n", psb->tableversion);
442                         if (psb->tableversion != 0x12) {
443                                 printk (KERN_INFO PFX "Sorry, only v1.2 tables supported right now\n");
444                                 return -ENODEV;
445                         }
446
447                         dprintk (KERN_INFO PFX "Flags: 0x%x (", psb->flags);
448                         if ((psb->flags & 1)==0) {
449                                 dprintk ("Mobile");
450                         } else {
451                                 dprintk ("Desktop");
452                         }
453                         dprintk (" voltage regulator)\n");
454
455                         latency = psb->settlingtime;
456                         if (latency < 100) {
457                                 printk (KERN_INFO PFX "BIOS set settling time to %d microseconds."
458                                                 "Should be at least 100. Correcting.\n", latency);
459                                 latency = 100;
460                         }
461                         dprintk (KERN_INFO PFX "Settling Time: %d microseconds.\n", psb->settlingtime);
462                         dprintk (KERN_INFO PFX "Has %d PST tables. (Only dumping ones relevant to this CPU).\n", psb->numpst);
463
464                         p += sizeof (struct psb_s);
465
466                         pst = (struct pst_s *) p;
467
468                         for (i = 0 ; i <psb->numpst; i++) {
469                                 pst = (struct pst_s *) p;
470                                 number_scales = pst->numpstates;
471
472                                 if ((etuple == pst->cpuid) && check_fsb(pst->fsbspeed) &&
473                                     (maxfid==pst->maxfid) && (startvid==pst->startvid))
474                                 {
475                                         dprintk (KERN_INFO PFX "PST:%d (@%p)\n", i, pst);
476                                         dprintk (KERN_INFO PFX " cpuid: 0x%x  ", pst->cpuid);
477                                         dprintk ("fsb: %d  ", pst->fsbspeed);
478                                         dprintk ("maxFID: 0x%x  ", pst->maxfid);
479                                         dprintk ("startvid: 0x%x\n", pst->startvid);
480
481                                         ret = get_ranges ((char *) pst + sizeof (struct pst_s));
482                                         return ret;
483
484                                 } else {
485                                         p = (char *) pst + sizeof (struct pst_s);
486                                         for (j=0 ; j < number_scales; j++)
487                                                 p+=2;
488                                 }
489                         }
490                         printk (KERN_INFO PFX "No PST tables match this cpuid (0x%x)\n", etuple);
491                         printk (KERN_INFO PFX "This is indicative of a broken BIOS.\n");
492
493                         return -EINVAL;
494                 }
495                 p++;
496         }
497
498         return -ENODEV;
499 }
500
501
502 static int powernow_target (struct cpufreq_policy *policy,
503                             unsigned int target_freq,
504                             unsigned int relation)
505 {
506         unsigned int newstate;
507
508         if (cpufreq_frequency_table_target(policy, powernow_table, target_freq, relation, &newstate))
509                 return -EINVAL;
510
511         change_speed(newstate);
512
513         return 0;
514 }
515
516
517 static int powernow_verify (struct cpufreq_policy *policy)
518 {
519         return cpufreq_frequency_table_verify(policy, powernow_table);
520 }
521
522 /*
523  * We use the fact that the bus frequency is somehow
524  * a multiple of 100000/3 khz, then we compute sgtc according
525  * to this multiple.
526  * That way, we match more how AMD thinks all of that work.
527  * We will then get the same kind of behaviour already tested under
528  * the "well-known" other OS.
529  */
530 static int __init fixup_sgtc(void)
531 {
532         unsigned int sgtc;
533         unsigned int m;
534
535         m = fsb / 3333;
536         if ((m % 10) >= 5)
537                 m += 5;
538
539         m /= 10;
540
541         sgtc = 100 * m * latency;
542         sgtc = sgtc / 3;
543         if (sgtc > 0xfffff) {
544                 printk(KERN_WARNING PFX "SGTC too large %d\n", sgtc);
545                 sgtc = 0xfffff;
546         }
547         return sgtc;
548 }
549
550 static unsigned int powernow_get(unsigned int cpu)
551 {
552         union msr_fidvidstatus fidvidstatus;
553         unsigned int cfid;
554
555         if (cpu)
556                 return 0;
557         rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
558         cfid = fidvidstatus.bits.CFID;
559
560         return (fsb * fid_codes[cfid] / 10);
561 }
562
563
564 static int __init acer_cpufreq_pst(struct dmi_system_id *d)
565 {
566         printk(KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n", d->ident);
567         printk(KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
568         printk(KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n");
569         return 0;
570 }
571
572 /*
573  * Some Athlon laptops have really fucked PST tables.
574  * A BIOS update is all that can save them.
575  * Mention this, and disable cpufreq.
576  */
577 static struct dmi_system_id __initdata powernow_dmi_table[] = {
578         {
579                 .callback = acer_cpufreq_pst,
580                 .ident = "Acer Aspire",
581                 .matches = {
582                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde Software"),
583                         DMI_MATCH(DMI_BIOS_VERSION, "3A71"),
584                 },
585         },
586         { }
587 };
588
589 static int __init powernow_cpu_init (struct cpufreq_policy *policy)
590 {
591         union msr_fidvidstatus fidvidstatus;
592         int result;
593
594         if (policy->cpu != 0)
595                 return -ENODEV;
596
597         rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val);
598
599         /* A K7 with powernow technology is set to max frequency by BIOS */
600         fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.MFID];
601         if (!fsb) {
602                 printk(KERN_WARNING PFX "can not determine bus frequency\n");
603                 return -EINVAL;
604         }
605         dprintk(KERN_INFO PFX "FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000);
606
607         if (dmi_check_system(powernow_dmi_table) || acpi_force) {
608                 printk (KERN_INFO PFX "PSB/PST known to be broken.  Trying ACPI instead\n");
609                 result = powernow_acpi_init();
610         } else {
611                 result = powernow_decode_bios(fidvidstatus.bits.MFID, fidvidstatus.bits.SVID);
612                 if (result) {
613                         printk (KERN_INFO PFX "Trying ACPI perflib\n");
614                         maximum_speed = 0;
615                         minimum_speed = -1;
616                         latency = 0;
617                         result = powernow_acpi_init();
618                         if (result) {
619                                 printk (KERN_INFO PFX "ACPI and legacy methods failed\n");
620                                 printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.shtml\n");
621                         }
622                 } else {
623                         /* SGTC use the bus clock as timer */
624                         latency = fixup_sgtc();
625                         printk(KERN_INFO PFX "SGTC: %d\n", latency);
626                 }
627         }
628
629         if (result)
630                 return result;
631
632         printk (KERN_INFO PFX "Minimum speed %d MHz. Maximum speed %d MHz.\n",
633                                 minimum_speed/1000, maximum_speed/1000);
634
635         policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
636
637         policy->cpuinfo.transition_latency = cpufreq_scale(2000000UL, fsb, latency);
638
639         policy->cur = powernow_get(0);
640
641         cpufreq_frequency_table_get_attr(powernow_table, policy->cpu);
642
643         return cpufreq_frequency_table_cpuinfo(policy, powernow_table);
644 }
645
646 static int powernow_cpu_exit (struct cpufreq_policy *policy) {
647         cpufreq_frequency_table_put_attr(policy->cpu);
648         return 0;
649 }
650
651 static struct freq_attr* powernow_table_attr[] = {
652         &cpufreq_freq_attr_scaling_available_freqs,
653         NULL,
654 };
655
656 static struct cpufreq_driver powernow_driver = {
657         .verify = powernow_verify,
658         .target = powernow_target,
659         .get    = powernow_get,
660         .init   = powernow_cpu_init,
661         .exit   = powernow_cpu_exit,
662         .name   = "powernow-k7",
663         .owner  = THIS_MODULE,
664         .attr   = powernow_table_attr,
665 };
666
667 static int __init powernow_init (void)
668 {
669         if (check_powernow()==0)
670                 return -ENODEV;
671         return cpufreq_register_driver(&powernow_driver);
672 }
673
674
675 static void __exit powernow_exit (void)
676 {
677 #ifdef CONFIG_X86_POWERNOW_K7_ACPI
678         if (acpi_processor_perf) {
679                 acpi_processor_unregister_performance(acpi_processor_perf, 0);
680                 kfree(acpi_processor_perf);
681         }
682 #endif
683         cpufreq_unregister_driver(&powernow_driver);
684         if (powernow_table)
685                 kfree(powernow_table);
686 }
687
688 module_param(debug, int, 0444);
689 MODULE_PARM_DESC(debug, "enable debug output.");
690 module_param(acpi_force,  int, 0444);
691 MODULE_PARM_DESC(acpi_force, "Force ACPI to be used.");
692
693 MODULE_AUTHOR ("Dave Jones <davej@codemonkey.org.uk>");
694 MODULE_DESCRIPTION ("Powernow driver for AMD K7 processors.");
695 MODULE_LICENSE ("GPL");
696
697 late_initcall(powernow_init);
698 module_exit(powernow_exit);
699