Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
68c9f9fd
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
68c9f9fd
编写于
8月 07, 2007
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[SPARC64]: Fix hard-coding of cpu type output in /proc/cpuinfo on sun4v.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
46bcea77
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
8 deletion
+40
-8
arch/sparc64/kernel/cpu.c
arch/sparc64/kernel/cpu.c
+40
-8
未找到文件。
arch/sparc64/kernel/cpu.c
浏览文件 @
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
;
static
void
__init
sun4v_cpu_probe
(
void
)
{
struct
device_node
*
dp
;
const
char
*
compat
;
int
len
;
dp
=
of_find_node_by_name
(
NULL
,
"cpu"
);
if
(
!
dp
)
goto
no_compat
;
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_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
;
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
)
void
__init
cpu_probe
(
void
)
{
{
unsigned
long
ver
,
fpu_vers
,
manuf
,
impl
,
fprs
;
unsigned
long
ver
,
fpu_vers
,
manuf
,
impl
,
fprs
;
int
i
;
int
i
;
if
(
tlb_type
==
hypervisor
)
{
if
(
tlb_type
==
hypervisor
)
sparc_cpu_type
=
"UltraSparc T1 (Niagara)"
;
return
sun4v_cpu_probe
();
sparc_fpu_type
=
"UltraSparc T1 integrated FPU"
;
return
;
}
fprs
=
fprs_read
();
fprs
=
fprs_read
();
fprs_write
(
FPRS_FEF
);
fprs_write
(
FPRS_FEF
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录