LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Andrew Paprocki <andrew@ishiboo.com>,
linux-kernel@vger.kernel.org, Balaji Rao <balajirrao@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
clemens@ladisch.de, venkatesh.pallipadi@intel.com,
bob.picco@hp.com
Subject: Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs
Date: Wed, 16 Jan 2008 16:21:28 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.0.99999.0801161618380.3764@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.0.99999.0801161524250.3764@localhost.localdomain>
On Wed, 16 Jan 2008, Thomas Gleixner wrote:
> On Wed, 16 Jan 2008, Thomas Gleixner wrote:
>
> > On Sun, 13 Jan 2008, Dhaval Giani wrote:
> > > On Sun, Jan 13, 2008 at 08:10:46AM -0500, Andrew Paprocki wrote:
> > > > I applied the patch to my 2.6.23.13 tree and upon reboot it stopped right after:
> > > >
> > > > Clocksource tsc unstable (delta = ... ns)
> > > > Time: hpet clocksource has been installed.
> > > >
> > > > It locked up hard.. cursor stopped blinking and SysRq isn't working either.
> >
> > The hint is in the original report:
> >
> > Clocksource tsc unstable (delta = 500013666 ns)
> >
> > That means, that the TSC was counting, but HPET not. So it looks like
> > the HPET readout is stale. Which explains, why after switching to HPET
> > clocksource the time system gets hosed.
> >
> > I wonder why the HPET counter works check did not catch this.
> >
> > Can you please apply the path below and provide the output ?
This time against 2.6.23
Thanks,
tglx
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -233,7 +233,7 @@ int __init hpet_enable(void)
unsigned long id;
uint64_t hpet_freq;
u64 tmp, start, now;
- cycle_t t1;
+ cycle_t t1, t2;
if (!is_hpet_capable())
return 0;
@@ -295,12 +295,17 @@ int __init hpet_enable(void)
rdtscll(now);
} while ((now - start) < 200000UL);
- if (t1 == read_hpet()) {
+ t2 = read_hpet();
+ if (t1 == t2) {
printk(KERN_WARNING
"HPET counter not counting. HPET disabled\n");
goto out_nohpet;
}
+ printk(KERN_INFO "HPET check: t1=%llu t2=%llu s=%llu n=%llu\n",
+ (unsigned long long) t1, (unsigned long long) t2,
+ (unsigned long long) start, (unsigned long long) now);
+
/* Initialize and register HPET clocksource
*
* hpet period is in femto seconds per cycle
next prev parent reply other threads:[~2008-01-16 15:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-13 11:10 Andrew Paprocki
2008-01-13 12:03 ` Dhaval Giani
2008-01-13 13:10 ` Andrew Paprocki
2008-01-13 14:06 ` Dhaval Giani
2008-01-16 14:15 ` Thomas Gleixner
2008-01-16 14:28 ` Thomas Gleixner
2008-01-16 15:21 ` Thomas Gleixner [this message]
2008-01-16 19:39 ` Andrew Paprocki
2008-01-18 10:26 ` Thomas Gleixner
2008-02-09 23:27 ` Andrew Paprocki
2008-01-14 12:59 ` Clemens Ladisch
2008-01-14 14:12 ` Balaji Rao
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=alpine.LFD.0.99999.0801161618380.3764@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=andrew@ishiboo.com \
--cc=balajirrao@gmail.com \
--cc=bob.picco@hp.com \
--cc=clemens@ladisch.de \
--cc=dhaval@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=venkatesh.pallipadi@intel.com \
--subject='Re: HPET timer broken using 2.6.23.13 / nanosleep() hangs' \
/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
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).