Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a7cf3f04
Commit
a7cf3f04
authored
May 31, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-dj.bkbits.net/cpufreq
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
a16b6d13
f6b614e7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
67 deletions
+67
-67
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
+0
-1
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
+46
-47
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
+1
-2
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+10
-11
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+10
-6
No files found.
arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
View file @
a7cf3f04
...
@@ -75,7 +75,6 @@
...
@@ -75,7 +75,6 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/smp.h>
#include <linux/cpufreq.h>
#include <linux/cpufreq.h>
...
...
arch/i386/kernel/cpu/cpufreq/longhaul.c
View file @
a7cf3f04
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include <linux/slab.h>
...
@@ -30,25 +31,25 @@
...
@@ -30,25 +31,25 @@
#include "longhaul.h"
#include "longhaul.h"
#define DEBUG
#ifdef DEBUG
#define dprintk(msg...) printk(msg)
#else
#define dprintk(msg...) do { } while(0)
#endif
#define PFX "longhaul: "
#define PFX "longhaul: "
static
unsigned
int
numscales
=
16
,
numvscales
;
static
unsigned
int
numscales
=
16
,
numvscales
;
static
unsigned
int
fsb
;
static
int
minvid
,
maxvid
;
static
int
minvid
,
maxvid
;
static
int
can_scale_voltage
;
static
int
can_scale_voltage
;
static
int
vrmrev
;
static
int
vrmrev
;
/* Module parameters */
/* Module parameters */
static
int
dont_scale_voltage
;
static
int
dont_scale_voltage
;
static
unsigned
int
fsb
;
static
int
debug
;
static
int
debug
;
static
void
dprintk
(
const
char
*
msg
,
...)
{
if
(
debug
==
1
)
printk
(
msg
);
}
#define __hlt() __asm__ __volatile__("hlt": : :"memory")
#define __hlt() __asm__ __volatile__("hlt": : :"memory")
...
@@ -118,8 +119,7 @@ static void longhaul_setstate (unsigned int clock_ratio_index)
...
@@ -118,8 +119,7 @@ static void longhaul_setstate (unsigned int clock_ratio_index)
cpufreq_notify_transition
(
&
freqs
,
CPUFREQ_PRECHANGE
);
cpufreq_notify_transition
(
&
freqs
,
CPUFREQ_PRECHANGE
);
dprintk
(
KERN_INFO
PFX
"FSB:%d Mult:%d.%dx
\n
"
,
fsb
,
dprintk
(
KERN_INFO
PFX
"FSB:%d Mult:%d.%dx
\n
"
,
fsb
,
mult
/
10
,
mult
%
10
);
mult
/
10
,
mult
%
10
);
switch
(
longhaul_version
)
{
switch
(
longhaul_version
)
{
case
1
:
case
1
:
...
@@ -501,7 +501,6 @@ static int __init longhaul_cpu_init (struct cpufreq_policy *policy)
...
@@ -501,7 +501,6 @@ static int __init longhaul_cpu_init (struct cpufreq_policy *policy)
}
}
break
;
break
;
default:
default:
cpuname
=
"Unknown"
;
cpuname
=
"Unknown"
;
break
;
break
;
...
@@ -530,7 +529,7 @@ static int __init longhaul_cpu_init (struct cpufreq_policy *policy)
...
@@ -530,7 +529,7 @@ static int __init longhaul_cpu_init (struct cpufreq_policy *policy)
return
0
;
return
0
;
}
}
static
int
__exit
longhaul_cpu_exit
(
struct
cpufreq_policy
*
policy
)
static
int
__
dev
exit
longhaul_cpu_exit
(
struct
cpufreq_policy
*
policy
)
{
{
cpufreq_frequency_table_put_attr
(
policy
->
cpu
);
cpufreq_frequency_table_put_attr
(
policy
->
cpu
);
return
0
;
return
0
;
...
@@ -546,7 +545,7 @@ static struct cpufreq_driver longhaul_driver = {
...
@@ -546,7 +545,7 @@ static struct cpufreq_driver longhaul_driver = {
.
target
=
longhaul_target
,
.
target
=
longhaul_target
,
.
get
=
longhaul_get
,
.
get
=
longhaul_get
,
.
init
=
longhaul_cpu_init
,
.
init
=
longhaul_cpu_init
,
.
exit
=
longhaul_cpu_exit
,
.
exit
=
__devexit_p
(
longhaul_cpu_exit
)
,
.
name
=
"longhaul"
,
.
name
=
"longhaul"
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
attr
=
longhaul_attr
,
.
attr
=
longhaul_attr
,
...
@@ -560,12 +559,8 @@ static int __init longhaul_init (void)
...
@@ -560,12 +559,8 @@ static int __init longhaul_init (void)
return
-
ENODEV
;
return
-
ENODEV
;
switch
(
c
->
x86_model
)
{
switch
(
c
->
x86_model
)
{
case
6
...
8
:
case
6
...
9
:
return
cpufreq_register_driver
(
&
longhaul_driver
);
return
cpufreq_register_driver
(
&
longhaul_driver
);
case
9
:
printk
(
KERN_INFO
PFX
"Nehemiah unsupported: Waiting on working silicon "
"from VIA before this is usable.
\n
"
);
break
;
default:
default:
printk
(
KERN_INFO
PFX
"Unknown VIA CPU. Contact davej@codemonkey.org.uk
\n
"
);
printk
(
KERN_INFO
PFX
"Unknown VIA CPU. Contact davej@codemonkey.org.uk
\n
"
);
}
}
...
@@ -579,7 +574,11 @@ static void __exit longhaul_exit (void)
...
@@ -579,7 +574,11 @@ static void __exit longhaul_exit (void)
kfree
(
longhaul_table
);
kfree
(
longhaul_table
);
}
}
MODULE_PARM
(
dont_scale_voltage
,
"i"
);
module_param
(
dont_scale_voltage
,
int
,
0644
);
MODULE_PARM_DESC
(
dont_scale_voltage
,
"Don't scale voltage of processor"
);
module_param
(
debug
,
int
,
0644
);
MODULE_PARM_DESC
(
debug
,
"Dump debugging information."
);
MODULE_AUTHOR
(
"Dave Jones <davej@codemonkey.org.uk>"
);
MODULE_AUTHOR
(
"Dave Jones <davej@codemonkey.org.uk>"
);
MODULE_DESCRIPTION
(
"Longhaul driver for VIA Cyrix processors."
);
MODULE_DESCRIPTION
(
"Longhaul driver for VIA Cyrix processors."
);
...
...
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
View file @
a7cf3f04
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include <linux/smp.h>
#include <linux/smp.h>
#include <linux/cpufreq.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/msr.h>
#include <asm/msr.h>
...
@@ -35,7 +34,7 @@
...
@@ -35,7 +34,7 @@
#include "speedstep-lib.h"
#include "speedstep-lib.h"
#define PFX "
cpufreq
: "
#define PFX "
p4-clockmod
: "
/*
/*
* Duty Cycle (3bits), note DC_DISABLE is not specified in
* Duty Cycle (3bits), note DC_DISABLE is not specified in
...
...
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
View file @
a7cf3f04
...
@@ -95,7 +95,7 @@ static int fid_codes[32] = {
...
@@ -95,7 +95,7 @@ static int fid_codes[32] = {
* configuration purpose.
* configuration purpose.
*/
*/
static
int
powernow_
acpi_force
;
static
int
acpi_force
;
static
struct
cpufreq_frequency_table
*
powernow_table
;
static
struct
cpufreq_frequency_table
*
powernow_table
;
...
@@ -144,6 +144,11 @@ static int check_powernow(void)
...
@@ -144,6 +144,11 @@ static int check_powernow(void)
}
}
cpuid
(
0x80000007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
cpuid
(
0x80000007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
/* Check we can actually do something before we say anything.*/
if
(
!
(
edx
&
(
1
<<
1
|
1
<<
2
)))
return
0
;
printk
(
KERN_INFO
PFX
"PowerNOW! Technology present. Can scale: "
);
printk
(
KERN_INFO
PFX
"PowerNOW! Technology present. Can scale: "
);
if
(
edx
&
1
<<
1
)
{
if
(
edx
&
1
<<
1
)
{
...
@@ -159,11 +164,6 @@ static int check_powernow(void)
...
@@ -159,11 +164,6 @@ static int check_powernow(void)
can_scale_vid
=
1
;
can_scale_vid
=
1
;
}
}
if
(
!
(
edx
&
(
1
<<
1
|
1
<<
2
)))
{
printk
(
"nothing.
\n
"
);
return
0
;
}
printk
(
".
\n
"
);
printk
(
".
\n
"
);
return
1
;
return
1
;
}
}
...
@@ -572,7 +572,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
...
@@ -572,7 +572,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
}
}
dprintk
(
KERN_INFO
PFX
"FSB: %3d.%03d MHz
\n
"
,
fsb
/
1000
,
fsb
%
1000
);
dprintk
(
KERN_INFO
PFX
"FSB: %3d.%03d MHz
\n
"
,
fsb
/
1000
,
fsb
%
1000
);
if
((
dmi_broken
&
BROKEN_CPUFREQ
)
||
powernow_
acpi_force
)
{
if
((
dmi_broken
&
BROKEN_CPUFREQ
)
||
acpi_force
)
{
printk
(
KERN_INFO
PFX
"PSB/PST known to be broken. Trying ACPI instead
\n
"
);
printk
(
KERN_INFO
PFX
"PSB/PST known to be broken. Trying ACPI instead
\n
"
);
result
=
powernow_acpi_init
();
result
=
powernow_acpi_init
();
}
else
{
}
else
{
...
@@ -653,8 +653,7 @@ static void __exit powernow_exit (void)
...
@@ -653,8 +653,7 @@ static void __exit powernow_exit (void)
kfree
(
powernow_table
);
kfree
(
powernow_table
);
}
}
module_param
(
powernow_acpi_force
,
int
,
0444
);
module_param
(
acpi_force
,
int
,
0444
);
MODULE_PARM_DESC
(
acpi_force
,
"Force ACPI to be used"
);
MODULE_PARM_DESC
(
acpi_force
,
"Force ACPI to be used"
);
MODULE_AUTHOR
(
"Dave Jones <davej@codemonkey.org.uk>"
);
MODULE_AUTHOR
(
"Dave Jones <davej@codemonkey.org.uk>"
);
...
...
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
View file @
a7cf3f04
...
@@ -736,7 +736,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
...
@@ -736,7 +736,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
/* verify only 1 entry from the lo frequency table */
/* verify only 1 entry from the lo frequency table */
if
((
fid
<
HI_FID_TABLE_BOTTOM
)
&&
(
cntlofreq
++
))
{
if
((
fid
<
HI_FID_TABLE_BOTTOM
)
&&
(
cntlofreq
++
))
{
printk
(
KERN_ERR
PFX
"Too many lo freq table entries
\n
"
);
printk
(
KERN_ERR
PFX
"Too many lo freq table entries
\n
"
);
goto
err_out
;
goto
err_out
_mem
;
}
}
if
(
powernow_table
[
i
].
frequency
!=
(
data
->
acpi_data
.
states
[
i
].
core_frequency
*
1000
))
{
if
(
powernow_table
[
i
].
frequency
!=
(
data
->
acpi_data
.
states
[
i
].
core_frequency
*
1000
))
{
...
@@ -757,6 +757,10 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
...
@@ -757,6 +757,10 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
print_basics
(
data
);
print_basics
(
data
);
powernow_k8_acpi_pst_values
(
data
,
0
);
powernow_k8_acpi_pst_values
(
data
,
0
);
return
0
;
return
0
;
err_out_mem:
kfree
(
powernow_table
);
err_out:
err_out:
acpi_processor_unregister_performance
(
&
data
->
acpi_data
,
data
->
cpu
);
acpi_processor_unregister_performance
(
&
data
->
acpi_data
,
data
->
cpu
);
...
@@ -945,7 +949,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
...
@@ -945,7 +949,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
if
((
num_online_cpus
()
!=
1
)
||
(
num_possible_cpus
()
!=
1
))
{
if
((
num_online_cpus
()
!=
1
)
||
(
num_possible_cpus
()
!=
1
))
{
printk
(
KERN_INFO
PFX
"MP systems not supported by PSB BIOS structure
\n
"
);
printk
(
KERN_INFO
PFX
"MP systems not supported by PSB BIOS structure
\n
"
);
kfree
(
data
);
kfree
(
data
);
return
0
;
return
-
ENODEV
;
}
}
rc
=
find_psb_table
(
data
);
rc
=
find_psb_table
(
data
);
if
(
rc
)
{
if
(
rc
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment