From: Thomas Renninger <trenn@suse.de>
To: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Cc: Dave Jones <davej@codemonkey.org.uk>,
linux-acpi@vger.kernel.org, cpufreq@vger.kernel.org,
Greg Kroah-Hartman <gregkh@novell.com>
Subject: Re: [PATCH]: cpufreq: pcc-cpufreq: don't load driver if get_freq fails during init.
Date: Wed, 9 Mar 2011 17:09:40 +0100 [thread overview]
Message-ID: <201103091709.40464.trenn@suse.de> (raw)
In-Reply-To: <20110309135906.6554.54389.sendpatchset@nchumbalkar.americas.hpqcorp.net>
Good catch.
On Wednesday, March 09, 2011 03:02:49 PM Naga Chumbalkar wrote:
>
> Return 0 on failure. This will cause the initialization of the driver
> to fail and prevent the driver from loading if the BIOS cannot handle
> the PCC interface command to "get frequency". Otherwise, the driver
> will load and display a very high value like "4294967274" (which is
> actually -EINVAL) for frequency:
>
> # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
> 4294967274
>
> Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Reviewed-by: Thomas Renninger <trenn@suse.de>
While this is not a regression, it's an easy fix.
It should make sense to add:
CC: stable@kernel.org
?
Thomas
> ---
>
> diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
> index 4f6f679..4a5a42b 100644
> --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
> +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
> @@ -195,7 +195,7 @@ static unsigned int pcc_get_freq(unsigned int cpu)
> cmd_incomplete:
> iowrite16(0, &pcch_hdr->status);
> spin_unlock(&pcc_lock);
> - return -EINVAL;
> + return 0;
> }
>
> static int pcc_cpufreq_target(struct cpufreq_policy *policy,
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2011-03-09 16:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 14:02 [PATCH]: cpufreq: pcc-cpufreq: don't load driver if get_freq fails during init Naga Chumbalkar
2011-03-09 16:09 ` Thomas Renninger [this message]
2011-03-09 16:27 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103091709.40464.trenn@suse.de \
--to=trenn@suse.de \
--cc=cpufreq@vger.kernel.org \
--cc=davej@codemonkey.org.uk \
--cc=gregkh@novell.com \
--cc=linux-acpi@vger.kernel.org \
--cc=nagananda.chumbalkar@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox