linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Ingo Molnar <mingo@elte.hu>
Cc: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de>,
	Jordan Crouse <jordan.crouse@amd.com>, Lars Heete <hel@admin.de>,
	Andres Salomon <dilinger@queued.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 2/2] x86: GEODE add the "mfgptfix" boot time option to fix MFGPT timers
Date: Wed, 23 Jan 2008 22:19:52 +0100	[thread overview]
Message-ID: <20080123211952.GB3081@1wt.eu> (raw)
In-Reply-To: <20080123211746.GA2969@1wt.eu>


The new "mfgptfix" boot command line option may be usd to fix MFGPT
timers on AMD Geode platforms when the BIOS has incorrectly applied
a workaround. TinyBIOS version 0.98 is known to be affected, 0.99
fixes the problem by letting the user disable the workaround.

Signed-off-by: Willy Tarreau <w@1wt.eu>
---
 Documentation/kernel-parameters.txt |    5 +++++
 arch/x86/kernel/mfgpt_32.c          |   15 +++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index c417877..83c6704 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1051,6 +1051,11 @@ and is between 256 and 4096 characters. It is defined in the file
 			Multi-Function General Purpose Timers on AMD Geode
 			platforms.
 
+	mfgptfix	[X86-32] Fix MFGPT timers on AMD Geode platforms when
+			the BIOS has incorrectly applied a workaround. TinyBIOS
+			version 0.98 is known to be affected, 0.99 fixes the
+			problem by letting the user disable the workaround.
+
 	mga=		[HW,DRM]
 
 	mousedev.tap_time=
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 5519091..f38d4a9 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -63,6 +63,21 @@ static int __init mfgpt_disable(char *s)
 }
 __setup("nomfgpt", mfgpt_disable);
 
+/* Reset the MFGPT timers. This is required by some broken BIOSes which already
+ * do the same and leave the system in an unstable state. TinyBIOS 0.98 is
+ * affected at least (0.99 is OK with MFGPT workaround left to off).
+ */
+static int __init mfgpt_fix(char *s)
+{
+	u32 val, dummy;
+
+	/* The following udocumented bit resets the MFGPT timers */
+	val = 0xFF; dummy = 0;
+	wrmsr(0x5140002B, val, dummy);
+	return 1;
+}
+__setup("mfgptfix", mfgpt_fix);
+
 /*
  * Check whether any MFGPTs are available for the kernel to use.  In most
  * cases, firmware that uses AMD's VSA code will claim all timers during
-- 
1.5.3.4


  parent reply	other threads:[~2008-01-23 21:51 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 17:44 2.6.24-rc8 hangs at mfgpt-timer Arnd Hannemann
2008-01-16 21:19 ` Andres Salomon
2008-01-16 21:56   ` Andres Salomon
2008-01-17  9:54     ` Arnd Hannemann
2008-01-17 18:40       ` Andres Salomon
2008-01-17 19:53         ` Arnd Hannemann
2008-01-17 20:42           ` Andres Salomon
2008-01-17 21:19           ` Jordan Crouse
2008-01-17 21:50             ` Arnd Hannemann
2008-01-17 22:36               ` Jordan Crouse
2008-01-17 22:52                 ` Arnd Hannemann
2008-01-17 22:57                   ` Jordan Crouse
2008-01-17 23:39                     ` Arnd Hannemann
2008-01-18  0:40                       ` Jordan Crouse
2008-01-21 23:27                       ` Jordan Crouse
2008-01-21 23:32                         ` Willy Tarreau
2008-01-22 20:15                           ` Willy Tarreau
2008-01-22 21:08                             ` Jordan Crouse
2008-01-22 21:15                               ` Willy Tarreau
2008-01-23 16:36                                 ` Jordan Crouse
2008-01-23 16:10                                   ` Willy Tarreau
2008-01-22  9:03                         ` Arnd Hannemann
2008-01-22 10:11                           ` Lars Heete
2008-01-22 11:18                             ` Arnd Hannemann
2008-01-22 18:15                               ` Jordan Crouse
2008-01-22 19:27                               ` Jordan Crouse
2008-01-22 20:54                                 ` Arnd Hannemann
2008-01-22 21:10                                   ` Ingo Molnar
2008-01-22 21:20                                     ` Willy Tarreau
2008-01-22 21:53                                     ` [git pull] was: " Thomas Gleixner
2008-01-23 21:17                                     ` [PATCH 0/2] Was: " Willy Tarreau
2008-01-23 21:18                                       ` [PATCH 1/2] x86: GEODE fix MFGPT input clock value Willy Tarreau
2008-01-23 21:59                                         ` H. Peter Anvin
2008-01-23 22:11                                           ` Willy Tarreau
2008-01-23 22:22                                             ` H. Peter Anvin
2008-01-23 22:10                                               ` Willy Tarreau
2008-01-23 22:38                                             ` Jordan Crouse
2008-01-23 23:17                                               ` Arnd Hannemann
2008-01-23 21:19                                       ` Willy Tarreau [this message]
2008-01-19  1:06                   ` [GEODE] Geode GX/LX watchdog timer (was 2.6.24-rc8 hangs at mfgpt-timer) Jordan Crouse
2008-01-19  6:36                     ` Willy Tarreau
2008-01-20 13:22                     ` Arnd Hannemann
2008-01-20 16:34                       ` Jordan Crouse
2008-01-21 17:07                       ` Geode GX/LX watchdog timer (RESEND) Jordan Crouse
2008-01-21 18:37                         ` Arnd Hannemann
2008-02-17 14:14                           ` Iain Paton
2008-02-17 14:46                             ` Arnd Hannemann
2008-02-17 14:54                               ` Adrian Bunk
2008-02-17 16:10                                 ` Iain Paton
2008-02-17 17:32                                   ` Andres Salomon
2008-02-17 19:46                                   ` Arnd Hannemann
2008-01-20 20:16                     ` [GEODE] Geode GX/LX watchdog timer (was 2.6.24-rc8 hangs at mfgpt-timer) Lennart Sorensen

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=20080123211952.GB3081@1wt.eu \
    --to=w@1wt.eu \
    --cc=akpm@linux-foundation.org \
    --cc=dilinger@queued.net \
    --cc=hannemann@i4.informatik.rwth-aachen.de \
    --cc=hel@admin.de \
    --cc=hpa@zytor.com \
    --cc=jordan.crouse@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).