diff options
author | Franck Bui-Huu <vagabon.xyz@gmail.com> | 2006-08-03 09:29:18 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-09-27 13:37:27 +0100 |
commit | 6057a7987608941a203f40f8b53513af433d8d2f (patch) | |
tree | 1fa63ef112a4350c5bf00fc673aed44609c1ed21 /arch/mips/kernel/process.c | |
parent | 87151ae39bf5556abe83d69af0be9580c32c501b (diff) |
[MIPS] Make frame_info_init() more readable.
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 93d5432759db..da332d707ce5 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -370,15 +370,15 @@ static int __init frame_info_init(void) mfinfo[0].func = schedule; schedule_frame = &mfinfo[0]; #endif - for (i = 0; i < ARRAY_SIZE(mfinfo) && mfinfo[i].func; i++) { - struct mips_frame_info *info = &mfinfo[i]; - if (get_frame_info(info)) { - /* leaf or unknown */ - if (info->func == schedule) - printk("Can't analyze prologue code at %p\n", - info->func); - } - } + for (i = 0; i < ARRAY_SIZE(mfinfo) && mfinfo[i].func; i++) + get_frame_info(mfinfo + i); + + /* + * Without schedule() frame info, result given by + * thread_saved_pc() and get_wchan() are not reliable. + */ + if (schedule_frame->pc_offset < 0) + printk("Can't analyze schedule() prologue at %p\n", schedule); mfinfo_num = i; return 0; |