mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Steven J. Magnani" <steve@digidescorp.com>
To: Michal Simek <monstr@monstr.eu>
Cc: linux-kernel@vger.kernel.org, microblaze-uclinux@itee.uq.edu.au
Subject: Re: [microblaze-uclinux] Re: [PATCH 1/2] microblaze: add stack unwinder
Date: Fri, 16 Apr 2010 09:33:30 -0500	[thread overview]
Message-ID: <1271428410.3366.23.camel@iscandar.digidescorp.com> (raw)
In-Reply-To: <4BC820B2.6060604@monstr.eu>

On Fri, 2010-04-16 at 10:32 +0200, Michal Simek wrote:
> Please apply this patch and do the same testing as I did.
> 
> diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c
> index a1721a3..76f6587 100644
> --- a/arch/microblaze/kernel/reset.c
> +++ b/arch/microblaze/kernel/reset.c
> @@ -112,8 +112,8 @@ void of_platform_reset_gpio_probe(void)
>   void machine_restart(char *cmd)
>   {
>          printk(KERN_NOTICE "Machine restart...\n");
> +       machine_shutdown();
>          gpio_system_reset();
> -       dump_stack();
>          while (1)
>                  ;
>   }
> @@ -121,6 +121,7 @@ void machine_restart(char *cmd)
>   void machine_shutdown(void)
>   {
>          printk(KERN_NOTICE "Machine shutdown...\n");
> +       dump_stack();
>          while (1)
>                  ;
>   }

I get this:

Call Trace:
[<20003008>] microblaze_unwind+0x68/0x94
[<20002c24>] show_stack+0x134/0x174
[<20002c80>] dump_stack+0x1c/0x3c
[<20001d84>] machine_shutdown+0x30/0x40
[<20001dc0>] machine_restart+0x2c/0x48
[<2002a540>] kernel_restart+0x5c/0x80
[<2002a6b8>] sys_reboot+0x11c/0x218
SYSCALL
[<2d5c0248>] PID 118 [reboot]

Is your problem on a MMU or noMMU system?

If the unwinder stops early, it found a return address outside the
kernel text, or couldn't find the addik that creates a stack frame - but
there's not enough information here to tell what happened. In your case
the backtrace goes off the rails before getting to the frame for
dump_stack(), which is where the stack dump begins. We'd need to see the
21 words preceding the dump (show_stack's frame is 13 words, and
microblaze_unwind's is 8) to know why.

Can you uncomment the #define DEBUG in unwind.c and try it again?

Thanks,
------------------------------------------------------------------------
 Steven J. Magnani               "I claim this network for MARS!
 www.digidescorp.com              Earthling, return my space modulator!"

 #include <standard.disclaimer>



  reply	other threads:[~2010-04-16 14:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  4:55 Steven J. Magnani
2010-04-14  6:34 ` Michal Simek
2010-04-14 16:45 ` Michal Simek
2010-04-27  3:31   ` Steven J. Magnani
2010-04-27  7:54     ` Michal Simek
2010-04-16  8:32 ` Michal Simek
2010-04-16 14:33   ` Steven J. Magnani [this message]
2010-04-16 15:03     ` [microblaze-uclinux] " Michal Simek
2010-04-26 15:34     ` Michal Simek
2010-04-27  3:36       ` Steven J. Magnani
2010-04-27  7:57         ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271428410.3366.23.camel@iscandar.digidescorp.com \
    --to=steve@digidescorp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=microblaze-uclinux@itee.uq.edu.au \
    --cc=monstr@monstr.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®