Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
82b5df7b
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
82b5df7b
编写于
11月 20, 2012
作者:
R
Russell King
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bl-cpuinfo' of
git://linux-arm.org/linux-2.6-lp
into devel-stable
上级
e38eb34a
b4b8f770
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
35 deletion
+37
-35
arch/arm/include/asm/cpu.h
arch/arm/include/asm/cpu.h
+1
-0
arch/arm/kernel/setup.c
arch/arm/kernel/setup.c
+35
-35
arch/arm/kernel/smp.c
arch/arm/kernel/smp.c
+1
-0
未找到文件。
arch/arm/include/asm/cpu.h
浏览文件 @
82b5df7b
...
...
@@ -15,6 +15,7 @@
struct
cpuinfo_arm
{
struct
cpu
cpu
;
u32
cpuid
;
#ifdef CONFIG_SMP
unsigned
int
loops_per_jiffy
;
#endif
...
...
arch/arm/kernel/setup.c
浏览文件 @
82b5df7b
...
...
@@ -843,12 +843,9 @@ static const char *hwcap_str[] = {
static
int
c_show
(
struct
seq_file
*
m
,
void
*
v
)
{
int
i
;
seq_printf
(
m
,
"Processor
\t
: %s rev %d (%s)
\n
"
,
cpu_name
,
read_cpuid_id
()
&
15
,
elf_platform
);
int
i
,
j
;
u32
cpuid
;
#if defined(CONFIG_SMP)
for_each_online_cpu
(
i
)
{
/*
* glibc reads /proc/cpuinfo to determine the number of
...
...
@@ -856,45 +853,48 @@ static int c_show(struct seq_file *m, void *v)
* "processor". Give glibc what it expects.
*/
seq_printf
(
m
,
"processor
\t
: %d
\n
"
,
i
);
seq_printf
(
m
,
"BogoMIPS
\t
: %lu.%02lu
\n\n
"
,
cpuid
=
is_smp
()
?
per_cpu
(
cpu_data
,
i
).
cpuid
:
read_cpuid_id
();
seq_printf
(
m
,
"model name
\t
: %s rev %d (%s)
\n
"
,
cpu_name
,
cpuid
&
15
,
elf_platform
);
#if defined(CONFIG_SMP)
seq_printf
(
m
,
"BogoMIPS
\t
: %lu.%02lu
\n
"
,
per_cpu
(
cpu_data
,
i
).
loops_per_jiffy
/
(
500000UL
/
HZ
),
(
per_cpu
(
cpu_data
,
i
).
loops_per_jiffy
/
(
5000UL
/
HZ
))
%
100
);
}
#else
/* CONFIG_SMP */
seq_printf
(
m
,
"BogoMIPS
\t
: %lu.%02lu
\n
"
,
loops_per_jiffy
/
(
500000
/
HZ
),
(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
);
#else
seq_printf
(
m
,
"BogoMIPS
\t
: %lu.%02lu
\n
"
,
loops_per_jiffy
/
(
500000
/
HZ
),
(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
);
#endif
/* dump out the processor features */
seq_puts
(
m
,
"Features
\t
: "
);
/* dump out the processor features */
seq_puts
(
m
,
"Features
\t
: "
);
for
(
i
=
0
;
hwcap_str
[
i
];
i
++
)
if
(
elf_hwcap
&
(
1
<<
i
))
seq_printf
(
m
,
"%s "
,
hwcap_str
[
i
]);
for
(
j
=
0
;
hwcap_str
[
j
];
j
++
)
if
(
elf_hwcap
&
(
1
<<
j
))
seq_printf
(
m
,
"%s "
,
hwcap_str
[
j
]);
seq_printf
(
m
,
"
\n
CPU implementer
\t
: 0x%02x
\n
"
,
read_cpuid_id
()
>>
24
);
seq_printf
(
m
,
"CPU architecture: %s
\n
"
,
proc_arch
[
cpu_architecture
()]);
seq_printf
(
m
,
"
\n
CPU implementer
\t
: 0x%02x
\n
"
,
cpuid
>>
24
);
seq_printf
(
m
,
"CPU architecture: %s
\n
"
,
proc_arch
[
cpu_architecture
()]);
if
((
read_cpuid_id
()
&
0x0008f000
)
==
0x00000000
)
{
/* pre-ARM7 */
seq_printf
(
m
,
"CPU part
\t
: %07x
\n
"
,
read_cpuid_id
()
>>
4
);
}
else
{
if
((
read_cpuid_id
()
&
0x0008f000
)
==
0x00007000
)
{
/* ARM7 */
seq_printf
(
m
,
"CPU variant
\t
: 0x%02x
\n
"
,
(
read_cpuid_id
()
>>
16
)
&
127
);
if
((
cpuid
&
0x0008f000
)
==
0x00000000
)
{
/* pre-ARM7 */
seq_printf
(
m
,
"CPU part
\t
: %07x
\n
"
,
cpuid
>>
4
);
}
else
{
/* post-ARM7 */
seq_printf
(
m
,
"CPU variant
\t
: 0x%x
\n
"
,
(
read_cpuid_id
()
>>
20
)
&
15
);
if
((
cpuid
&
0x0008f000
)
==
0x00007000
)
{
/* ARM7 */
seq_printf
(
m
,
"CPU variant
\t
: 0x%02x
\n
"
,
(
cpuid
>>
16
)
&
127
);
}
else
{
/* post-ARM7 */
seq_printf
(
m
,
"CPU variant
\t
: 0x%x
\n
"
,
(
cpuid
>>
20
)
&
15
);
}
seq_printf
(
m
,
"CPU part
\t
: 0x%03x
\n
"
,
(
cpuid
>>
4
)
&
0xfff
);
}
seq_printf
(
m
,
"CPU part
\t
: 0x%03x
\n
"
,
(
read_cpuid_id
()
>>
4
)
&
0xfff
);
seq_printf
(
m
,
"CPU revision
\t
: %d
\n\n
"
,
cpuid
&
15
);
}
seq_printf
(
m
,
"CPU revision
\t
: %d
\n
"
,
read_cpuid_id
()
&
15
);
seq_puts
(
m
,
"
\n
"
);
seq_printf
(
m
,
"Hardware
\t
: %s
\n
"
,
machine_name
);
seq_printf
(
m
,
"Revision
\t
: %04x
\n
"
,
system_rev
);
...
...
arch/arm/kernel/smp.c
浏览文件 @
82b5df7b
...
...
@@ -281,6 +281,7 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid)
struct
cpuinfo_arm
*
cpu_info
=
&
per_cpu
(
cpu_data
,
cpuid
);
cpu_info
->
loops_per_jiffy
=
loops_per_jiffy
;
cpu_info
->
cpuid
=
read_cpuid_id
();
store_cpu_topology
(
cpuid
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录