>-----Original Message----- >From: Matthew Garrett [mailto:mjg@xxxxxxxxxx] >Sent: Tuesday, July 20, 2010 12:52 PM >To: cpufreq@xxxxxxxxxxxxxxx >Cc: Matthew Garrett; Chumbalkar, Nagananda >Subject: [PATCH] cpufreq: pcc driver should check for pcch >method before calling _OSC > >The pcc specification documents an _OSC method that's >incompatible with the >one defined as part of the ACPI spec. This shouldn't be a >problem as both >are supposed to be guarded with a UUID. Unfortunately >approximately nobody >(including HP, who wrote this spec) properly check the UUID on >entry to the >_OSC call. Right now this could result in surprising behaviour >if the pcc >driver performs an _OSC call on a machine that doesn't >implement the pcc >specification. Check whether the PCCH method exists first in >order to reduce >this probability. > >Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx> >Cc: Naga Chumbalkar <nagananda.chumbalkar@xxxxxx> Agree. It's sane to not perform the _OSC call on systems that don't support the PCCH() method in their BIOS. - naga - >--- > arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > >diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c >b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c >index b3c4df2..b7c78f8 100644 >--- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c >+++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c >@@ -397,13 +397,17 @@ static int __init pcc_cpufreq_probe(void) > struct pcc_memory_resource *mem_resource; > struct pcc_register_resource *reg_resource; > union acpi_object *out_obj, *member; >- acpi_handle handle, osc_handle; >+ acpi_handle handle, osc_handle, pcch_handle; > int ret = 0; > > status = acpi_get_handle(NULL, "\\_SB", &handle); > if (ACPI_FAILURE(status)) > return -ENODEV; > >+ status = acpi_get_handle(handle, "PCCH", &pcch_handle); >+ if (ACPI_FAILURE(status)) >+ return -ENODEV; >+ > status = acpi_get_handle(handle, "_OSC", &osc_handle); > if (ACPI_SUCCESS(status)) { > ret = pcc_cpufreq_do_osc(&osc_handle); >-- >1.7.1.1 > >-- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html