[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/devel linux-2.6-x86-dell-hpet.patch, NONE, 1.1 kernel-2.6.spec, 1.3173, 1.3174



Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29860

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-x86-dell-hpet.patch 
Log Message:
* Fri May 18 2007 Dave Jones <davej redhat com>
- Blacklist Dell Optiplex 320 from using the HPET.


linux-2.6-x86-dell-hpet.patch:

--- NEW FILE linux-2.6-x86-dell-hpet.patch ---
>From davej  Fri May  4 17:29:51 2007
Return-path: <linux-kernel-owner+davej=40kernelslacker org-S1422720AbXEDV3K vger kernel org>
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
	gelk.kernelslacker.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham
	version=3.1.8
Envelope-to: davej kernelslacker org
Delivery-date: Fri, 04 May 2007 22:29:46 +0100
Received: from testure.choralone.org [194.9.77.134]
	by gelk.kernelslacker.org with IMAP (fetchmail-6.3.6)
	for <davej localhost> (single-drop); Fri, 04 May 2007 17:29:51 -0400 (EDT)
Received: from vger.kernel.org ([209.132.176.167])
	by testure.choralone.org with esmtp (Exim 4.63)
	(envelope-from <linux-kernel-owner+davej=40kernelslacker org-S1422720AbXEDV3K vger kernel org>)
	id 1Hk5LV-0006nX-Q1
	for davej kernelslacker org; Fri, 04 May 2007 22:29:46 +0100
Received: (majordomo vger kernel org) by vger.kernel.org via listexpand
	id S1422720AbXEDV3K (ORCPT <rfc822;davej kernelslacker org>);
	Fri, 4 May 2007 17:29:10 -0400
Received: (majordomo vger kernel org) by vger.kernel.org id S1422743AbXEDV3J
	(ORCPT <rfc822;linux-kernel-outgoing>);
	Fri, 4 May 2007 17:29:09 -0400
Received: from e6.ny.us.ibm.com ([32.97.182.146]:47420 "EHLO e6.ny.us.ibm.com"
	rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
	id S1422720AbXEDV3I (ORCPT <rfc822;linux-kernel vger kernel org>);
	Fri, 4 May 2007 17:29:08 -0400
Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236])
	by e6.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l44LU3oo010992
	for <linux-kernel vger kernel org>; Fri, 4 May 2007 17:30:04 -0400
Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216])
	by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l44LT7tT546216
	for <linux-kernel vger kernel org>; Fri, 4 May 2007 17:29:07 -0400
Received: from d01av02.pok.ibm.com (loopback [127.0.0.1])
	by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l44LT62U004362
	for <linux-kernel vger kernel org>; Fri, 4 May 2007 17:29:07 -0400
Received: from [9.67.61.99] (wecm-9-67-61-99.wecm.ibm.com [9.67.61.99])
	by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l44LT5Ia004316;
	Fri, 4 May 2007 17:29:05 -0400
Subject: [PATCH] Blacklist Dell Optiplex 320 from using the HPET
From:	john stultz <johnstul us ibm com>
To:	Andrew Morton <akpm linux-foundation org>
Cc:	"Guilherme M. Schroeder" <guilherme centralinf com br>,
	lkml <linux-kernel vger kernel org>, Andi Kleen <ak suse de>,
	Thomas Gleixner <tglx linutronix de>
Content-Type: text/plain
Date:	Fri, 04 May 2007 14:29:04 -0700
Message-Id: <1178314144 6094 7 camel localhost localdomain>
Mime-Version: 1.0
X-Mailer: Evolution 2.10.1 
Content-Transfer-Encoding: 7bit
Sender:	linux-kernel-owner vger kernel org
Precedence: bulk
X-Mailing-List:	linux-kernel vger kernel org
Status: RO
Content-Length: 2257
Lines: 82

One of the 2.6.21 regressions was Guilherme's problem seeing his box
lock up when the system detected an unstable TSC and dropped back to
using the HPET.

In digging deeper, we found the HPET is not actually incrementing on
this system. And in fact, the reason why this issue just cropped up was
because of Thomas's clocksource watchdog code was comparing the TSC to
the HPET (which wasn't moving) and thought the TSC was broken.

Anyway, Guliherme checked for a BIOS update and did not find one, so
I've added a DMI blacklist against his system so the HPET is not used.

Many thanks to Guilherme for the slow and laborious testing that finally
narrowed down this issue.

thanks
-john

Signed-off-by: John Stultz <johnstul us ibm com>

diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index 17d7345..1ae27f3 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -5,6 +5,7 @@
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/pm.h>
+#include <linux/dmi.h>
 
 #include <asm/hpet.h>
 #include <asm/io.h>
@@ -48,6 +49,31 @@ static int __init hpet_setup(char* str)
 }
 __setup("hpet=", hpet_setup);
 
+
+/* DMI Blacklist for bad HPETs */
+static int __init dmi_mark_hpet_broken(struct dmi_system_id *d)
+{
+	printk(KERN_NOTICE "%s detected: HPET does not function.\n",
+		       d->ident);
+	boot_hpet_disable = 1;
+	return 0;
+}
+
+/* List of systems that have known HPETproblems */
+static struct dmi_system_id bad_hpet_dmi_table[] = {
+	{
+	 .callback = dmi_mark_hpet_broken,
+	 .ident = "Dell OptiPlex 320",
+	 .matches = {
+		     DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 320"),
+		     DMI_MATCH(DMI_BOARD_VENDOR, "Dell Inc."),
+		     DMI_MATCH(DMI_BOARD_NAME, "0UT237"),
+		     },
+	 },
+	 {}
+};
+
+
 static inline int is_hpet_capable(void)
 {
 	return (!boot_hpet_disable && hpet_address);
@@ -228,6 +254,8 @@ int __init hpet_enable(void)
 	uint64_t hpet_freq;
 	u64 tmp;
 
+	dmi_check_system(bad_hpet_dmi_table);
+
 	if (!is_hpet_capable())
 		return 0;
 




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo vger kernel org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

>From davej  Fri May  4 17:46:16 2007
Return-path: <linux-kernel-owner+davej=40kernelslacker org-S376145AbXEDVoY vger kernel org>
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
	gelk.kernelslacker.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO
	autolearn=ham version=3.1.8
Envelope-to: davej kernelslacker org
Delivery-date: Fri, 04 May 2007 22:44:45 +0100
Received: from testure.choralone.org [194.9.77.134]
	by gelk.kernelslacker.org with IMAP (fetchmail-6.3.6)
	for <davej localhost> (single-drop); Fri, 04 May 2007 17:46:16 -0400 (EDT)
Received: from vger.kernel.org ([209.132.176.167])
	by testure.choralone.org with esmtp (Exim 4.63)
	(envelope-from <linux-kernel-owner+davej=40kernelslacker org-S376145AbXEDVoY vger kernel org>)
	id 1Hk5a1-0006qx-Dl
	for davej kernelslacker org; Fri, 04 May 2007 22:44:45 +0100
Received: (majordomo vger kernel org) by vger.kernel.org via listexpand
	id S376145AbXEDVoY (ORCPT <rfc822;davej kernelslacker org>);
	Fri, 4 May 2007 17:44:24 -0400
Received: (majordomo vger kernel org) by vger.kernel.org id S376156AbXEDVoY
	(ORCPT <rfc822;linux-kernel-outgoing>);
	Fri, 4 May 2007 17:44:24 -0400
Received: from smtp1.linux-foundation.org ([65.172.181.25]:47792 "EHLO
	smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK)
	by vger.kernel.org with ESMTP id S376145AbXEDVoX (ORCPT
	<rfc822;linux-kernel vger kernel org>);
	Fri, 4 May 2007 17:44:23 -0400
Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6])
	by smtp1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l44Li8VE028869
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 4 May 2007 14:44:09 -0700
Received: from akpm.corp.google.com (shell0.pdx.osdl.net [10.9.0.31])
	by shell0.pdx.osdl.net (8.13.1/8.11.6) with SMTP id l44Li8vG016020;
	Fri, 4 May 2007 14:44:08 -0700
Date:	Fri, 4 May 2007 14:44:08 -0700
From:	Andrew Morton <akpm linux-foundation org>
To:	john stultz <johnstul us ibm com>
Cc:	"Guilherme M. Schroeder" <guilherme centralinf com br>,
	lkml <linux-kernel vger kernel org>, Andi Kleen <ak suse de>,
	Thomas Gleixner <tglx linutronix de>
Subject: Re: [PATCH] Blacklist Dell Optiplex 320 from using the HPET
Message-Id: <20070504144408 c041d8df akpm linux-foundation org>
In-Reply-To: <1178314144 6094 7 camel localhost localdomain>
References: <1178314144 6094 7 camel localhost localdomain>
X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.6; i686-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-MIMEDefang-Filter: osdl$Revision: 1.177 $
X-Scanned-By: MIMEDefang 2.53 on 65.172.181.25
Sender:	linux-kernel-owner vger kernel org
Precedence: bulk
X-Mailing-List:	linux-kernel vger kernel org
Status: RO
Content-Length: 3068
Lines: 104

On Fri, 04 May 2007 14:29:04 -0700
john stultz <johnstul us ibm com> wrote:

> One of the 2.6.21 regressions was Guilherme's problem seeing his box
> lock up when the system detected an unstable TSC and dropped back to
> using the HPET.
> 
> In digging deeper, we found the HPET is not actually incrementing on
> this system. And in fact, the reason why this issue just cropped up was
> because of Thomas's clocksource watchdog code was comparing the TSC to
> the HPET (which wasn't moving) and thought the TSC was broken.
> 
> Anyway, Guliherme checked for a BIOS update and did not find one, so
> I've added a DMI blacklist against his system so the HPET is not used.
> 
> Many thanks to Guilherme for the slow and laborious testing that finally
> narrowed down this issue.
> 

OK, I tagged that for -stable too.

> 
> diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
> index 17d7345..1ae27f3 100644
> --- a/arch/i386/kernel/hpet.c
> +++ b/arch/i386/kernel/hpet.c
> @@ -5,6 +5,7 @@
>  #include <linux/init.h>
>  #include <linux/sysdev.h>
>  #include <linux/pm.h>
> +#include <linux/dmi.h>
>  
>  #include <asm/hpet.h>
>  #include <asm/io.h>
> @@ -48,6 +49,31 @@ static int __init hpet_setup(char* str)
>  }
>  __setup("hpet=", hpet_setup);
>  
> +
> +/* DMI Blacklist for bad HPETs */
> +static int __init dmi_mark_hpet_broken(struct dmi_system_id *d)
> +{
> +	printk(KERN_NOTICE "%s detected: HPET does not function.\n",
> +		       d->ident);
> +	boot_hpet_disable = 1;
> +	return 0;
> +}
> +
> +/* List of systems that have known HPETproblems */
> +static struct dmi_system_id bad_hpet_dmi_table[] = {
> +	{
> +	 .callback = dmi_mark_hpet_broken,
> +	 .ident = "Dell OptiPlex 320",
> +	 .matches = {
> +		     DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 320"),
> +		     DMI_MATCH(DMI_BOARD_VENDOR, "Dell Inc."),
> +		     DMI_MATCH(DMI_BOARD_NAME, "0UT237"),
> +		     },
> +	 },
> +	 {}
> +};
> +
> +
>  static inline int is_hpet_capable(void)
>  {
>  	return (!boot_hpet_disable && hpet_address);
> @@ -228,6 +254,8 @@ int __init hpet_enable(void)
>  	uint64_t hpet_freq;
>  	u64 tmp;
>  
> +	dmi_check_system(bad_hpet_dmi_table);
> +
>  	if (!is_hpet_capable())
>  		return 0;

The table can be __initdata, can't it?


--- a/arch/i386/kernel/hpet.c~blacklist-dell-optiplex-320-from-using-the-hpet-fix
+++ a/arch/i386/kernel/hpet.c
@@ -60,7 +60,7 @@ static int __init dmi_mark_hpet_broken(s
 }
 
 /* List of systems that have known HPETproblems */
-static struct dmi_system_id bad_hpet_dmi_table[] = {
+static struct dmi_system_id __initdata bad_hpet_dmi_table[] = {
 	{
 	 .callback = dmi_mark_hpet_broken,
 	 .ident = "Dell OptiPlex 320",
@@ -73,7 +73,6 @@ static struct dmi_system_id bad_hpet_dmi
 	 {}
 };
 
-
 static inline int is_hpet_capable(void)
 {
 	return (!boot_hpet_disable && hpet_address);
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo vger kernel org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3173
retrieving revision 1.3174
diff -u -r1.3173 -r1.3174
--- kernel-2.6.spec	18 May 2007 19:20:08 -0000	1.3173
+++ kernel-2.6.spec	18 May 2007 19:26:54 -0000	1.3174
@@ -422,6 +422,7 @@
 Patch204: linux-2.6-x86-dont-delete-cpu_devs-data.patch
 Patch205: linux-2.6-x86-fix-oprofile.patch
 Patch206: linux-2.6-x86-fsc-interrupt-controller-quirk.patch
+Patch207: linux-2.6-x86-dell-hpet.patch
 
 # 300 - 399   ppc(64)
 Patch300: linux-2.6-g5-therm-shutdown.patch
@@ -1085,6 +1086,8 @@
 %patch205 -p1
 # quirk for Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller
 %patch206 -p1
+# Blacklist Dell Optiplex 320 from using the HPET
+%patch207 -p1
 
 #
 # PowerPC
@@ -2392,6 +2395,9 @@
 - important phy and ssb bus fixes for bcm43xx-mac80211
 
 * Fri May 18 2007 Dave Jones <davej redhat com>
+- Blacklist Dell Optiplex 320 from using the HPET.
+
+* Fri May 18 2007 Dave Jones <davej redhat com>
 - Disable ub driver. (#204396)
 
 * Fri May 18 2007 John W. Linville <linville redhat com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]