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
Kirill Smelkov
linux
Commits
f926cac3
Commit
f926cac3
authored
Oct 07, 2002
by
Dave Jones
Committed by
Linus Torvalds
Oct 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] use cpu_has macros
Code cleanup..
parent
88458af4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
arch/i386/kernel/cpu/amd.c
arch/i386/kernel/cpu/amd.c
+1
-1
arch/i386/kernel/cpu/intel.c
arch/i386/kernel/cpu/intel.c
+2
-3
arch/i386/kernel/cpu/proc.c
arch/i386/kernel/cpu/proc.c
+1
-1
No files found.
arch/i386/kernel/cpu/amd.c
View file @
f926cac3
...
@@ -141,7 +141,7 @@ static void __init init_amd(struct cpuinfo_x86 *c)
...
@@ -141,7 +141,7 @@ static void __init init_amd(struct cpuinfo_x86 *c)
* here.
* here.
*/
*/
if
(
c
->
x86_model
==
6
||
c
->
x86_model
==
7
)
{
if
(
c
->
x86_model
==
6
||
c
->
x86_model
==
7
)
{
if
(
!
test_bit
(
X86_FEATURE_XMM
,
c
->
x86_capability
))
{
if
(
!
cpu_has
(
c
,
X86_FEATURE_XMM
))
{
printk
(
KERN_INFO
"Enabling disabled K7/SSE Support.
\n
"
);
printk
(
KERN_INFO
"Enabling disabled K7/SSE Support.
\n
"
);
rdmsr
(
MSR_K7_HWCR
,
l
,
h
);
rdmsr
(
MSR_K7_HWCR
,
l
,
h
);
l
&=
~
0x00008000
;
l
&=
~
0x00008000
;
...
...
arch/i386/kernel/cpu/intel.c
View file @
f926cac3
...
@@ -62,8 +62,7 @@ int __init ppro_with_ram_bug(void)
...
@@ -62,8 +62,7 @@ int __init ppro_with_ram_bug(void)
static
void
__init
squash_the_stupid_serial_number
(
struct
cpuinfo_x86
*
c
)
static
void
__init
squash_the_stupid_serial_number
(
struct
cpuinfo_x86
*
c
)
{
{
if
(
test_bit
(
X86_FEATURE_PN
,
c
->
x86_capability
)
&&
if
(
cpu_has
(
c
,
X86_FEATURE_PN
)
&&
disable_x86_serial_nr
)
{
disable_x86_serial_nr
)
{
/* Disable processor serial number */
/* Disable processor serial number */
unsigned
long
lo
,
hi
;
unsigned
long
lo
,
hi
;
rdmsr
(
MSR_IA32_BBL_CR_CTL
,
lo
,
hi
);
rdmsr
(
MSR_IA32_BBL_CR_CTL
,
lo
,
hi
);
...
@@ -292,7 +291,7 @@ static void __init init_intel(struct cpuinfo_x86 *c)
...
@@ -292,7 +291,7 @@ static void __init init_intel(struct cpuinfo_x86 *c)
strcpy
(
c
->
x86_model_id
,
p
);
strcpy
(
c
->
x86_model_id
,
p
);
#ifdef CONFIG_X86_HT
#ifdef CONFIG_X86_HT
if
(
test_bit
(
X86_FEATURE_HT
,
c
->
x86_capability
)
&&
!
disable_P4_HT
)
{
if
(
cpu_has
(
c
,
X86_FEATURE_HT
)
&&
!
disable_P4_HT
)
{
extern
int
phys_proc_id
[
NR_CPUS
];
extern
int
phys_proc_id
[
NR_CPUS
];
u32
eax
,
ebx
,
ecx
,
edx
;
u32
eax
,
ebx
,
ecx
,
edx
;
...
...
arch/i386/kernel/cpu/proc.c
View file @
f926cac3
...
@@ -66,7 +66,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
...
@@ -66,7 +66,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
else
else
seq_printf
(
m
,
"stepping
\t
: unknown
\n
"
);
seq_printf
(
m
,
"stepping
\t
: unknown
\n
"
);
if
(
test_bit
(
X86_FEATURE_TSC
,
c
->
x86_capability
)
)
{
if
(
cpu_has
(
c
,
X86_FEATURE_TSC
)
)
{
seq_printf
(
m
,
"cpu MHz
\t\t
: %lu.%03lu
\n
"
,
seq_printf
(
m
,
"cpu MHz
\t\t
: %lu.%03lu
\n
"
,
cpu_khz
/
1000
,
(
cpu_khz
%
1000
));
cpu_khz
/
1000
,
(
cpu_khz
%
1000
));
}
}
...
...
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