Commit c92c54fe authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-dj.bkbits.net/cpufreq

into laptop.osdl.org:/home/torvalds/v2.5/linux
parents 2f519c6e d512699d
......@@ -24,6 +24,7 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
......
......@@ -20,6 +20,7 @@
*
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
......
......@@ -14,6 +14,7 @@
* - We disable half multipliers if ACPI is used on A0 stepping CPUs.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
......@@ -191,8 +192,8 @@ static void change_FID(int fid)
{
union msr_fidvidctl fidvidctl;
if (fidvidctl.bits.FID != fid) {
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
if (fidvidctl.bits.FID != fid) {
fidvidctl.bits.SGTC = latency;
fidvidctl.bits.FID = fid;
fidvidctl.bits.FIDC = 1;
......@@ -205,8 +206,8 @@ static void change_VID(int vid)
{
union msr_fidvidctl fidvidctl;
if (fidvidctl.bits.VID != vid) {
rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
if (fidvidctl.bits.VID != vid) {
fidvidctl.bits.VID = vid;
fidvidctl.bits.VIDC = 1;
wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
......
......@@ -23,6 +23,8 @@
#include "speedstep-lib.h"
#define PFX "speedstep-smi: "
/* speedstep system management interface port/command.
*
* These parameters are got from IST-SMI BIOS call.
......@@ -80,6 +82,7 @@ static int speedstep_smi_ownership (void)
return result;
}
/**
* speedstep_smi_get_freqs - get SpeedStep preferred & current freq.
*
......@@ -102,6 +105,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
return result;
}
/**
* speedstep_get_state - set the SpeedStep state
* @state: processor frequency state (SPEEDSTEP_LOW or SPEEDSTEP_HIGH)
......@@ -185,8 +189,7 @@ static void speedstep_set_state (unsigned int state, unsigned int notify)
* Sets a new CPUFreq policy/freq.
*/
static int speedstep_target (struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
unsigned int target_freq, unsigned int relation)
{
unsigned int newstate = 0;
......@@ -233,7 +236,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
/* fall back to speedstep_lib.c dection mechanism: try both states out */
unsigned int speedstep_processor = speedstep_detect_processor();
dprintk(KERN_INFO "speedstep-smi: could not detect low and high frequencies by SMI call.\n");
dprintk(KERN_INFO PFX "could not detect low and high frequencies by SMI call.\n");
if (!speedstep_processor)
return -ENODEV;
......@@ -243,10 +246,10 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
&speedstep_set_state);
if (result) {
dprintk(KERN_INFO "speedstep-smi: could not detect two different speeds -- aborting.\n");
dprintk(KERN_INFO PFX "could not detect two different speeds -- aborting.\n");
return result;
} else
dprintk(KERN_INFO "speedstep-smi: workaround worked.\n");
dprintk(KERN_INFO PFX "workaround worked.\n");
}
/* get current speed setting */
......@@ -294,8 +297,14 @@ static struct cpufreq_driver speedstep_driver = {
*/
static int __init speedstep_init(void)
{
struct cpuinfo_x86 *c = cpu_data;
if (c->x86_vendor != X86_VENDOR_INTEL) {
printk (KERN_INFO PFX "No Intel CPU detected.\n");
return -ENODEV;
}
dprintk("speedstep-smi: signature:0%.8lx, command:0lx%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n",
dprintk(KERN_DEBUG PFX "signature:0x%.8lx, command:0x%.8lx, event:0x%.8lx, perf_level:0x%.8lx.\n",
ist_info.signature, ist_info.command, ist_info.event, ist_info.perf_level);
......
......@@ -10,6 +10,7 @@
*
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
......
......@@ -10,6 +10,7 @@
*
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/smp.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment