public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: john stultz <johnstul@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Guilherme M. Schroeder" <guilherme@centralinf.com.br>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Blacklist Dell Optiplex 320 from using the HPET
Date: Sat, 05 May 2007 16:26:54 +0200	[thread overview]
Message-ID: <1178375214.31213.13.camel@localhost.localdomain> (raw)
In-Reply-To: <1178321228.6094.34.camel@localhost.localdomain>

Guilherme,

On Fri, 2007-05-04 at 16:27 -0700, john stultz wrote: 
> > Before going to hard to maintain DMI black lists we should first check 
> > if it's a more general problem and can't it be solved better? Most likely
> > that system isn't the one with this issue and I don't want to apply
> > DMI patches forever.
> 
> We can give it a whirl, I just didn't want to add yet another "compare
> with some other counter that may or may not work" check. In this case,
> probably reading three times in a row and getting the same result would
> be a clearly broken box. 

can you please undo John's patch and check whether the patch below works
for you.

Thanks,

	tglx

Index: linux-2.6.21/arch/i386/kernel/hpet.c
===================================================================
--- linux-2.6.21.orig/arch/i386/kernel/hpet.c
+++ linux-2.6.21/arch/i386/kernel/hpet.c
@@ -231,6 +231,7 @@ int __init hpet_enable(void)
 {
 	unsigned long id;
 	uint64_t hpet_freq;
+	cycle_t t1;
 	u64 tmp;
 
 	if (!is_hpet_capable())
@@ -278,6 +279,14 @@ int __init hpet_enable(void)
 	/* Start the counter */
 	hpet_start_counter();
 
+	/* Verify whether hpet counter works */
+	t1 = hpet_read();
+	udelay(50);
+	if (t1 == hpet_read()) {
+		printk(KERN_WARNING "HPET counter is defect\n");
+		goto out_nohpet;
+	}
+
 	/* Initialize and register HPET clocksource
 	 *
 	 * hpet period is in femto seconds per cycle



  reply	other threads:[~2007-05-05 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04 21:29 [PATCH] Blacklist Dell Optiplex 320 from using the HPET john stultz
2007-05-04 21:44 ` Andrew Morton
2007-05-04 21:47   ` john stultz
2007-05-04 23:19   ` Andi Kleen
2007-05-04 23:18 ` Andi Kleen
2007-05-04 23:27   ` john stultz
2007-05-05 14:26     ` Thomas Gleixner [this message]
2007-05-05 14:30       ` Thomas Gleixner
2007-05-05 15:58         ` Henrique de Moraes Holschuh
2007-05-07 18:59           ` Andreas Mohr
2007-05-07 20:41             ` Henrique de Moraes Holschuh
2007-05-05 17:24       ` Andi Kleen
2007-05-05 19:15         ` Thomas Gleixner
2007-05-05 22:05           ` Andi Kleen
2007-05-05 22:41     ` Guilherme M. Schroeder

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=1178375214.31213.13.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=guilherme@centralinf.com.br \
    --cc=johnstul@us.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox