public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergio Monteiro Basto <sergio@sergiomb.no-ip.org>
To: Andreas Arens <ari@goron.de>
Cc: acpi devel <linux-acpi@vger.kernel.org>,
	tglx@linutronix.de, Siddha@vger.kernel.org,
	Suresh B <suresh.b.siddha@intel.com>, Andi Kleen <ak@suse.de>,
	Lee Revell <rlrevell@joe-job.com>,
	Chris Friesen <cfriesen@nortel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	len.brown@intel.com, Ingo Molnar <mingo@elte.hu>,
	Arjan van de Ven <arjan@infradead.org>,
	john stultz <johnstul@us.ibm.com>
Subject: Re: AMD X2 unsynced TSC fix?
Date: Thu, 16 Nov 2006 01:45:24 +0000	[thread overview]
Message-ID: <1163641524.3369.2.camel@monteirov> (raw)
In-Reply-To: <1163641096.3109.17.camel@monteirov>


[-- Attachment #1.1: Type: text/plain, Size: 1395 bytes --]

yap Andreas Arens send the patch just for me, I am sending it to the
maling lists.


On Thu, 2006-11-16 at 01:38 +0000, Sergio Monteiro Basto wrote:
> On Wed, 2006-11-15 at 19:40 +0100, Andreas Arens wrote:
> > as I see from the dmesg on the Fedora bugzilla, your acpi tables
> > don't provide an entry to the HPET timer. 
> 
> > As the VIA8237 happens to have a built-in HPET, I was able to force it
> > on using the
> > attached patch (against 2.6.18) on an X2 system with the same
> > problem, which greatly improved the system stability for me.
> 
> But I have one Intel(R) Pentium(R) D CPU 2.8 on a VIA8237
> My latest suspect of the root of the problem of my computer is not in
> Processor but in those VIAs. As you find that "don't provide an entry to
> the HPET timer on acpi tables" it match, but how do you know that ?
> I don't send DSDT on bugzilla 
> 
> 
> > The patch is hand-crafted from some older clock-tick kernel tree
> > sources I found by googling.
> > 
> > The thing is hackish and not suitable for mainline inclusion,
> > but may be useful nontheless.
> > If you find it useful, and it helps you please let me know.
> 
> I try your patch and it give me this differences on dmesg (file attach),
> detect a different timer.c but no improvement without notsc boot option
> and with notsc the computer got worst.
> 
> 
> > 
-- 
Sérgio M.B.

[-- Attachment #1.2: 2_6_18_via_8237_force_hpet_enable.diff --]
[-- Type: text/x-patch, Size: 1436 bytes --]

--- linux-2.6.18-gentoo-r2/arch/x86_64/kernel/time.c.unpatched	2006-11-15 19:29:07.000000000 +0100
+++ linux-2.6.18-gentoo-r2/arch/x86_64/kernel/time.c	2006-11-15 19:30:51.000000000 +0100
@@ -42,6 +42,9 @@
 #ifdef CONFIG_X86_LOCAL_APIC
 #include <asm/apic.h>
 #endif
+#if 1
+#include <linux/pci_ids.h>
+#endif
 
 #ifdef CONFIG_CPU_FREQ
 static void cpufreq_delayed_get(void);
@@ -815,6 +818,48 @@
 static int hpet_init(void)
 {
 	unsigned int id;
+#if 1
+	union conf_address {
+		struct {
+			u8	reg;
+			u8	func:	3;
+			u8	dev:	5;
+			u8	bus;
+			u8	reserved:7;
+			u8	enable:	1;
+		} bits;
+		u32	dword;
+	};
+	union conf_address ca = {
+		.bits.reg = 0,
+		.bits.dev = 17,
+		.bits.enable = 1
+	};
+	union {
+		struct {
+			u8 control;
+			u8 address[3];
+		} hpet;
+		unsigned raw;
+	} hpet;
+	u32 vendor_id, control;
+
+	control = inl(0xcf8);
+	printk("%X\n", control);
+	outl(ca.dword, 0xcf8);
+	vendor_id = inl(0xcfc);
+	if (vendor_id == (PCI_VENDOR_ID_VIA + (PCI_DEVICE_ID_VIA_8237 << 16))) {
+		hpet.raw = 0xFED00000;
+		hpet.hpet.control = 0x80;
+		ca.bits.reg = 0x68;
+		outl(ca.dword, 0xcf8);
+		outl(hpet.raw, 0xcfc);
+		outl(ca.dword, 0xcf8);
+		vxtime.hpet_address = (inl(0xcfc) & 0xFFFFFF00);
+		printk(KERN_WARNING "time.c: WARNING: Enabled VIA8237 HPET "
+		       "at %#lx.\n", vxtime.hpet_address);
+	}
+#endif
 
 	if (!vxtime.hpet_address)
 		return -1;

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2166 bytes --]

      reply	other threads:[~2006-11-16  1:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1161969308.27225.120.camel@mindpipe>
     [not found] ` <1162009373.26022.22.camel@localhost.localdomain>
     [not found]   ` <1162177848.2914.13.camel@localhost.portugal>
     [not found]     ` <200610301623.14535.ak@suse.de>
     [not found]       ` <1162253008.2999.9.camel@localhost.portugal>
     [not found]         ` <20061030184155.A3790@unix-os.sc.intel.com>
     [not found]           ` <1162345608.2961.7.camel@localhost.portugal>
     [not found]             ` <20061031184411.E3790@unix-os.sc.intel.com>
     [not found]               ` <1162945339.4455.12.camel@monteirov>
     [not found]                 ` <1163015628.8335.52.camel@localhost.localdomain>
     [not found]                   ` <1163032780.19484.4.camel@monteirov>
     [not found]                     ` <1163034804.25019.56.camel@localhost>
     [not found]                       ` <1163555514.3099.17.camel@monteirov>
     [not found]                         ` <20061115193514.41C01102C011@mail.goron.de>
2006-11-16  1:38                           ` AMD X2 unsynced TSC fix? Sergio Monteiro Basto
2006-11-16  1:45                             ` Sergio Monteiro Basto [this message]

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=1163641524.3369.2.camel@monteirov \
    --to=sergio@sergiomb.no-ip.org \
    --cc=Siddha@vger.kernel.org \
    --cc=ak@suse.de \
    --cc=ari@goron.de \
    --cc=arjan@infradead.org \
    --cc=cfriesen@nortel.com \
    --cc=johnstul@us.ibm.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rlrevell@joe-job.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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