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
82b5df7b
Commit
82b5df7b
authored
Nov 20, 2012
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bl-cpuinfo' of
git://linux-arm.org/linux-2.6-lp
into devel-stable
parents
e38eb34a
b4b8f770
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
35 deletions
+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
No files found.
arch/arm/include/asm/cpu.h
View file @
82b5df7b
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
struct
cpuinfo_arm
{
struct
cpuinfo_arm
{
struct
cpu
cpu
;
struct
cpu
cpu
;
u32
cpuid
;
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
unsigned
int
loops_per_jiffy
;
unsigned
int
loops_per_jiffy
;
#endif
#endif
...
...
arch/arm/kernel/setup.c
View file @
82b5df7b
...
@@ -843,12 +843,9 @@ static const char *hwcap_str[] = {
...
@@ -843,12 +843,9 @@ static const char *hwcap_str[] = {
static
int
c_show
(
struct
seq_file
*
m
,
void
*
v
)
static
int
c_show
(
struct
seq_file
*
m
,
void
*
v
)
{
{
int
i
;
int
i
,
j
;
u32
cpuid
;
seq_printf
(
m
,
"Processor
\t
: %s rev %d (%s)
\n
"
,
cpu_name
,
read_cpuid_id
()
&
15
,
elf_platform
);
#if defined(CONFIG_SMP)
for_each_online_cpu
(
i
)
{
for_each_online_cpu
(
i
)
{
/*
/*
* glibc reads /proc/cpuinfo to determine the number of
* glibc reads /proc/cpuinfo to determine the number of
...
@@ -856,45 +853,48 @@ static int c_show(struct seq_file *m, void *v)
...
@@ -856,45 +853,48 @@ static int c_show(struct seq_file *m, void *v)
* "processor". Give glibc what it expects.
* "processor". Give glibc what it expects.
*/
*/
seq_printf
(
m
,
"processor
\t
: %d
\n
"
,
i
);
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
/
(
500000UL
/
HZ
),
(
per_cpu
(
cpu_data
,
i
).
loops_per_jiffy
/
(
5000UL
/
HZ
))
%
100
);
(
per_cpu
(
cpu_data
,
i
).
loops_per_jiffy
/
(
5000UL
/
HZ
))
%
100
);
}
#else
#else
/* CONFIG_SMP */
seq_printf
(
m
,
"BogoMIPS
\t
: %lu.%02lu
\n
"
,
seq_printf
(
m
,
"BogoMIPS
\t
: %lu.%02lu
\n
"
,
loops_per_jiffy
/
(
500000
/
HZ
),
loops_per_jiffy
/
(
500000
/
HZ
),
(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
);
(
loops_per_jiffy
/
(
5000
/
HZ
))
%
100
);
#endif
#endif
/* dump out the processor features */
seq_puts
(
m
,
"Features
\t
: "
);
/* dump out the processor features */
for
(
j
=
0
;
hwcap_str
[
j
];
j
++
)
seq_puts
(
m
,
"Features
\t
: "
);
if
(
elf_hwcap
&
(
1
<<
j
))
seq_printf
(
m
,
"%s "
,
hwcap_str
[
j
]);
for
(
i
=
0
;
hwcap_str
[
i
];
i
++
)
if
(
elf_hwcap
&
(
1
<<
i
))
seq_printf
(
m
,
"%s "
,
hwcap_str
[
i
]);
seq_printf
(
m
,
"
\n
CPU implementer
\t
: 0x%02x
\n
"
,
read_cpuid_id
()
>>
24
);
seq_printf
(
m
,
"
\n
CPU implementer
\t
: 0x%02x
\n
"
,
cpuid
>>
24
);
seq_printf
(
m
,
"CPU architecture: %s
\n
"
,
proc_arch
[
cpu_architecture
()]);
seq_printf
(
m
,
"CPU architecture: %s
\n
"
,
proc_arch
[
cpu_architecture
()]);
if
((
read_cpuid_id
()
&
0x0008f000
)
==
0x00000000
)
{
if
((
cpuid
&
0x0008f000
)
==
0x00000000
)
{
/* pre-ARM7 */
/* pre-ARM7 */
seq_printf
(
m
,
"CPU part
\t
: %07x
\n
"
,
read_cpuid_id
()
>>
4
);
seq_printf
(
m
,
"CPU part
\t
: %07x
\n
"
,
cpuid
>>
4
);
}
else
{
if
((
read_cpuid_id
()
&
0x0008f000
)
==
0x00007000
)
{
/* ARM7 */
seq_printf
(
m
,
"CPU variant
\t
: 0x%02x
\n
"
,
(
read_cpuid_id
()
>>
16
)
&
127
);
}
else
{
}
else
{
/* post-ARM7 */
if
((
cpuid
&
0x0008f000
)
==
0x00007000
)
{
seq_printf
(
m
,
"CPU variant
\t
: 0x%x
\n
"
,
/* ARM7 */
(
read_cpuid_id
()
>>
20
)
&
15
);
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
"
,
seq_printf
(
m
,
"CPU revision
\t
: %d
\n\n
"
,
cpuid
&
15
);
(
read_cpuid_id
()
>>
4
)
&
0xfff
);
}
}
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
,
"Hardware
\t
: %s
\n
"
,
machine_name
);
seq_printf
(
m
,
"Revision
\t
: %04x
\n
"
,
system_rev
);
seq_printf
(
m
,
"Revision
\t
: %04x
\n
"
,
system_rev
);
...
...
arch/arm/kernel/smp.c
View file @
82b5df7b
...
@@ -281,6 +281,7 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid)
...
@@ -281,6 +281,7 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid)
struct
cpuinfo_arm
*
cpu_info
=
&
per_cpu
(
cpu_data
,
cpuid
);
struct
cpuinfo_arm
*
cpu_info
=
&
per_cpu
(
cpu_data
,
cpuid
);
cpu_info
->
loops_per_jiffy
=
loops_per_jiffy
;
cpu_info
->
loops_per_jiffy
=
loops_per_jiffy
;
cpu_info
->
cpuid
=
read_cpuid_id
();
store_cpu_topology
(
cpuid
);
store_cpu_topology
(
cpuid
);
}
}
...
...
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