* [PATCH] Longhaul - Protect user from himself
@ 2006-07-03 5:39 Rafał Bilski
2006-07-06 19:50 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Rafał Bilski @ 2006-07-03 5:39 UTC (permalink / raw)
To: Dave Jones; +Cc: cpufreq
This patch depens on "Longhaul - Use hardware support".
Older CPU's require transition time >=1ms.
Print message for C7 user (this is based on real story).
Signed-off-by: Rafa³ Bilski <rafalbilski@interia.pl>
---
--- linux-2.6.17-git20/arch/i386/kernel/cpu/cpufreq/longhaul.c.orig 2006-07-03 06:43:54.000000000 +0200
+++ linux-2.6.17-git20/arch/i386/kernel/cpu/cpufreq/longhaul.c 2006-07-03 07:33:38.000000000 +0200
@@ -633,6 +633,13 @@ static int __init longhaul_cpu_init(stru
break;
};
+#if (CONFIG_HZ > 250)
+ if (longhaul_version != TYPE_POWERSAVER) {
+ printk (KERN_INFO PFX "Timer frequency to high. Aborting\n");
+ return -EINVAL;
+ }
+#endif
+
ret = longhaul_get_ranges();
if (ret != 0)
return ret;
@@ -691,8 +698,9 @@ static int __init longhaul_init(void)
switch (c->x86_model) {
case 6 ... 9:
return cpufreq_register_driver(&longhaul_driver);
- default:
- printk (KERN_INFO PFX "Unknown VIA CPU. Contact davej@codemonkey.org.uk\n");
+ }
+ if (c->x86_model > 9) {
+ printk(KERN_INFO PFX "VIA C7 (or better) CPU. Use \"ACPI Processor P-States driver\".\n");
}
return -ENODEV;
------------------------------------------------------------------------
Zobacz, gdzie mieszka Twoja dziewczyna!
http://map24.interia.pl
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Longhaul - Protect user from himself
2006-07-03 5:39 [PATCH] Longhaul - Protect user from himself Rafał Bilski
@ 2006-07-06 19:50 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2006-07-06 19:50 UTC (permalink / raw)
To: Rafał Bilski; +Cc: cpufreq
On Mon, Jul 03, 2006 at 07:39:08AM +0200, Rafał Bilski wrote:
> This patch depens on "Longhaul - Use hardware support".
>
> Older CPU's require transition time >=1ms.
> Print message for C7 user (this is based on real story).
>
> Signed-off-by: Rafał Bilski <rafalbilski@interia.pl>
>
> ---
>
> --- linux-2.6.17-git20/arch/i386/kernel/cpu/cpufreq/longhaul.c.orig 2006-07-03 06:43:54.000000000 +0200
> +++ linux-2.6.17-git20/arch/i386/kernel/cpu/cpufreq/longhaul.c 2006-07-03 07:33:38.000000000 +0200
> @@ -633,6 +633,13 @@ static int __init longhaul_cpu_init(stru
> break;
> };
>
> +#if (CONFIG_HZ > 250)
> + if (longhaul_version != TYPE_POWERSAVER) {
> + printk (KERN_INFO PFX "Timer frequency to high. Aborting\n");
> + return -EINVAL;
> + }
> +#endif
This seems wrong. We should adjust the timings based on HZ to sleep
for less/more instead.
> @@ -691,8 +698,9 @@ static int __init longhaul_init(void)
> switch (c->x86_model) {
> case 6 ... 9:
> return cpufreq_register_driver(&longhaul_driver);
> - default:
> - printk (KERN_INFO PFX "Unknown VIA CPU. Contact davej@codemonkey.org.uk\n");
> + }
> + if (c->x86_model > 9) {
> + printk(KERN_INFO PFX "VIA C7 (or better) CPU. Use \"ACPI Processor P-States driver\".\n");
It can also use speedstep-centrino with some additional patches which I
need to dust off.
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-06 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-03 5:39 [PATCH] Longhaul - Protect user from himself Rafał Bilski
2006-07-06 19:50 ` Dave Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.