I tried to apply the mail below to my cpufreq.git tree on master.kernel.org, and got .. $ git-applymbox -k mbox 1 patch(es) to process. Applying '[CPUFREQ] Longhaul - Disable arbiter CLE266' fatal: corrupt patch at line 99 I don't see what the problem is. It applies fine with patch... (22:44:48:davej@hera:cpufreq)$ cat 1 | patch -p1 --dry-run patching file arch/i386/kernel/cpu/cpufreq/longhaul.c (22:44:53:davej@hera:cpufreq)$ I'm guessing it didn't like one of the headers, but chopping some of them out hasn't seemed to improve things. Dave >From davej@xxxxxxxxxx Sun Sep 24 18:31:11 2006 Return-Path: <davej@xxxxxxxxxx> Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by hera.kernel.org (8.13.7/8.13.7) with ESMTP id k8OIUhQv017025 for <davej@xxxxxxxxxx>; Sun, 24 Sep 2006 18:31:08 GMT Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k8OIUh5D022511 for <davej@xxxxxxxxxx>; Sun, 24 Sep 2006 14:30:43 -0400 Received: from pressure.kernelslacker.org (vpn-248-6.boston.redhat.com [10.13.248.6]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k8OIUgGp026807 for <davej@xxxxxxxxxx>; Sun, 24 Sep 2006 14:30:42 -0400 Received: from pressure.kernelslacker.org (localhost.localdomain [127.0.0.1]) by pressure.kernelslacker.org (8.13.8/8.13.8) with ESMTP id k8OIUfs6013171 for <davej@xxxxxxxxxx>; Sun, 24 Sep 2006 14:30:41 -0400 Received: (from davej@localhost) by pressure.kernelslacker.org (8.13.8/8.13.8/Submit) id k8OIUfjO013170 for davej@xxxxxxxxxx; Sun, 24 Sep 2006 14:30:41 -0400 Resent-Message-Id: <200609241830.k8OIUfjO013170@xxxxxxxxxxxxxxxxxxxxxxxxxx> X-Authentication-Warning: pressure.kernelslacker.org: davej set sender to davej@xxxxxxxxxx using -f X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on hera.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.3 Received: from pobox.devel.redhat.com [10.11.255.8] by pressure.kernelslacker.org with IMAP (fetchmail-6.3.4) for <davej@localhost> (single-drop); Sun, 24 Sep 2006 14:19:33 -0400 (EDT) Received: from pobox.devel.redhat.com ([unix socket]) by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-3.RHEL4.1) with LMTPA; Sun, 24 Sep 2006 14:19:00 -0400 X-Sieve: CMU Sieve 2.2 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id k8OIIxSA032250 for <davej@xxxxxxxxxxxxxxxxxxxxxx>; Sun, 24 Sep 2006 14:19:00 -0400 Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k8OIIxG3022438 for <davej@xxxxxxxxxx>; Sun, 24 Sep 2006 14:18:59 -0400 Received: from smtp4.poczta.interia.pl (smtp11.poczta.interia.pl [80.48.65.11]) by mx3.redhat.com (8.13.1/8.13.1) with ESMTP id k8OIIpQq020496 for <davej@xxxxxxxxxx>; Sun, 24 Sep 2006 14:18:51 -0400 Received: by smtp4.poczta.interia.pl (INTERIA.PL, from userid 502) id 85328D228F; Sun, 24 Sep 2006 20:18:50 +0200 (CEST) Received: from poczta.interia.pl (mi02.poczta.interia.pl [10.217.12.2]) by smtp4.poczta.interia.pl (INTERIA.PL) with ESMTP id DFEF4D2265; Sun, 24 Sep 2006 20:18:49 +0200 (CEST) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id D1C072BD043; Sun, 24 Sep 2006 20:18:49 +0200 (CEST) Received: from [172.16.5.114] (unknown [81.15.157.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by poczta.interia.pl (INTERIA.PL) with ESMTP id ECF6C2BD0BC; Sun, 24 Sep 2006 20:18:45 +0200 (CEST) Message-ID: <4516CE3D.5050101@xxxxxxxxxx> Date: Sun, 24 Sep 2006 20:28:13 +0200 From: =?ISO-8859-2?Q?Rafa=B3_Bilski?= <rafalbilski@xxxxxxxxxx> User-Agent: Thunderbird 1.5.0.5 (X11/20060805) MIME-Version: 1.0 To: Dave Jones <davej@xxxxxxxxxx> Cc: cpufreq@xxxxxxxxxxxxxxxxxx Subject: [CPUFREQ] Longhaul - Disable arbiter CLE266 X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-EMID: d25b6acc X-RedHat-Spam-Score: 0 Resent-From: davej@xxxxxxxxxx Resent-Date: Sun, 24 Sep 2006 14:30:41 -0400 Resent-To: davej@xxxxxxxxxx X-Virus-Scanned: ClamAV 0.88.4/1931/Sun Sep 24 07:51:08 2006 on hera.kernel.org X-Virus-Status: Clean Status: RO Content-Length: 3399 Lines: 114 Please ignore previous message. This patch is adding support for CPU connected to CLE266 chipset. For older CPU this is only way. For "Powersaver" processor this way will be used if ACPI C3 isn't supported. I have tested it. It seems to work exacly like ACPI. But it is less safe. On CLE266 chipset port 0x22 is blocking processor access to PCI bus too. Signed-off-by: Rafa³ Bilski <rafalbilski@xxxxxxxxxx> Signed-off-by: Dave Jones <davej@xxxxxxxxxx> --- diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c @@ -178,11 +178,17 @@ static void do_powersaver(int cx_address safe_halt(); /* Change frequency on next halt or sleep */ wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); - ACPI_FLUSH_CPU_CACHE(); - /* Invoke C3 */ - inb(cx_address); - /* Dummy op - must do something useless after P_LVL3 read */ - t = inl(acpi_fadt.xpm_tmr_blk.address); + if (port22_en) { + ACPI_FLUSH_CPU_CACHE(); + /* Invoke C1 */ + halt(); + } else { + ACPI_FLUSH_CPU_CACHE(); + /* Invoke C3 */ + inb(cx_address); + /* Dummy op - must do something useless after P_LVL3 read */ + t = inl(acpi_fadt.xpm_tmr_blk.address); + } /* Disable bus ratio bit */ local_irq_disable(); @@ -567,16 +573,23 @@ static acpi_status longhaul_walk_callbac static int enable_arbiter_disable(void) { struct pci_dev *dev; + int reg; u8 pci_cmd; /* Find PLE133 host bridge */ + reg = 0x78; dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL); + /* Find CLE266 host bridge */ + if (dev == NULL) { + dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL); + reg = 0x76; + } if (dev != NULL) { /* Enable access to port 0x22 */ - pci_read_config_byte(dev, 0x78, &pci_cmd); + pci_read_config_byte(dev, reg, &pci_cmd); if ( !(pci_cmd & 1<<7) ) { pci_cmd |= 1<<7; - pci_write_config_byte(dev, 0x78, pci_cmd); + pci_write_config_byte(dev, reg, pci_cmd); } return 1; } @@ -681,19 +694,29 @@ static int __init longhaul_cpu_init(stru /* Check ACPI support for C3 state */ cx = &pr->power.states[ACPI_STATE_C3]; if (cx->address == 0 || - (cx->latency > 1000 && ignore_latency == 0) ) - goto err_acpi; + (cx->latency > 1000 && ignore_latency == 0) ) { + if (enable_arbiter_disable()) { + port22_en = 1; + } else { + goto err_acpi; + } + } } else { /* Check ACPI support for bus master arbiter disable */ if (!pr->flags.bm_control) { - if (!enable_arbiter_disable()) { - printk(KERN_ERR PFX "No ACPI support. No VT8601 host bridge. Aborting.\n"); - return -ENODEV; - } else + if (enable_arbiter_disable()) { port22_en = 1; + } else { + goto err_acpi; + } } } + if (!port22_en) { + printk (KERN_INFO PFX "Using ACPI support.\n"); + } else { + printk (KERN_INFO PFX "Using northbridge support.\n"); + } ret = longhaul_get_ranges(); if (ret != 0) @@ -716,7 +739,7 @@ static int __init longhaul_cpu_init(stru return 0; err_acpi: - printk(KERN_ERR PFX "No ACPI support for CPU frequency changes.\n"); + printk(KERN_ERR PFX "No ACPI support. No VT8601 or VT8623 northbridge. Aborting.\n"); return -ENODEV; } ---------------------------------------------------------------------- Jestes kierowca? To poczytaj! >>> http://link.interia.pl/f199e - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html