Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
3e28ad7b
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3e28ad7b
编写于
7月 12, 2009
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'sh/compressors' and 'sh/ftrace'
上级
040f43e0
e460ab27
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
60 addition
and
73 deletion
+60
-73
arch/sh/Kconfig.debug
arch/sh/Kconfig.debug
+8
-12
arch/sh/Makefile
arch/sh/Makefile
+4
-0
arch/sh/boot/compressed/Makefile
arch/sh/boot/compressed/Makefile
+1
-1
arch/sh/kernel/irq.c
arch/sh/kernel/irq.c
+0
-17
arch/sh/kernel/sh_ksyms_32.c
arch/sh/kernel/sh_ksyms_32.c
+2
-2
arch/sh/lib/Makefile
arch/sh/lib/Makefile
+1
-2
arch/sh/lib/mcount.S
arch/sh/lib/mcount.S
+44
-39
未找到文件。
arch/sh/Kconfig.debug
浏览文件 @
3e28ad7b
...
@@ -61,12 +61,14 @@ config EARLY_PRINTK
...
@@ -61,12 +61,14 @@ config EARLY_PRINTK
select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
the kernel command line option to toggle back and forth.
the kernel command line option to toggle back and forth.
config
DEBUG_STACKOVERFLOW
config
STACK_DEBUG
bool "Check for stack overflows"
bool "Check for stack overflows"
depends on DEBUG_KERNEL && SUPERH32
depends on DEBUG_KERNEL && SUPERH32
help
help
This option will cause messages to be printed if free stack space
This option will cause messages to be printed if free stack space
drops below a certain limit.
drops below a certain limit. Saying Y here will add overhead to
every function call and will therefore incur a major
performance hit. Most users should say N.
config DEBUG_STACK_USAGE
config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation"
bool "Stack utilization instrumentation"
...
@@ -123,15 +125,9 @@ config SH64_SR_WATCH
...
@@ -123,15 +125,9 @@ config SH64_SR_WATCH
bool
"Debug: set SR.WATCH to enable hardware watchpoints and trace"
bool
"Debug: set SR.WATCH to enable hardware watchpoints and trace"
depends
on
SUPERH64
depends
on
SUPERH64
config
STACK_DEBUG
config
MCOUNT
bool
"Enable diagnostic checks of the kernel stack"
def_bool
y
depends
on
FUNCTION_TRACER
depends
on
SUPERH32
select
DEBUG_STACKOVERFLOW
depends
on
STACK_DEBUG
||
FUNCTION_TRACER
default
n
help
This
option
allows
checks
to
be
performed
on
the
kernel
stack
at
runtime
.
Saying
Y
here
will
add
overhead
to
every
function
call
and
will
therefore
incur
a
major
performance
hit
.
Most
users
should
say
N
.
endmenu
endmenu
arch/sh/Makefile
浏览文件 @
3e28ad7b
...
@@ -186,6 +186,10 @@ KBUILD_CFLAGS += -pipe $(cflags-y)
...
@@ -186,6 +186,10 @@ KBUILD_CFLAGS += -pipe $(cflags-y)
KBUILD_CPPFLAGS
+=
$
(
cflags-y
)
KBUILD_CPPFLAGS
+=
$
(
cflags-y
)
KBUILD_AFLAGS
+=
$
(
cflags-y
)
KBUILD_AFLAGS
+=
$
(
cflags-y
)
ifeq
($(CONFIG_MCOUNT),y)
KBUILD_CFLAGS
+=
-pg
endif
libs-$(CONFIG_SUPERH32)
:=
arch
/sh/lib/
$
(
libs-y
)
libs-$(CONFIG_SUPERH32)
:=
arch
/sh/lib/
$
(
libs-y
)
libs-$(CONFIG_SUPERH64)
:=
arch
/sh/lib64/
$
(
libs-y
)
libs-$(CONFIG_SUPERH64)
:=
arch
/sh/lib64/
$
(
libs-y
)
...
...
arch/sh/boot/compressed/Makefile
浏览文件 @
3e28ad7b
...
@@ -24,7 +24,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
...
@@ -24,7 +24,7 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
LIBGCC
:=
$(
shell
$(CC)
$(KBUILD_CFLAGS)
-print-libgcc-file-name
)
LIBGCC
:=
$(
shell
$(CC)
$(KBUILD_CFLAGS)
-print-libgcc-file-name
)
ifeq
($(CONFIG_
FUNCTION_TRACER
),y)
ifeq
($(CONFIG_
MCOUNT
),y)
ORIG_CFLAGS
:=
$(KBUILD_CFLAGS)
ORIG_CFLAGS
:=
$(KBUILD_CFLAGS)
KBUILD_CFLAGS
=
$(
subst
-pg
, ,
$(ORIG_CFLAGS)
)
KBUILD_CFLAGS
=
$(
subst
-pg
, ,
$(ORIG_CFLAGS)
)
endif
endif
...
...
arch/sh/kernel/irq.c
浏览文件 @
3e28ad7b
...
@@ -114,23 +114,6 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
...
@@ -114,23 +114,6 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
#endif
#endif
irq_enter
();
irq_enter
();
#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
{
long
sp
;
__asm__
__volatile__
(
"and r15, %0"
:
"=r"
(
sp
)
:
"0"
(
THREAD_SIZE
-
1
));
if
(
unlikely
(
sp
<
(
sizeof
(
struct
thread_info
)
+
STACK_WARN
)))
{
printk
(
"do_IRQ: stack overflow: %ld
\n
"
,
sp
-
sizeof
(
struct
thread_info
));
dump_stack
();
}
}
#endif
irq
=
irq_demux
(
intc_evt2irq
(
irq
));
irq
=
irq_demux
(
intc_evt2irq
(
irq
));
#ifdef CONFIG_IRQSTACKS
#ifdef CONFIG_IRQSTACKS
...
...
arch/sh/kernel/sh_ksyms_32.c
浏览文件 @
3e28ad7b
...
@@ -106,8 +106,8 @@ EXPORT_SYMBOL(flush_dcache_page);
...
@@ -106,8 +106,8 @@ EXPORT_SYMBOL(flush_dcache_page);
EXPORT_SYMBOL
(
clear_user_page
);
EXPORT_SYMBOL
(
clear_user_page
);
#endif
#endif
#ifdef CONFIG_
FUNCTION_TRACER
#ifdef CONFIG_
MCOUNT
EXPORT_SYMBOL
(
mcount
);
DECLARE_EXPORT
(
mcount
);
#endif
#endif
EXPORT_SYMBOL
(
csum_partial
);
EXPORT_SYMBOL
(
csum_partial
);
EXPORT_SYMBOL
(
csum_partial_copy_generic
);
EXPORT_SYMBOL
(
csum_partial_copy_generic
);
...
...
arch/sh/lib/Makefile
浏览文件 @
3e28ad7b
...
@@ -24,8 +24,7 @@ memcpy-y := memcpy.o
...
@@ -24,8 +24,7 @@ memcpy-y := memcpy.o
memcpy-$(CONFIG_CPU_SH4)
:=
memcpy-sh4.o
memcpy-$(CONFIG_CPU_SH4)
:=
memcpy-sh4.o
lib-$(CONFIG_MMU)
+=
copy_page.o clear_page.o
lib-$(CONFIG_MMU)
+=
copy_page.o clear_page.o
lib-$(CONFIG_FUNCTION_TRACER)
+=
mcount.o
lib-$(CONFIG_MCOUNT)
+=
mcount.o
lib-$(CONFIG_FUNCTION_GRAPH_TRACER)
+=
mcount.o
lib-y
+=
$
(
memcpy-y
)
$
(
udivsi3-y
)
lib-y
+=
$
(
memcpy-y
)
$
(
udivsi3-y
)
EXTRA_CFLAGS
+=
-Werror
EXTRA_CFLAGS
+=
-Werror
arch/sh/lib/mcount.S
浏览文件 @
3e28ad7b
/*
/*
*
arch
/
sh
/
lib
/
mcount
.
S
*
arch
/
sh
/
lib
/
mcount
.
S
*
*
*
Copyright
(
C
)
2008
Paul
Mundt
*
Copyright
(
C
)
2008
,
2009
Paul
Mundt
*
Copyright
(
C
)
2008
,
2009
Matt
Fleming
*
Copyright
(
C
)
2008
,
2009
Matt
Fleming
*
*
*
This
file
is
subject
to
the
terms
and
conditions
of
the
GNU
General
Public
*
This
file
is
subject
to
the
terms
and
conditions
of
the
GNU
General
Public
...
@@ -86,13 +86,18 @@
...
@@ -86,13 +86,18 @@
.
type
mcount
,
@
function
.
type
mcount
,
@
function
_mcount
:
_mcount
:
mcount
:
mcount
:
STACK_CHECK
()
#ifndef CONFIG_FUNCTION_TRACER
rts
nop
#else
#ifndef CONFIG_DYNAMIC_FTRACE
#ifndef CONFIG_DYNAMIC_FTRACE
mov.l
.
Lfunction_trace_stop
,
r0
mov.l
.
Lfunction_trace_stop
,
r0
mov.l
@
r0
,
r0
mov.l
@
r0
,
r0
tst
r0
,
r0
tst
r0
,
r0
bf
ftrace_stub
bf
ftrace_stub
#endif
#endif
STACK_CHECK
()
MCOUNT_ENTER
()
MCOUNT_ENTER
()
...
@@ -174,8 +179,6 @@ ftrace_caller:
...
@@ -174,8 +179,6 @@ ftrace_caller:
tst
r0
,
r0
tst
r0
,
r0
bf
ftrace_stub
bf
ftrace_stub
STACK_CHECK
()
MCOUNT_ENTER
()
MCOUNT_ENTER
()
.
globl
ftrace_call
.
globl
ftrace_call
...
@@ -192,6 +195,10 @@ ftrace_call:
...
@@ -192,6 +195,10 @@ ftrace_call:
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* CONFIG_DYNAMIC_FTRACE */
.
align
2
.
Lfunction_trace_stop
:
.
long
function_trace_stop
/*
/*
*
NOTE
:
From
here
on
the
locations
of
the
.
Lftrace_stub
label
and
*
NOTE
:
From
here
on
the
locations
of
the
.
Lftrace_stub
label
and
*
ftrace_stub
itself
are
fixed
.
Adding
additional
data
here
will
skew
*
ftrace_stub
itself
are
fixed
.
Adding
additional
data
here
will
skew
...
@@ -199,7 +206,6 @@ ftrace_call:
...
@@ -199,7 +206,6 @@ ftrace_call:
*
Place
new
labels
either
after
the
ftrace_stub
body
,
or
before
*
Place
new
labels
either
after
the
ftrace_stub
body
,
or
before
*
ftrace_caller
.
You
have
been
warned
.
*
ftrace_caller
.
You
have
been
warned
.
*/
*/
.
align
2
.
Lftrace_stub
:
.
Lftrace_stub
:
.
long
ftrace_stub
.
long
ftrace_stub
...
@@ -208,40 +214,6 @@ ftrace_stub:
...
@@ -208,40 +214,6 @@ ftrace_stub:
rts
rts
nop
nop
#ifdef CONFIG_STACK_DEBUG
.
globl
stack_panic
stack_panic
:
mov.l
.
Ldump_stack
,
r0
jsr
@
r0
nop
mov.l
.
Lpanic
,
r0
jsr
@
r0
mov.l
.
Lpanic_s
,
r4
rts
nop
.
align
2
.
Lfunction_trace_stop
:
.
long
function_trace_stop
.
L_ebss
:
.
long
_ebss
.
L_init_thread_union
:
.
long
init_thread_union
.
Lpanic
:
.
long
panic
.
Lpanic_s
:
.
long
.
Lpanic_str
.
Ldump_stack
:
.
long
dump_stack
.
section
.
rodata
.
align
2
.
Lpanic_str
:
.
string
"Stack error"
#endif /* CONFIG_STACK_DEBUG */
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
.
globl
ftrace_graph_caller
.
globl
ftrace_graph_caller
ftrace_graph_caller
:
ftrace_graph_caller
:
...
@@ -303,3 +275,36 @@ return_to_handler:
...
@@ -303,3 +275,36 @@ return_to_handler:
.
Lftrace_return_to_handler
:
.
Lftrace_return_to_handler
:
.
long
ftrace_return_to_handler
.
long
ftrace_return_to_handler
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
#endif /* CONFIG_FUNCTION_TRACER */
#ifdef CONFIG_STACK_DEBUG
.
globl
stack_panic
stack_panic
:
mov.l
.
Ldump_stack
,
r0
jsr
@
r0
nop
mov.l
.
Lpanic
,
r0
jsr
@
r0
mov.l
.
Lpanic_s
,
r4
rts
nop
.
align
2
.
L_ebss
:
.
long
_ebss
.
L_init_thread_union
:
.
long
init_thread_union
.
Lpanic
:
.
long
panic
.
Lpanic_s
:
.
long
.
Lpanic_str
.
Ldump_stack
:
.
long
dump_stack
.
section
.
rodata
.
align
2
.
Lpanic_str
:
.
string
"Stack error"
#endif /* CONFIG_STACK_DEBUG */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录