Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
68c9f9fd
Commit
68c9f9fd
authored
Aug 07, 2007
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Fix hard-coding of cpu type output in /proc/cpuinfo on sun4v.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
46bcea77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
8 deletions
+40
-8
arch/sparc64/kernel/cpu.c
arch/sparc64/kernel/cpu.c
+40
-8
No files found.
arch/sparc64/kernel/cpu.c
View file @
68c9f9fd
/* cpu.c: Dinky routines to look for the kind of Sparc cpu
/* cpu.c: Dinky routines to look for the kind of Sparc cpu
* we are on.
* we are on.
*
*
* Copyright (C) 1996
David S. Miller (davem@caip.rutgers.edu
)
* Copyright (C) 1996
, 2007 David S. Miller (davem@davemloft.net
)
*/
*/
#include <linux/kernel.h>
#include <linux/kernel.h>
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <asm/fpumacro.h>
#include <asm/fpumacro.h>
#include <asm/cpudata.h>
#include <asm/cpudata.h>
#include <asm/spitfire.h>
#include <asm/spitfire.h>
#include <asm/prom.h>
DEFINE_PER_CPU
(
cpuinfo_sparc
,
__cpu_data
)
=
{
0
};
DEFINE_PER_CPU
(
cpuinfo_sparc
,
__cpu_data
)
=
{
0
};
...
@@ -61,21 +62,52 @@ struct cpu_iu_info linux_sparc_chips[] = {
...
@@ -61,21 +62,52 @@ struct cpu_iu_info linux_sparc_chips[] = {
#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)
#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)
char
*
sparc_cpu_type
=
"cpu-oops"
;
char
*
sparc_cpu_type
;
char
*
sparc_fpu_type
=
"fpu-oops"
;
char
*
sparc_fpu_type
;
unsigned
int
fsr_storage
;
unsigned
int
fsr_storage
;
void
__init
cpu_probe
(
void
)
static
void
__init
sun4v_
cpu_probe
(
void
)
{
{
unsigned
long
ver
,
fpu_vers
,
manuf
,
impl
,
fprs
;
struct
device_node
*
dp
;
int
i
;
const
char
*
compat
;
int
len
;
dp
=
of_find_node_by_name
(
NULL
,
"cpu"
);
if
(
!
dp
)
goto
no_compat
;
if
(
tlb_type
==
hypervisor
)
{
compat
=
of_get_property
(
dp
,
"compatible"
,
&
len
);
if
(
!
compat
)
goto
no_compat
;
if
(
of_find_in_proplist
(
compat
,
"SUNW,UltraSPARC-T1"
,
len
))
{
sparc_cpu_type
=
"UltraSparc T1 (Niagara)"
;
sparc_cpu_type
=
"UltraSparc T1 (Niagara)"
;
sparc_fpu_type
=
"UltraSparc T1 integrated FPU"
;
sparc_fpu_type
=
"UltraSparc T1 integrated FPU"
;
}
else
if
(
of_find_in_proplist
(
compat
,
"SUNW,UltraSPARC-T2"
,
len
))
{
sparc_cpu_type
=
"UltraSparc T2 (Niagara2)"
;
sparc_fpu_type
=
"UltraSparc T2 integrated FPU"
;
}
else
goto
unknown
;
return
;
return
;
}
no_compat:
compat
=
"no property"
;
unknown:
printk
(
KERN_WARNING
"CPU: Unknown sun4v cpu type [%s]
\n
"
,
compat
);
sparc_cpu_type
=
"Unknown SUN4V CPU"
;
sparc_fpu_type
=
"Unknown SUN4V FPU"
;
}
void
__init
cpu_probe
(
void
)
{
unsigned
long
ver
,
fpu_vers
,
manuf
,
impl
,
fprs
;
int
i
;
if
(
tlb_type
==
hypervisor
)
return
sun4v_cpu_probe
();
fprs
=
fprs_read
();
fprs
=
fprs_read
();
fprs_write
(
FPRS_FEF
);
fprs_write
(
FPRS_FEF
);
...
...
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