]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[MIPS] Make frame_info_init() more readable.
authorFranck Bui-Huu <vagabon.xyz@gmail.com>
Thu, 3 Aug 2006 07:29:18 +0000 (09:29 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 27 Sep 2006 12:37:27 +0000 (13:37 +0100)
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/process.c

index 93d5432759dbb7e29fa64592257521d2b5ce627a..da332d707ce54b106cc462c6660193da09e7b502 100644 (file)
@@ -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;