lkml.org 
[lkml]   [2001]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: VCool - cool your Athlon/Duron during idle
On Mon, Aug 27, 2001 at 02:26:09AM -0700, Grover, Andrew wrote:
> Well I don't want to inhibit your hackerly fervor, but C2 and C3 handling
> are already supported by the ACPI driver, in a vendor-neutral manner.

I did look into this, and indeed the ACPI code is doing this much better
than my patch did.

The only thing it is missing is enabling disconnect in C2 mode. Of course,
enabling a feature that may have been disabled by the BIOS with a good reason
may be dangerous. Still, it seems to work for me ;-) and saves a lot of power.

With the ACPI code and a simple patch that enables bus disconnection, I get
the same power saving as with the lvcool userspace program, but a much better
performance for things like NFS access. (in fact, NFS access is the only
thing where I notice a significant slowdown when running lvcool)

Additionaly, this patch is much smaller than the last one. But of course,
it's only usefull if ACPI is working (which it is for me).
I added the code to quirks.c because it allowed some quick cut&paste ;-)
The code is enabled if the kernel is booted with via_disconnect=yes

To give some numbers (measured with a simple, probably not very accurate
'power monitor'):
Idle without disconnect: ~80W
Idle with disconnect: ~60W
Compiling a kernel: ~90W
(all numbers for a Duron 800, Asus A7V133, Voodoo 3, Maxtor 80GB hard disk,
256MB RAM and some PCI cards)

By the way, does anybody know why modprobe ospm_busmgr doesn't return, but
the module works if I interrupt the modprobe with CTRL-C?

Jan


diff -ur linux-2.4.9-ac5/drivers/pci/quirks.c linux-2.4.9-ac5-vcool/drivers/pci/quirks.c
--- linux-2.4.9-ac5/drivers/pci/quirks.c Sun Sep 2 15:37:56 2001
+++ linux-2.4.9-ac5-vcool/drivers/pci/quirks.c Sun Sep 2 23:58:12 2001
@@ -21,6 +21,8 @@

#undef DEBUG

+int enable_via_disconnect;
+
/* Deal with broken BIOS'es that neglect to enable passive release,
which can cause problems in combination with the 82441FX/PPro MTRRs */
static void __init quirk_passive_release(struct pci_dev *dev)
@@ -146,6 +148,21 @@
printk(KERN_INFO "Applying VIA southbridge workaround.\n");
}

+static void __init quirk_viadisconnect(struct pci_dev *dev)
+{
+ u32 res32;
+
+ if(!enable_via_disconnect) return;
+
+ pci_read_config_dword(dev,0x52&0xfc,&res32);
+ if ((res32&0x00800000)==0) {
+ printk(KERN_INFO "Enabling disconnect in VIA northbridge.\n");
+ res32|=0x00800000;
+ pci_write_config_dword(dev,0x52&0xfc,res32);
+ } else
+ printk(KERN_INFO "Disconnect already anabled in VIA northbridge.\n");
+}
+
/*
* VIA Apollo VP3 needs ETBF on BT848/878
*/
@@ -453,6 +470,8 @@
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency },
+ { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_viadisconnect },
+ { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8371_0, quirk_viadisconnect },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, 0x3112 /* Not out yet ? */, quirk_vialatency },
{ PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf },
@@ -500,3 +519,12 @@
pci_do_fixups(dev, pass, pcibios_fixups);
pci_do_fixups(dev, pass, pci_fixups);
}
+
+static int __init via_disconnect_setup (char *str) {
+ if(!strncmp(str,"yes",3)) {
+ enable_via_disconnect=1;
+ }
+ return 1;
+}
+
+__setup("via_disconnect=", via_disconnect_setup);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.381 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site