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
f5049cdf
Commit
f5049cdf
authored
Jan 19, 2005
by
Russell King
Browse files
Options
Browse Files
Download
Plain Diff
Merge flint.arm.linux.org.uk:/usr/src/bk/linux-2.6-smp
into flint.arm.linux.org.uk:/usr/src/bk/linux-2.6-rmk
parents
43db7fe9
c0ac4d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
arch/arm/kernel/setup.c
arch/arm/kernel/setup.c
+9
-9
No files found.
arch/arm/kernel/setup.c
View file @
f5049cdf
...
@@ -221,12 +221,12 @@ static const char *proc_arch[] = {
...
@@ -221,12 +221,12 @@ static const char *proc_arch[] = {
#define CACHE_M(y) ((y) & (1 << 2))
#define CACHE_M(y) ((y) & (1 << 2))
#define CACHE_LINE(y) ((y) & 3)
#define CACHE_LINE(y) ((y) & 3)
static
inline
void
dump_cache
(
const
char
*
prefix
,
unsigned
int
cache
)
static
inline
void
dump_cache
(
const
char
*
prefix
,
int
cpu
,
unsigned
int
cache
)
{
{
unsigned
int
mult
=
2
+
(
CACHE_M
(
cache
)
?
1
:
0
);
unsigned
int
mult
=
2
+
(
CACHE_M
(
cache
)
?
1
:
0
);
printk
(
"%s: %d bytes, associativity %d, %d byte lines, %d sets
\n
"
,
printk
(
"
CPU%u:
%s: %d bytes, associativity %d, %d byte lines, %d sets
\n
"
,
prefix
,
cpu
,
prefix
,
mult
<<
(
8
+
CACHE_SIZE
(
cache
)),
mult
<<
(
8
+
CACHE_SIZE
(
cache
)),
(
mult
<<
CACHE_ASSOC
(
cache
))
>>
1
,
(
mult
<<
CACHE_ASSOC
(
cache
))
>>
1
,
8
<<
CACHE_LINE
(
cache
),
8
<<
CACHE_LINE
(
cache
),
...
@@ -234,18 +234,18 @@ static inline void dump_cache(const char *prefix, unsigned int cache)
...
@@ -234,18 +234,18 @@ static inline void dump_cache(const char *prefix, unsigned int cache)
CACHE_LINE
(
cache
)));
CACHE_LINE
(
cache
)));
}
}
static
void
__init
dump_cpu_info
(
void
)
static
void
__init
dump_cpu_info
(
int
cpu
)
{
{
unsigned
int
info
=
read_cpuid
(
CPUID_CACHETYPE
);
unsigned
int
info
=
read_cpuid
(
CPUID_CACHETYPE
);
if
(
info
!=
processor_id
)
{
if
(
info
!=
processor_id
)
{
printk
(
"CPU
: D %s %s cache
\n
"
,
cache_is_vivt
()
?
"VIVT"
:
"VIPT"
,
printk
(
"CPU
%u: D %s %s cache
\n
"
,
cpu
,
cache_is_vivt
()
?
"VIVT"
:
"VIPT"
,
cache_types
[
CACHE_TYPE
(
info
)]);
cache_types
[
CACHE_TYPE
(
info
)]);
if
(
CACHE_S
(
info
))
{
if
(
CACHE_S
(
info
))
{
dump_cache
(
"
CPU: I cache"
,
CACHE_ISIZE
(
info
));
dump_cache
(
"
I cache"
,
cpu
,
CACHE_ISIZE
(
info
));
dump_cache
(
"
CPU: D cache"
,
CACHE_DSIZE
(
info
));
dump_cache
(
"
D cache"
,
cpu
,
CACHE_DSIZE
(
info
));
}
else
{
}
else
{
dump_cache
(
"
CPU: cache"
,
CACHE_ISIZE
(
info
));
dump_cache
(
"
cache"
,
cpu
,
CACHE_ISIZE
(
info
));
}
}
}
}
}
}
...
@@ -310,7 +310,7 @@ static void __init setup_processor(void)
...
@@ -310,7 +310,7 @@ static void __init setup_processor(void)
cpu_name
,
processor_id
,
(
int
)
processor_id
&
15
,
cpu_name
,
processor_id
,
(
int
)
processor_id
&
15
,
proc_arch
[
cpu_architecture
()]);
proc_arch
[
cpu_architecture
()]);
dump_cpu_info
();
dump_cpu_info
(
smp_processor_id
()
);
sprintf
(
system_utsname
.
machine
,
"%s%c"
,
list
->
arch_name
,
ENDIANNESS
);
sprintf
(
system_utsname
.
machine
,
"%s%c"
,
list
->
arch_name
,
ENDIANNESS
);
sprintf
(
elf_platform
,
"%s%c"
,
list
->
elf_name
,
ENDIANNESS
);
sprintf
(
elf_platform
,
"%s%c"
,
list
->
elf_name
,
ENDIANNESS
);
...
...
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