Longhaul - Only for "Powersaver"
PATCH 1/1 Longhaul - Only for "Powersaver"
Looks like ACPI C3 don't work with older VIA CPUs. Motherboard is ACPI C3 capable, but after C3 frequency is same as before. So this patch below will make "longhaul" fail for older CPU's. There is nothing what I can do to fix this. Looks like CPU with BCR2 MSR is changing frequency only on halt. Processor with Longhaul MSR is changing frequency on halt or ACPI C3. Btw typo fixes.
Thanks to David for bug report.
---
arch/i386/kernel/cpu/cpufreq/longhaul.c +5 -3
@@ -550,7 +550,7 @@ static int __init longhaul_cpu_init(struif (pr ==NULL ) goto err_acpi; cx = &pr->power.states[ACPI_STATE_C3 ]; -if (cx ==NULL || cx->latency >1000 ) goto err_acpi; +if (cx->address ==0 || cx->latency >1000 ) goto err_acpi;/* Now check what we have on this motherboard */ switch (c->x86_model) {
@@ -627,7 +627,9 @@ static int __init longhaul_cpu_init(struswitch (longhaul_version) {case TYPE_LONGHAUL_V1 :case TYPE_LONGHAUL_V2 : -printk ("Longhaul v%d supported.\n" , longhaul_version); +// printk ("Longhaul v%d supported.\n", longhaul_version); + printk(KERN_ERR PFX "Processor don't support ACPI. Aborting.\n"); +return -ENODEV ;break ;case TYPE_POWERSAVER :printk ("Powersaver supported.\n" );
@@ -691,8 +693,8 @@ static int __init longhaul_init(void)#ifdef CONFIG_SMP if (num_online_cpus () >1 ) { -return -ENODEV ; printk(KERN_ERR PFX "More than 1 CPU detected, longhaul disabled.\n"); +return -ENODEV ; }#endif #ifdef CONFIG_X86_IO_APIC
--------------------------------------------------------------------
12 000 SMS-ow gratis! Promocja na http://link.interia.pl/f1971
Dave Jones
AppliedQuoted 7 lines · RafaÅ‚ Bilski
Looks like ACPI C3 don't work with older VIA CPUs. Motherboard is ACPI C3 capable, but after C3 frequency is same as before. So this patch below will make "longhaul" fail for older CPU's. There is nothing what I can do to fix this. Looks like CPU with BCR2 MSR is changing frequency only on halt. Processor with Longhaul MSR is changing frequency on halt or ACPI C3. Btw typo fixes.
Falling back to what we did in 2.6.17 for BCR2 systems may get some of those working at least. The whole notion of tying the longhaul driver closely to acpi makes me nervous, as a lot of those socket-370 boards have _dreadful_ ACPI BIOS implementations, and in a large number of cases, will lack the necessary functionality needed, as socket 370 Celerons were boring and had no fancy power saving features to run in C3.
I really need to find time to dig out some of those old test systems, but that won't happen now until after kernel summit/OLS/vacation.
arch/i386/kernel/cpu/cpufreq/longhaul.c static int __init longhaul_cpu_init(stru · line 631
Quoted 7 lines
arch/i386/kernel/cpu/cpufreq/longhaul.c +2
-1@@ -627,7 +627,9 @@ static int __init longhaul_cpu_init(struswitch (longhaul_version) {case TYPE_LONGHAUL_V1 :case TYPE_LONGHAUL_V2 : -printk ("Longhaul v%d supported.\n" , longhaul_version); +// printk ("Longhaul v%d supported.\n", longhaul_version); + printk(KERN_ERR PFX "Processor don't support ACPI. Aborting.\n");
It's really a BIOS failing. The CPU cares nothing about how it's driven, but if the DSDT lacks methods to do anything interesting, nothing happens.
arch/i386/kernel/cpu/cpufreq/longhaul.c static int __init longhaul_init(void) · line 697
Quoted 7 lines
arch/i386/kernel/cpu/cpufreq/longhaul.c +1
-1@@ -691,8 +693,8 @@ static int __init longhaul_init(void)#ifdef CONFIG_SMP if (num_online_cpus () >1 ) { -return -ENODEV ; printk(KERN_ERR PFX "More than 1 CPU detected, longhaul disabled.\n"); +return -ENODEV ;
Applied this bit, but the other bit I need to think about some more.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 3 lines
It's really a BIOS failing. The CPU cares nothing about how it's driven, but if the DSDT lacks methods to do anything interesting, nothing happens.
No it isn't. I have checked FADT and DSDT and everything is OK. David spend last 2 days checking changes in code that I send him. ACPI C3 is working on EPIA 800. It really don't work for BCR2 MSR. Frequency is ONLY changed on "halt" instruction. NEVER on ACPI C3. Maybe it works on lower ACPI states, but if I understand ACPI spec correcly only C3 state is good for this. Worst part is that this is mentioned in documentation: AUTOHALT only. Information about Longhaul is stripped from later datasheets. Probably designers from Centaur add support for ACPI later. I didn't know that AUTOHALT don't mean ACPI C3 capable. There is SLEEP signal and probably this signal is used to put processor in C3 state.
Sorry. I'm still learning.
Rafa³
--------------------------------------------------------------------
12 000 SMS-ow gratis! Promocja na http://link.interia.pl/f1971