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
9acfd6f5
Commit
9acfd6f5
authored
Nov 22, 2019
by
Paul Walmsley
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'next/isa-string' into for-next
parents
69049d52
1edd28b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
42 deletions
+3
-42
arch/riscv/kernel/cpu.c
arch/riscv/kernel/cpu.c
+3
-42
No files found.
arch/riscv/kernel/cpu.c
View file @
9acfd6f5
...
...
@@ -46,51 +46,12 @@ int riscv_of_processor_hartid(struct device_node *node)
#ifdef CONFIG_PROC_FS
static
void
print_isa
(
struct
seq_file
*
f
,
const
char
*
orig_
isa
)
static
void
print_isa
(
struct
seq_file
*
f
,
const
char
*
isa
)
{
static
const
char
*
ext
=
"mafdcsu"
;
const
char
*
isa
=
orig_isa
;
const
char
*
e
;
/*
* Linux doesn't support rv32e or rv128i, and we only support booting
* kernels on harts with the same ISA that the kernel is compiled for.
*/
#if defined(CONFIG_32BIT)
if
(
strncmp
(
isa
,
"rv32i"
,
5
)
!=
0
)
return
;
#elif defined(CONFIG_64BIT)
if
(
strncmp
(
isa
,
"rv64i"
,
5
)
!=
0
)
return
;
#endif
/* Print the base ISA, as we already know it's legal. */
/* Print the entire ISA as it is */
seq_puts
(
f
,
"isa
\t\t
: "
);
seq_write
(
f
,
isa
,
5
);
isa
+=
5
;
/*
* Check the rest of the ISA string for valid extensions, printing those
* we find. RISC-V ISA strings define an order, so we only print the
* extension bits when they're in order. Hide the supervisor (S)
* extension from userspace as it's not accessible from there.
*/
for
(
e
=
ext
;
*
e
!=
'\0'
;
++
e
)
{
if
(
isa
[
0
]
==
e
[
0
])
{
if
(
isa
[
0
]
!=
's'
)
seq_write
(
f
,
isa
,
1
);
isa
++
;
}
}
seq_write
(
f
,
isa
,
strlen
(
isa
));
seq_puts
(
f
,
"
\n
"
);
/*
* If we were given an unsupported ISA in the device tree then print
* a bit of info describing what went wrong.
*/
if
(
isa
[
0
]
!=
'\0'
)
pr_info
(
"unsupported ISA
\"
%s
\"
in device tree
\n
"
,
orig_isa
);
}
static
void
print_mmu
(
struct
seq_file
*
f
,
const
char
*
mmu_type
)
...
...
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