From: Ingo Molnar <mingo@elte.hu>
To: Brice Goglin <Brice.Goglin@ens-lyon.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.12-rc2-mm1
Date: Tue, 5 Apr 2005 20:34:13 +0200 [thread overview]
Message-ID: <20050405183413.GA7122@elte.hu> (raw)
In-Reply-To: <42524EE2.5010703@ens-lyon.org>
* Brice Goglin <Brice.Goglin@ens-lyon.org> wrote:
> >could you send the full bootlog (starting at the 'gcc...' line)? I'm not
> >sure whether TSC calibration was done on your CPU. If cyc2ns_scale is
> >not set up then sched_clock() will return 0, and this could result in
> >that printk symptom.
>
> Here you are.
weird - none of the WARN_ON(1)'s show up. In particular, the
sched_clock() ones should have triggered at least once! I've attached a
new version of the patch below (please unapply the previous patch),
could you try it and send me the log? (It will unconditionally print
something in tsc_init(), which is always called during the boot
process.)
Ingo
--- linux/arch/i386/kernel/timers/timer_tsc.c.orig
+++ linux/arch/i386/kernel/timers/timer_tsc.c
@@ -137,16 +137,15 @@ static unsigned long long monotonic_cloc
unsigned long long sched_clock(void)
{
unsigned long long this_offset;
+ static int once = 1;
- /*
- * In the NUMA case we dont use the TSC as they are not
- * synchronized across all CPUs.
- */
-#ifndef CONFIG_NUMA
- if (!use_tsc)
-#endif
+ if (!cpu_has_tsc) {
+ if (once) { once = 0; WARN_ON(1); }
/* no locking but a rare wrong value is not a big deal */
return jiffies_64 * (1000000000 / HZ);
+ }
+
+ if (once) { once = 0; WARN_ON(1); }
/* Read the Time Stamp Counter */
rdtscll(this_offset);
@@ -434,7 +433,8 @@ static void mark_offset_tsc(void)
static int __init init_tsc(char* override)
{
-
+ printk("TSC init.\n");
+ WARN_ON(1);
/* check clock override */
if (override[0] && strncmp(override,"tsc",3)) {
#ifdef CONFIG_HPET_TIMER
@@ -443,6 +443,7 @@ static int __init init_tsc(char* overrid
} else
#endif
{
+ WARN_ON(1);
return -ENODEV;
}
}
@@ -518,8 +519,10 @@ static int __init init_tsc(char* overrid
}
set_cyc2ns_scale(cpu_khz/1000);
return 0;
- }
+ } else
+ WARN_ON(1);
}
+ WARN_ON(1);
return -ENODEV;
}
@@ -528,12 +531,14 @@ static int __init init_tsc(char* overrid
* in cpu/common.c */
static int __init tsc_setup(char *str)
{
+ WARN_ON(1);
tsc_disable = 1;
return 1;
}
#else
static int __init tsc_setup(char *str)
{
+ WARN_ON(1);
printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, "
"cannot disable TSC.\n");
return 1;
--- linux/arch/i386/kernel/timers/common.c.orig
+++ linux/arch/i386/kernel/timers/common.c
@@ -39,8 +39,10 @@ unsigned long __init calibrate_tsc(void)
/* Error: ECTCNEVERSET */
- if (count <= 1)
+ if (count <= 1) {
+ WARN_ON(1);
goto bad_ctc;
+ }
/* 64-bit subtract - gcc just messes up with long longs */
__asm__("subl %2,%0\n\t"
@@ -50,12 +52,16 @@ unsigned long __init calibrate_tsc(void)
"0" (endlow), "1" (endhigh));
/* Error: ECPUTOOFAST */
- if (endhigh)
+ if (endhigh) {
+ WARN_ON(1);
goto bad_ctc;
+ }
/* Error: ECPUTOOSLOW */
- if (endlow <= CALIBRATE_TIME)
+ if (endlow <= CALIBRATE_TIME) {
+ WARN_ON(1);
goto bad_ctc;
+ }
__asm__("divl %2"
:"=a" (endlow), "=d" (endhigh)
@@ -107,12 +113,16 @@ unsigned long __init calibrate_tsc_hpet(
"0" (tsc_endlow), "1" (tsc_endhigh));
/* Error: ECPUTOOFAST */
- if (tsc_endhigh)
+ if (tsc_endhigh) {
+ WARN_ON(1);
goto bad_calibration;
+ }
/* Error: ECPUTOOSLOW */
- if (tsc_endlow <= CALIBRATE_TIME_HPET)
+ if (tsc_endlow <= CALIBRATE_TIME_HPET) {
+ WARN_ON(1);
goto bad_calibration;
+ }
ASM_DIV64_REG(result, remain, tsc_endlow, 0, CALIBRATE_TIME_HPET);
if (remain > (tsc_endlow >> 1))
next prev parent reply other threads:[~2005-04-05 18:44 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 7:05 2.6.12-rc2-mm1 Andrew Morton
2005-04-05 7:21 ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05 7:33 ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-05 7:59 ` 2.6.12-rc2-mm1 Ingo Molnar
2005-04-05 18:51 ` 2.6.12-rc2-mm1 Siddha, Suresh B
2005-04-05 23:42 ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-06 17:11 ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-08 1:08 ` 2.6.12-rc2-mm1 Siddha, Suresh B
2005-04-08 2:28 ` 2.6.12-rc2-mm1 Nick Piggin
2005-04-05 7:39 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05 7:45 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-05 7:59 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05 8:05 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-07 17:00 ` 2.6.12-rc2-mm1 - printk timing broken Damir Perisa
2005-04-05 8:30 ` 2.6.12-rc2-mm1 Ingo Molnar
2005-04-05 8:40 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05 18:34 ` Ingo Molnar [this message]
2005-04-06 9:09 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05 7:44 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 9:07 ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05 9:20 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05 9:25 ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05 9:30 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 9:44 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05 9:45 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 9:51 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05 9:54 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 9:58 ` 2.6.12-rc2-mm1 Dave Airlie
2005-04-05 10:03 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 9:58 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05 9:33 ` 2.6.12-rc2-mm1 Arjan van de Ven
2005-04-05 9:11 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05 9:12 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 9:35 ` 2.6.12-rc2-mm1 Paul Mackerras
2005-04-05 9:36 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 7:45 ` 2.6.12-rc2-mm1 Christoph Hellwig
2005-04-05 7:51 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-05 16:48 ` 2.6.12-rc2-mm1 David Woodhouse
2005-04-05 8:18 ` 2.6.12-rc2-mm1 Brice Goglin
2005-04-05 8:46 ` 2.6.12-rc2-mm1 Rafael J. Wysocki
2005-04-05 10:08 ` 2.6.12-rc2-mm1 Jindrich Makovicka
2005-04-06 22:07 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-05 10:18 ` 2.6.12-rc2-mm1 Andrey Panin
2005-04-05 12:21 ` [-mm patch] Makefile: fix spaces instead of tab Adrian Bunk
2005-04-05 13:19 ` Sam Ravnborg
2005-04-05 12:40 ` 2.6.12-rc2-mm1 Borislav Petkov
2005-04-05 13:44 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-05 14:14 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-05 22:03 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-06 0:56 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-06 7:19 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-06 12:59 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-06 21:27 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-07 3:06 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-07 6:55 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-08 10:33 ` 2.6.12-rc2-mm1 Pavel Machek
2005-04-10 21:18 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-10 21:27 ` 2.6.12-rc2-mm1 Pavel Machek
2005-04-10 22:57 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-10 23:00 ` 2.6.12-rc2-mm1 Pavel Machek
2005-04-11 4:31 ` 2.6.12-rc2-mm1 Barry K. Nathan
2005-04-11 10:57 ` swsusp vs. xfs [was Re: 2.6.12-rc2-mm1] Pavel Machek
2005-04-11 23:12 ` [xfs-masters] " Nathan Scott
2005-04-11 23:51 ` Pavel Machek
2005-04-12 0:26 ` Nathan Scott
2005-04-12 11:04 ` Pavel Machek
2005-04-12 11:50 ` Barry K. Nathan
2005-04-12 12:47 ` Rafael J. Wysocki
2005-04-11 7:38 ` 2.6.12-rc2-mm1 Stefan Seyfried
2005-04-05 14:24 ` [-mm patch] drivers/infiniband/hw/mthca/mthca_main.c: remove an unused label Adrian Bunk
2005-04-05 14:37 ` Hal Rosenstock
2005-04-05 16:53 ` Roland Dreier
2005-04-05 15:45 ` 2.6.12-rc2-mm1 Jan Dittmer
2005-04-05 21:38 ` 2.6.12-rc2-mm1 Sam Ravnborg
2005-04-05 17:11 ` 2.6.12-rc2-mm1 Christophe Saout
2005-04-06 1:44 ` 2.6.12-rc2-mm1 Neil Brown
2005-04-06 22:19 ` 2.6.12-rc2-mm1 Andrew Morton
2005-04-07 0:40 ` 2.6.12-rc2-mm1 Ed Tomlinson
2005-04-07 7:14 ` 2.6.12-rc2-mm1 Mickael Marchand
2005-04-08 18:13 ` [-mm patch] x86_64: kill obsolete check_nmi_watchdog prototype Adrian Bunk
2005-04-08 18:21 ` Mickael Marchand
[not found] <fa.gcqu6i7.1o6qrhn@ifi.uio.no>
2005-04-05 8:34 ` 2.6.12-rc2-mm1 Reuben Farrelly
2005-04-05 12:14 ` 2.6.12-rc2-mm1 Adrian Bunk
2005-04-05 12:32 ` 2.6.12-rc2-mm1 Reuben Farrelly
-- strict thread matches above, loose matches on Subject: below --
2005-04-05 7:05 2.6.12-rc2-mm1 Andrew Morton
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=20050405183413.GA7122@elte.hu \
--to=mingo@elte.hu \
--cc=Brice.Goglin@ens-lyon.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@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 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.