Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: linux-mips@linux-mips.org
Subject: Re: 2.6.24-rc1: au1xxx and clocksource
Date: Fri, 26 Oct 2007 12:57:01 +0100	[thread overview]
Message-ID: <20071026115701.GB9075@linux-mips.org> (raw)
In-Reply-To: <20071026112455.GA2792@roarinelk.homelinux.net>

On Fri, Oct 26, 2007 at 01:24:55PM +0200, Manuel Lauss wrote:

> On Fri, Oct 26, 2007 at 08:18:35AM +0200, Manuel Lauss wrote:
> > Hi Ralf,
> > 
> > On Thu, Oct 25, 2007 at 06:59:14PM +0100, Ralf Baechle wrote:
> > > On Wed, Oct 24, 2007 at 08:31:35PM +0200, Manuel Lauss wrote:
> > > > start_kernel()
> > > >  time_init()
> > > >   init_mips_clocksource()
> > > >   mips_clockevent_init()
> > > >    clockevents_register_device()
> > > >     clockevents_do_notify()
> > > >      notifier_call_chain():
> > > > 
> > > >       It dies here, line 69, in kernel/notifier.c:
> > > >       ret = nb->notifier_call(nb, val, v);
> > 
> > >   tick_notify(&tick_notifier, CLOCK_EVT_NOTIFY_ADD, dev)
> > > 
> > > So things are likely going wrong somewhere in there.
> > 
> > starting in nb->notifier_call:
> > tick_notify()
> >  tick_check_new_device()
> >   tick_setup_device()
> >    tick_setup_periodic():
> > 
> >    it seems to enternally loop in here:
> > 
> > 123                 for (;;) {
> > 124                         if (!clockevents_program_event(dev, next, ktime_get()))
> > 125                                 return;
> > 126                         next = ktime_add(next, tick_period);
> > 127                 }
> > 
> > I think it's waiting for a timer irq which never happens.  The code in
> > cevt-r4k.c assigns IRQ 7 as the timer irq which is a GPIO according to
> > the manual. Actually, there is no real requestable() timer irq mentioned
> > in the manual (RTC and TOY aside).
> 
> That's wrong of course :(
> 
> The real reason is that mips_hpt_frequency is zero, the whole min/max delta
> is therefore 2^31-1 and the loop above never exits because mips_next_event()
> is called with zero for the 'delta' parameter.
> 
> Setting mips_hpt_frequency to processor speed gives me a booting kernel.

So you found that while I was composing my other mail, good.  It basically
confirms my starring at the code, so I'm going to commit my patch now.

  Ralf

  parent reply	other threads:[~2007-10-26 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 18:31 2.6.24-rc1: au1xxx and clocksource Manuel Lauss
2007-10-25 17:59 ` Ralf Baechle
2007-10-25 18:18   ` Manuel Lauss
2007-10-26  6:18   ` Manuel Lauss
2007-10-26 11:24     ` Manuel Lauss
2007-10-26 11:56       ` Sergei Shtylyov
2007-10-26 12:12         ` Ralf Baechle
2007-10-26 11:57       ` Ralf Baechle [this message]
2007-10-26 11:55     ` Ralf Baechle

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=20071026115701.GB9075@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mano@roarinelk.homelinux.net \
    /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