From: Thomas Gleixner <tglx@linutronix.de>
To: Borislav Petkov <borislav.petkov@amd.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Stephan Wolf <stephan@letzte-bankreihe.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Herrmann3, Andreas" <Andreas.Herrmann3@amd.com>
Subject: Re: [PATCH] enable readback to get HPET working on ATI SB4x00, kernel 2.6.35_rc5
Date: Wed, 14 Jul 2010 23:04:18 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1007142134140.3321@localhost.localdomain> (raw)
In-Reply-To: <20100714183216.GC15651@aftab>
On Wed, 14 Jul 2010, Borislav Petkov wrote:
> From: Linus Torvalds <torvalds@linux-foundation.org>
> Date: Wed, Jul 14, 2010 at 02:17:27PM -0400
>
> > > I'll try to find out which chipsets are actually affected but in the
> > > meantime we might want to do a temporary fix by enabling the readback
> > > back(!) on all ATI chipsets so that we don't uncover anymore bugs like
> > > the one above, hmmm?
> >
> > That sounds like the right solution for now, yes. Rather than make
> > the readback quirk depend on one particular SMBUS revision, make it
> > happen unconditionally for an AMD northbridge (or is the HPET in the
> > SB?
>
> Yeah, its in the southbridge which is part of the chipset. Actually
> we'll have to somehow match ATI chipsets only since we have also nVidia
> chipsets with AMD cpus in them.
>
> /me goes to meditate a little about it.
>
> > I forget - somebody who knows the details and can test it on a
> > machine or two should do the actual patch).
>
> I'll try to cook up something unless someone beats me to it.
The patch below works on my collection of ATI chipset based machines.
Stefan, does it solve your problem too ?
Thanks,
tglx
-----
Subject: x86-ati-chipsets-hpet-force-readback.patch
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 14 Jul 2010 21:36:27 +0200
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Index: linux-2.6/arch/x86/kernel/early-quirks.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/early-quirks.c
+++ linux-2.6/arch/x86/kernel/early-quirks.c
@@ -18,6 +18,7 @@
#include <asm/apic.h>
#include <asm/iommu.h>
#include <asm/gart.h>
+#include <asm/hpet.h>
static void __init fix_hypertransport_config(int num, int slot, int func)
{
@@ -191,6 +192,21 @@ static void __init ati_bugs_contd(int nu
}
#endif
+/*
+ * Force the read back of the CMP register in hpet_next_event()
+ * to work around the problem that the CMP register write seems to be
+ * delayed. See hpet_next_event() for details.
+ *
+ * We do this on all SMBUS incarnations for now until we have more
+ * information about the affected chipsets.
+ */
+static void __init ati_hpet_bugs(int num, int slot, int func)
+{
+#ifdef CONFIG_HPET_TIMER
+ hpet_readback_cmp = 1;
+#endif
+}
+
#define QFLAG_APPLY_ONCE 0x1
#define QFLAG_APPLIED 0x2
#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -220,6 +236,8 @@ static struct chipset early_qrk[] __init
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
+ { PCI_VENDOR_ID_ATI, PCI_ANY_ID,
+ PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_hpet_bugs },
{}
};
Index: linux-2.6/arch/x86/kernel/quirks.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/quirks.c
+++ linux-2.6/arch/x86/kernel/quirks.c
@@ -498,15 +498,10 @@ void force_hpet_resume(void)
* See erratum #27 (Misinterpreted MSI Requests May Result in
* Corrupted LPC DMA Data) in AMD Publication #46837,
* "SB700 Family Product Errata", Rev. 1.0, March 2010.
- *
- * Also force the read back of the CMP register in hpet_next_event()
- * to work around the problem that the CMP register write seems to be
- * delayed. See hpet_next_event() for details.
*/
static void force_disable_hpet_msi(struct pci_dev *unused)
{
hpet_msi_disable = 1;
- hpet_readback_cmp = 1;
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
next prev parent reply other threads:[~2010-07-14 21:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 15:55 [PATCH] enable readback to get HPET working on ATI SB4x00, kernel 2.6.35_rc5 Stephan Wolf
2010-07-14 16:13 ` Linus Torvalds
2010-07-14 16:40 ` Stephan Wolf
2010-07-14 18:11 ` Borislav Petkov
2010-07-14 18:17 ` Linus Torvalds
2010-07-14 18:32 ` Borislav Petkov
2010-07-14 21:04 ` Thomas Gleixner [this message]
2010-07-15 7:06 ` Stephan Wolf
2010-07-15 8:22 ` Thomas Gleixner
2010-07-15 10:02 ` Borislav Petkov
2010-07-15 15:12 ` [tip:x86/urgent] x86: Force HPET readback_cmp for all ATI chipsets tip-bot for Thomas Gleixner
2010-07-14 19:32 ` [PATCH] enable readback to get HPET working on ATI SB4x00, kernel 2.6.35_rc5 Thomas Gleixner
2010-07-14 19:30 ` Thomas Gleixner
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.2.00.1007142134140.3321@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=Andreas.Herrmann3@amd.com \
--cc=borislav.petkov@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stephan@letzte-bankreihe.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