From: Mattia Dongili Subject: [PATCH 2.6.19-rc5-mm2] cpufreq: set policy->curfreq on initialization Date: Wed, 15 Nov 2006 20:05:17 +0100 Message-ID: <20061115190517.GA2449@inferi.kami.home> References: <20061115183610.GA4812@inferi.kami.home> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20061115183610.GA4812@inferi.kami.home> Sender: linux-kernel-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Pallipadi, Venkatesh" , ego@in.ibm.com, Reuben Farrelly , Andrew Morton , davej@redhat.com, linux-kernel@vger.kernel.org, CPUFreq Mailing List , "Sadykov, Denis M" Check the correct variable and set policy->cur upon acpi-cpufreq initialization to allow the userspace governor to be used as default. Signed-off-by: Mattia Dongili --- Reuben, could you also try if this patch fixes the BUG()? Thanks diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 18f4715..a630f94 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -699,14 +699,14 @@ static int acpi_cpufreq_cpu_init(struct if (result) goto err_freqfree; - switch (data->cpu_feature) { + switch (perf->control_register.space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: /* Current speed is unknown and not detectable by IO port */ policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); break; case ACPI_ADR_SPACE_FIXED_HARDWARE: acpi_cpufreq_driver.get = get_cur_freq_on_cpu; - get_cur_freq_on_cpu(cpu); + policy->cur = get_cur_freq_on_cpu(cpu); break; default: break;