rpms/kernel/devel linux-2.6-x86-k8-powernow-clock-disable-fix.patch, NONE, 1.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Sep 19 19:11:47 UTC 2006


Author: dzickus

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14321

Added Files:
	linux-2.6-x86-k8-powernow-clock-disable-fix.patch 
Log Message:
need to add patches before commiting them


linux-2.6-x86-k8-powernow-clock-disable-fix.patch:
 powernow-k8.c |    7 +++++--
 powernow-k8.h |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

--- NEW FILE linux-2.6-x86-k8-powernow-clock-disable-fix.patch ---
Date: Tue, 29 Aug 2006 15:23:14 -0400
From: Prarit Bhargava <prarit at redhat.com>
Subject: [RHEL5 PATCH]: BZ 204354 C1 clock disable process fixes

The current powernow-k8 driver sets the wrong bitmask when trying to disable
C1 clock ramping, and also attempts to do so on non-existant PCI devices
(because of a cpu vs. core number code error).

This patch fixes those issues in RHEL5.  Successfully tested by me on an
xw9400 system.

Resolves BZ 204354.


--- linux-2.6.17.i386/arch/i386/kernel/cpu/cpufreq/powernow-k8.c.orig	2006-08-28 17:19:37.000000000 -0400
+++ linux-2.6.17.i386/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2006-08-28 17:19:51.000000000 -0400
@@ -1321,10 +1322,13 @@ static int __cpuinit powernowk8_cpu_init
 
 	if (tscsync && (cpu_family == CPU_OPTERON)) {
 		u32 reg;
+		struct cpuinfo_x86 *c = &cpu_data[pol->cpu];
 		sync_tables(pol->cpu);
-		reg = read_pci_config(0, NB_PCI_ADDR + pol->cpu, NB_PM_DEV, NB_C1_REG);
+		reg = read_pci_config(0, NB_PCI_ADDR + c->cpu_core_id,
+				      NB_PM_DEV, NB_C1_REG);
 		/* turn off C1 clock ramping */
-		write_pci_config(0, NB_PCI_ADDR + pol->cpu, NB_PM_DEV, NB_C1_REG, reg & NB_C1_MASK);
+		write_pci_config(0, NB_PCI_ADDR + c->cpu_core_id,
+				 NB_PM_DEV, NB_C1_REG, reg & NB_C1_MASK);
 	}
 	return 0;
 
--- linux-2.6.17.i386/arch/i386/kernel/cpu/cpufreq/powernow-k8.h.orig	2006-08-28 17:18:37.000000000 -0400
+++ linux-2.6.17.i386/arch/i386/kernel/cpu/cpufreq/powernow-k8.h	2006-08-28 17:19:51.000000000 -0400
@@ -177,7 +177,7 @@ struct powernow_k8_data {
 #define NB_PCI_ADDR	0x18
 #define NB_PM_DEV	3
 #define NB_C1_REG	0x84
-#define NB_C1_MASK	0xfc
+#define NB_C1_MASK	0xfcffffff
 
 /*
  * Version 1.4 of the PSB table. This table is constructed by BIOS and is





More information about the fedora-cvs-commits mailing list