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
nexedi
linux
Commits
578418cb
Commit
578418cb
authored
Dec 03, 2002
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Decode feature bits added by SDM2.1 (spontaneous deferral &
16-byte atomic ops).
parent
cc2b9554
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
arch/ia64/kernel/setup.c
arch/ia64/kernel/setup.c
+25
-6
No files found.
arch/ia64/kernel/setup.c
View file @
578418cb
...
@@ -469,9 +469,18 @@ show_cpuinfo (struct seq_file *m, void *v)
...
@@ -469,9 +469,18 @@ show_cpuinfo (struct seq_file *m, void *v)
# define lpj loops_per_jiffy
# define lpj loops_per_jiffy
# define cpunum 0
# define cpunum 0
#endif
#endif
char
family
[
32
],
features
[
128
],
*
cp
;
static
struct
{
unsigned
long
mask
;
const
char
*
feature_name
;
}
feature_bits
[]
=
{
{
1UL
<<
0
,
"branchlong"
},
{
1UL
<<
1
,
"spontaneous deferral"
},
{
1UL
<<
2
,
"16-byte atomic ops"
}
};
char
family
[
32
],
features
[
128
],
*
cp
,
sep
;
struct
cpuinfo_ia64
*
c
=
v
;
struct
cpuinfo_ia64
*
c
=
v
;
unsigned
long
mask
;
unsigned
long
mask
;
int
i
;
mask
=
c
->
features
;
mask
=
c
->
features
;
...
@@ -484,13 +493,23 @@ show_cpuinfo (struct seq_file *m, void *v)
...
@@ -484,13 +493,23 @@ show_cpuinfo (struct seq_file *m, void *v)
/* build the feature string: */
/* build the feature string: */
memcpy
(
features
,
" standard"
,
10
);
memcpy
(
features
,
" standard"
,
10
);
cp
=
features
;
cp
=
features
;
if
(
mask
&
1
)
{
sep
=
0
;
strcpy
(
cp
,
" branchlong"
);
for
(
i
=
0
;
i
<
sizeof
(
feature_bits
)
/
sizeof
(
feature_bits
[
0
]);
++
i
)
{
cp
=
strchr
(
cp
,
'\0'
);
if
(
mask
&
feature_bits
[
i
].
mask
)
{
mask
&=
~
1UL
;
if
(
sep
)
*
cp
++
=
sep
;
sep
=
','
;
*
cp
++
=
' '
;
strcpy
(
cp
,
feature_bits
[
i
].
feature_name
);
mask
&=
~
feature_bits
[
i
].
mask
;
}
}
}
if
(
mask
)
if
(
mask
)
{
/* print unknown features as a hex value: */
if
(
sep
)
*
cp
++
=
sep
;
sprintf
(
cp
,
" 0x%lx"
,
mask
);
sprintf
(
cp
,
" 0x%lx"
,
mask
);
}
seq_printf
(
m
,
seq_printf
(
m
,
"processor : %d
\n
"
"processor : %d
\n
"
...
...
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