Skip to contentSkip to conversation

powernow-k8-buggy-bios-override-for-266.patch

DISCUSSION Dominik Brodowski 2 participants 3 messages May 13, 2004

lore
Share & tools
lore
#0 lore raw

Tony,

Can you post such patches on the cpufreq mailing list ([email protected]) too, in future, please?

Quoted 2 lines

This patch should be safe to apply, even if Pavel's ACPI table check is added to the driver.

Which check? I thought the powernow-k8 driver is quite up to date, Pavel?

- if (query_current_values_with_pending_wait(data)) {
- kfree(powernow_table);
- return -EIO;
- }
-

Why do you remove this check?

Dominik

#1 lore raw
Quoted 4 lines · Dominik Brodowski

Tony,

Can you post such patches on the cpufreq mailing list ([email protected]) too, in future, please?

Oops, sorry, will do.

Quoted 4 lines
Quoted 2 lines

This patch should be safe to apply, even if Pavel's ACPI table check is added to the driver.

Which check? I thought the powernow-k8 driver is quite up to date, Pavel?

Hmmm, maybe it's integrated already? Have to check. But the driver by default does not work for me.

Quoted 7 lines
(quoted diff) +0 -5
-	if (query_current_values_with_pending_wait(data)) {
-		kfree(powernow_table);
-		return -EIO;
-	}
-

Why do you remove this check?

Just moved it a bit earlier in the code as the values are needed earlier :)

Regards,

Tony

#2 lore raw
In reply to Dominik Brodowski
Quoted 5 lines · Dominik Brodowski
Quoted 3 lines

This patch should be safe to apply, even if Pavel's ACPI table check is added to the driver.

Which check? I thought the powernow-k8 driver is quite up to date, Pavel?

OK, after some further investigating here's what happens. The ACPI table parsing is there, and works. I was just updating my patch to 2.6.6, and did not pay much attention to what else had changed.

However, since my computer locks up as of 2.6.6 if ACPI processor is compiled in, I've had it compiled as a module. Loading it after the init is done does not lock up the system...

So I had CONFIG_ACPI_PROCESSOR=m, and that made the powernow-k8 ACPI detection to fail. It now works good with the following little patch. Now I also have the 1600MHz in addition to 800MHz and 1800MHz :)

I can keep my earlier patch around on my website in case somebody needs it. It could also be included as secondary fallback if both ACPI and BIOS fail.

What happens with the ACPI speed tables with CPU upgrade BTW? Are they hardcoded, or generated by the BIOS?

Regards,

Tony

arch/i386/kernel/cpu/cpufreq/powernow-k8.c +2 -2
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -32,7 +32,7 @@
 #include <asm/io.h>
 #include <asm/delay.h>
 
-#ifdef CONFIG_ACPI_PROCESSOR
+#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
 #include <linux/acpi.h>
 #include <acpi/processor.h>
 #endif
@@ -666,7 +696,7 @@
 	return -ENODEV;
 }
 
-#ifdef CONFIG_ACPI_PROCESSOR
+#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
 static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)
 {
 	if (!data->acpi_data.state_count)
arch/i386/kernel/cpu/cpufreq/powernow-k8.h +1 -1
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h
@@ -29,7 +29,7 @@
 	 * frequency is in kHz */
 	struct cpufreq_frequency_table  *powernow_table;
 
-#ifdef CONFIG_ACPI_PROCESSOR
+#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
 	/* the acpi table needs to be kept. it's only available if ACPI was
 	 * used to determine valid frequency/vid/fid states */
 	struct acpi_processor_performance acpi_data;

_______________________________________________
Cpufreq mailing list
[email protected]
http://www.linux.org.uk/mailman/listinfo/cpufreq