All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Malek <dan@embeddededge.com>
To: joakim.tjernlund@lumentis.se
Cc: "Linuxppc-Embedded@Lists. Linuxppc. Org"
	<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: kernel hangs after printing "Calibrating delay loop ..." on mpc860
Date: Tue, 01 Apr 2003 12:21:13 -0500	[thread overview]
Message-ID: <3E89CA89.20808@embeddededge.com> (raw)
In-Reply-To: IGEFJKJNHJDCBKALBJLLCEKEFLAA.joakim.tjernlund@lumentis.se


Joakim Tjernlund wrote:

> Every now and then my kernel gets stuck after printing "Calibrating delay loop ..."
> and I have to press the reset button to recover.

> Someone else has experienced this on a 8260 board. This board did not have a RTC
> and the fix was to add a set_tb(0,0) early in arch/ppc/kernel/time.c/time_init

The RTC is only used to keep track of time of day.  It plays no role in
calibrating or timing anything.  The time_init function makes an attempt
to synchronize the RTC second boundary with the decrementer.

> Our board has a RTC but it gets initialized very late(after the Calibrating
> delay loop stuff).

Then you are likely to simply see the "Warning: real time clock seems stuck!"
message early in setup.

> Either one of us can't understand why this would fix the problem and since I can't
> repeat the problem at will I can't verify if a set_tb(0,0) will fix anything.

We also do this on 4xx.

> Can anybody explain why(or why not) a set_tb(0,0) will make a difference?

I think the problem is the function tb_delta() returns an 'int', while
the rest of the arithmetic is unsigned.  If you happen to get the tbl to
wrap before you get the first decrementer interrupt, I suspect the arithmetic
in these functions goes awry.  The 'set_tb()' ensures the tbl doesn't wrap
around.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-04-01 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01 14:41 kernel hangs after printing "Calibrating delay loop ..." on mpc860 Joakim Tjernlund
2003-04-01 17:21 ` Dan Malek [this message]
2003-04-01 18:39   ` Joakim Tjernlund

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=3E89CA89.20808@embeddededge.com \
    --to=dan@embeddededge.com \
    --cc=joakim.tjernlund@lumentis.se \
    --cc=linuxppc-embedded@lists.linuxppc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.