rpms/kernel/devel git-cpufreq.patch, NONE, 1.1 kernel-2.6.spec, 1.3160, 1.3161
Dave Jones (davej)
fedora-extras-commits at redhat.com
Tue May 15 19:01:06 UTC 2007
- Previous message (by thread): rpms/kdelibs/devel kdelibs-3.5.0-101956.patch, NONE, 1.1 kdelibs-3.5.5-kstandarddirs.patch, NONE, 1.1 kdelibs-3.5.6-137675.patch, NONE, 1.1 kdelibs-3.5.6-kde#140768.patch, NONE, 1.1 kde.csh, 1.3, 1.4 kde.sh, 1.4, 1.5 kdelibs-3.5.6-kde#126812.patch, 1.1, 1.2 kdelibs.spec, 1.205, 1.206
- Next message (by thread): rpms/kernel/devel git-geode.patch,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15289
Modified Files:
kernel-2.6.spec
Added Files:
git-cpufreq.patch
Log Message:
* Tue May 15 2007 Dave Jones <davej at redhat.com>
- Add cpufreq-git, fixes #239724
git-cpufreq.patch:
--- NEW FILE git-cpufreq.patch ---
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
index 837b041..ca3e1d3 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -341,15 +341,17 @@ static int powernow_acpi_init(void)
pc.val = (unsigned long) acpi_processor_perf->states[0].control;
for (i = 0; i < number_scales; i++) {
u8 fid, vid;
- unsigned int speed;
+ struct acpi_processor_px *state =
+ &acpi_processor_perf->states[i];
+ unsigned int speed, speed_mhz;
- pc.val = (unsigned long) acpi_processor_perf->states[i].control;
+ pc.val = (unsigned long) state->control;
dprintk ("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n",
i,
- (u32) acpi_processor_perf->states[i].core_frequency,
- (u32) acpi_processor_perf->states[i].power,
- (u32) acpi_processor_perf->states[i].transition_latency,
- (u32) acpi_processor_perf->states[i].control,
+ (u32) state->core_frequency,
+ (u32) state->power,
+ (u32) state->transition_latency,
+ (u32) state->control,
pc.bits.sgtc);
vid = pc.bits.vid;
@@ -360,6 +362,18 @@ static int powernow_acpi_init(void)
powernow_table[i].index |= (vid << 8); /* upper 8 bits */
speed = powernow_table[i].frequency;
+ speed_mhz = speed / 1000;
+
+ /* processor_perflib will multiply the MHz value by 1000 to
+ * get a KHz value (e.g. 1266000). However, powernow-k7 works
+ * with true KHz values (e.g. 1266768). To ensure that all
+ * powernow frequencies are available, we must ensure that
+ * ACPI doesn't restrict them, so we round up the MHz value
+ * to ensure that perflib's computed KHz value is greater than
+ * or equal to powernow's KHz value.
+ */
+ if (speed % 1000 > 0)
+ speed_mhz++;
if ((fid_codes[fid] % 10)==5) {
if (have_a0 == 1)
@@ -368,10 +382,16 @@ static int powernow_acpi_init(void)
dprintk (" FID: 0x%x (%d.%dx [%dMHz]) "
"VID: 0x%x (%d.%03dV)\n", fid, fid_codes[fid] / 10,
- fid_codes[fid] % 10, speed/1000, vid,
+ fid_codes[fid] % 10, speed_mhz, vid,
mobile_vid_table[vid]/1000,
mobile_vid_table[vid]%1000);
+ if (state->core_frequency != speed_mhz) {
+ state->core_frequency = speed_mhz;
+ dprintk(" Corrected ACPI frequency to %d\n",
+ speed_mhz);
+ }
+
if (latency < pc.bits.sgtc)
latency = pc.bits.sgtc;
@@ -602,7 +622,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
result = powernow_acpi_init();
if (result) {
printk (KERN_INFO PFX "ACPI and legacy methods failed\n");
- printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.shtml\n");
+ printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.html\n");
}
} else {
/* SGTC use the bus clock as timer */
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 7cf3d20..4ade55c 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -521,7 +521,7 @@ static int check_supported_cpu(unsigned int cpu)
if ((eax & CPUID_XFAM) == CPUID_XFAM_K8) {
if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) ||
- ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) {
+ ((eax & CPUID_XMOD) > CPUID_XMOD_REV_MASK)) {
printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax);
goto out;
}
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
index 95be501..b06c812 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
@@ -46,8 +46,8 @@ struct powernow_k8_data {
#define CPUID_XFAM 0x0ff00000 /* extended family */
#define CPUID_XFAM_K8 0
#define CPUID_XMOD 0x000f0000 /* extended model */
-#define CPUID_XMOD_REV_G 0x00060000
-#define CPUID_XFAM_10H 0x00100000 /* family 0x10 */
+#define CPUID_XMOD_REV_MASK 0x00080000
+#define CPUID_XFAM_10H 0x00100000 /* family 0x10 */
#define CPUID_USE_XFAM_XMOD 0x00000f00
#define CPUID_GET_MAX_CAPABILITIES 0x80000000
#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3160
retrieving revision 1.3161
diff -u -r1.3160 -r1.3161
--- kernel-2.6.spec 15 May 2007 18:49:00 -0000 1.3160
+++ kernel-2.6.spec 15 May 2007 19:00:32 -0000 1.3161
@@ -382,7 +382,7 @@
# Patches 0 through 100 are meant for core subsystem upgrades
#
Patch1: patch-2.6.21.1.bz2
-Patch3: git-geode.patch
+Patch2: git-cpufreq.patch
# Patches 10 through 99 are for things that are going upstream really soon.
Patch10: linux-2.6-utrace.patch
@@ -1020,6 +1020,7 @@
# Update to latest upstream.
%patch1 -p1
+%patch2 -p1
# Patches 10 through 100 are meant for core subsystem upgrades
@@ -2346,6 +2347,9 @@
%changelog
* Tue May 15 2007 Dave Jones <davej at redhat.com>
+- Add cpufreq-git, fixes #239724
+
+* Tue May 15 2007 Dave Jones <davej at redhat.com>
- Fix ACPI dock oops (#238054) [cebbert]
* Tue May 15 2007 Dave Jones <davej at redhat.com>
- Previous message (by thread): rpms/kdelibs/devel kdelibs-3.5.0-101956.patch, NONE, 1.1 kdelibs-3.5.5-kstandarddirs.patch, NONE, 1.1 kdelibs-3.5.6-137675.patch, NONE, 1.1 kdelibs-3.5.6-kde#140768.patch, NONE, 1.1 kde.csh, 1.3, 1.4 kde.sh, 1.4, 1.5 kdelibs-3.5.6-kde#126812.patch, 1.1, 1.2 kdelibs.spec, 1.205, 1.206
- Next message (by thread): rpms/kernel/devel git-geode.patch,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list