From 878a23b145647f51ee1eb66fe1f52a3d1c30e202 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 5 Jan 2004 18:19:13 +0000 Subject: [PATCH] [CPUFREQ] Disable smi_detect_freqs() call on systems which do not support it [BUG #1422] Dominik Brodowski. --- arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c index 711682d82ddae..0249cedc72d95 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c @@ -85,6 +85,9 @@ static int speedstep_smi_ownership (void) /** * speedstep_smi_get_freqs - get SpeedStep preferred & current freq. + * Only available on later SpeedStep-enabled systems, returns false results or + * even hangs [cf. bugme.osdl.org # 1422] on earlier systems. Empirical testing + * shows that the latter occurs if !(ist_info.event & 0xFFFF). * */ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high) @@ -93,6 +96,9 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high) u32 state=0; u32 function = GET_SPEEDSTEP_FREQS; + if (!(ist_info.event & 0xFFFF)) + return -ENODEV; + command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); __asm__ __volatile__("movl $0, %%edi\n" -- 2.53.0