linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: Problem when testing current git on sh3 + hp6xx
Date: Tue, 23 Feb 2010 03:51:09 +0000	[thread overview]
Message-ID: <20100223035108.GC4356@linux-sh.org> (raw)
In-Reply-To: <20100223025042.GA28763@rafazurita.homelinux.net>

On Mon, Feb 22, 2010 at 11:50:42PM -0300, Rafael Ignacio Zurita wrote:
> Hello, 
>   I am testing current sh-2.6.git on SH7709 based hp6xx,
> using earlyprintk as Paul suggested me.
> 
> When booting, kernel shows an
> Unable to handle kernel NULL pointer dereference at virtual address 00000000
> and then 
> Kernel panic - not syncing: Fatal exception in interrupt
> 
> I built using arch/sh/configs/hp6xx_defconfig, and enabling
> Verbose BUG() reporting and KALLSYMS_ALL as well.
> 
Can you boot this with ignore_loglevel on the command line also please,
it would be helpful to see what the sparse IRQ mapping looks like.

> Unable to handle kernel NULL pointer dereference at virtual address 00000000
[snip]
> PR is at sh_tmu_interrupt+0x20/0x50
> PC  : 00000000 SP  : 8d1c7ebc SR  : 400001f0 TEA : 00000000
> R0  : 00000000 R1  : 00000000 R2  : 00000020 R3  : 00000100
> R4  : 8dc06e9c R5  : 8dc06e60 R6  : 00000000 R7  : 00000010
> R8  : 8dc06e68 R9  : 00000000 R10 : 00000000 R11 : 00000010
> R12 : 8d003c80 R13 : 000000f0 R14 : 8d003cb0
> MACH: 09127064 MACL: 00000ea0 GBR : 8c009800 PR  : 8d162ab0
> 
> Call trace:
>  [<8d03cbb2>] handle_IRQ_event+0x42/0x150
>  [<8d03ea14>] handle_level_irq+0x44/0xd0
>  [<8d003cb0>] __raw_local_save_flags+0x0/0x10
>  [<8d003c80>] raw_local_irq_restore+0x0/0x30
>  [<8d0039f0>] do_IRQ+0x30/0x60
>  [<8d0080ec>] ret_from_exception+0x0/0xc
>  [<8d0039c0>] do_IRQ+0x0/0x60
>  [<8d003c80>] raw_local_irq_restore+0x0/0x30
>  [<8d003cb0>] __raw_local_save_flags+0x0/0x10
>  [<8d003c92>] raw_local_irq_restore+0x12/0x30
>  [<8d03d45a>] __setup_irq+0xea/0x350
>  [<8d1656ba>] sh_tmu_probe+0x24a/0x330
>  [<8d1ee11c>] early_platform_driver_probe+0x250/0x2cc
>  [<8d1ee11c>] early_platform_driver_probe+0x250/0x2cc
> 
Based on this it would seem that you are entering the kernel with pending
timer IRQs and are racing against the clockevent setup, as no one has set
up the event handler yet. Try this:

---

diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 93c2322..961f5b5 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -323,15 +323,15 @@ static void sh_tmu_register_clockevent(struct sh_tmu_priv *p,
 	ced->set_next_event = sh_tmu_clock_event_next;
 	ced->set_mode = sh_tmu_clock_event_mode;
 
+	pr_info("sh_tmu: %s used for clock events\n", ced->name);
+	clockevents_register_device(ced);
+
 	ret = setup_irq(p->irqaction.irq, &p->irqaction);
 	if (ret) {
 		pr_err("sh_tmu: failed to request irq %d\n",
 		       p->irqaction.irq);
 		return;
 	}
-
-	pr_info("sh_tmu: %s used for clock events\n", ced->name);
-	clockevents_register_device(ced);
 }
 
 static int sh_tmu_register(struct sh_tmu_priv *p, char *name,

  reply	other threads:[~2010-02-23  3:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23  2:50 Problem when testing current git on sh3 + hp6xx Rafael Ignacio Zurita
2010-02-23  3:51 ` Paul Mundt [this message]
2010-02-23 22:38 ` Rafael Ignacio Zurita
2010-02-24  1:03 ` Paul Mundt

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=20100223035108.GC4356@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).