Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b641fe01
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b641fe01
编写于
12月 12, 2006
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: Use early_param() for earlyprintk parsing.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
e2dfb912
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
31 deletion
+16
-31
arch/sh/kernel/early_printk.c
arch/sh/kernel/early_printk.c
+11
-9
arch/sh/kernel/setup.c
arch/sh/kernel/setup.c
+5
-22
未找到文件。
arch/sh/kernel/early_printk.c
浏览文件 @
b641fe01
...
...
@@ -144,16 +144,16 @@ static struct console *early_console =
;
static
int
__initdata
keep_early
;
static
int
early_console_initialized
;
int
__init
setup_early_printk
(
char
*
opt
)
int
__init
setup_early_printk
(
char
*
buf
)
{
char
*
space
;
char
buf
[
256
]
;
if
(
!
buf
)
return
0
;
strlcpy
(
buf
,
opt
,
sizeof
(
buf
));
space
=
strchr
(
buf
,
' '
);
if
(
space
)
*
space
=
0
;
if
(
early_console_initialized
)
return
0
;
early_console_initialized
=
1
;
if
(
strstr
(
buf
,
"keep"
))
keep_early
=
1
;
...
...
@@ -175,12 +175,14 @@ int __init setup_early_printk(char *opt)
if
(
likely
(
early_console
))
register_console
(
early_console
);
return
1
;
return
0
;
}
__setup
(
"earlyprintk=
"
,
setup_early_printk
);
early_param
(
"earlyprintk
"
,
setup_early_printk
);
void
__init
disable_early_printk
(
void
)
{
if
(
!
early_console_initialized
||
!
early_console
)
return
;
if
(
!
keep_early
)
{
printk
(
"disabling early console
\n
"
);
unregister_console
(
early_console
);
...
...
arch/sh/kernel/setup.c
浏览文件 @
b641fe01
...
...
@@ -84,8 +84,7 @@ unsigned long memory_start, memory_end;
static
inline
void
parse_cmdline
(
char
**
cmdline_p
,
char
mv_name
[
MV_NAME_SIZE
],
struct
sh_machine_vector
**
mvp
,
unsigned
long
*
mv_io_base
,
int
*
mv_mmio_enable
)
unsigned
long
*
mv_io_base
)
{
char
c
=
' '
,
*
to
=
command_line
,
*
from
=
COMMAND_LINE
;
int
len
=
0
;
...
...
@@ -112,23 +111,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
}
}
#ifdef CONFIG_EARLY_PRINTK
if
(
c
==
' '
&&
!
memcmp
(
from
,
"earlyprintk="
,
12
))
{
char
*
ep_end
;
if
(
to
!=
command_line
)
to
--
;
from
+=
12
;
ep_end
=
strchr
(
from
,
' '
);
setup_early_printk
(
from
);
printk
(
"early console enabled
\n
"
);
from
=
ep_end
;
}
#endif
if
(
c
==
' '
&&
!
memcmp
(
from
,
"sh_mv="
,
6
))
{
char
*
mv_end
;
char
*
mv_comma
;
...
...
@@ -145,7 +127,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
int
ints
[
3
];
get_options
(
mv_comma
+
1
,
ARRAY_SIZE
(
ints
),
ints
);
*
mv_io_base
=
ints
[
1
];
*
mv_mmio_enable
=
ints
[
2
];
mv_len
=
mv_comma
-
from
;
}
else
{
mv_len
=
mv_end
-
from
;
...
...
@@ -158,6 +139,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
*
mvp
=
get_mv_byname
(
mv_name
);
}
c
=
*
(
from
++
);
if
(
!
c
)
break
;
...
...
@@ -177,9 +159,8 @@ static int __init sh_mv_setup(char **cmdline_p)
struct
sh_machine_vector
*
mv
=
NULL
;
char
mv_name
[
MV_NAME_SIZE
]
=
""
;
unsigned
long
mv_io_base
=
0
;
int
mv_mmio_enable
=
0
;
parse_cmdline
(
cmdline_p
,
mv_name
,
&
mv
,
&
mv_io_base
,
&
mv_mmio_enable
);
parse_cmdline
(
cmdline_p
,
mv_name
,
&
mv
,
&
mv_io_base
);
#ifdef CONFIG_SH_UNKNOWN
if
(
mv
==
NULL
)
{
...
...
@@ -258,6 +239,7 @@ void __init setup_arch(char **cmdline_p)
sh_mv_setup
(
cmdline_p
);
/*
* Find the highest page frame number we have available
*/
...
...
@@ -305,6 +287,7 @@ void __init setup_arch(char **cmdline_p)
PFN_PHYS
(
pages
));
}
/*
* Reserve the kernel text and
* Reserve the bootmem bitmap. We do this in two steps (first step
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录