mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Justin Piszcz <jpiszcz@lucidpixels.com>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	john stultz <johnstul@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@infradead.org>
Subject: RE: 2.6.31.4: WARNING: at arch/x86/kernel/hpet.c:390 hpet_next_event+0x70/0x80() [occurs when ACPI_PROCESSOR=y]
Date: Fri, 13 Nov 2009 13:43:54 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.00.0911131340140.5316@p34.internal.lan> (raw)
In-Reply-To: <1258137165.21141.20.camel@localhost.localdomain>



On Fri, 13 Nov 2009, Pallipadi, Venkatesh wrote:

> On Fri, 2009-11-13 at 01:38 -0800, Thomas Gleixner wrote:
>> On Thu, 12 Nov 2009, Pallipadi, Venkatesh wrote:
>>> Yes. Yes. This is a hardware errata. I have a patch to workaround this and
>>> waiting on the errata description to get published..
>>
>> Can we at least have some PCI quirk or whatever until you can push the
>> final workaround out so peoples machines do not explode ?
>
> Its a harmless bug functionality-wise and should not have any side
> effect other than triggering the WARN_ON_ONCE in hpet next event code.
>
> Thanks,
> Venki
>

Venki,

When the following patch is applied though: (courtesy of john stultz)

--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -376,7 +376,7 @@ static void hpet_set_mode(enum clock_event_mode mode,
  static int hpet_next_event(unsigned long delta,
                            struct clock_event_device *evt, int timer)
  {
-       u32 cnt;
+       u32 cnt, check;

         cnt = hpet_readl(HPET_COUNTER);
         cnt += (u32) delta;
@@ -387,7 +387,12 @@ static int hpet_next_event(unsigned long delta,
          * what we wrote hit the chip before we compare it to the
          * counter.
          */
-       WARN_ON_ONCE((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt);
+       check = (u32)hpet_readl(HPET_Tn_CMP(timer));
+       if(check != cnt) {
+               printk("hpet_next_event: hpet_writel failed: 0x%x != 0x%x\n",
+                       check, cnt); 
+               hpet_writel(cnt, HPET_Tn_CMP(timer));
+       }

         return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0;
  }

You can see what it is doing with this patch:

[   22.856850] hpet_next_event: hpet_writel failed: 0x13b7690a != 0x138c5241
[   22.900424] hpet_next_event: hpet_writel failed: 0x138c5241 != 0x13b7691a
[   22.906429] hpet_next_event: hpet_writel failed: 0x13b7691a != 0x1391467c
[   22.923096] hpet_next_event: hpet_writel failed: 0x1391467c != 0x13974b5f
[   22.950698] hpet_next_event: hpet_writel failed: 0x13974b5f != 0x13b7692c
[   22.959424] hpet_next_event: hpet_writel failed: 0x13ad247d != 0x139cdade
[   22.976065] hpet_next_event: hpet_writel failed: 0x139cdade != 0x13ad247c
[   23.003919] hpet_next_event: hpet_writel failed: 0x13ad247c != 0x13a69410
[   23.020581] hpet_next_event: hpet_writel failed: 0x13a69410 != 0x13ad2489
[   23.050692] hpet_next_event: hpet_writel failed: 0x13ad2489 != 0x13b7694d
[   23.069921] hpet_next_event: hpet_writel failed: 0x13b7694d != 0x13b50004
[   23.086577] hpet_next_event: hpet_writel failed: 0x13b50004 != 0x13b8a43d
[   23.103251] hpet_next_event: hpet_writel failed: 0x13b8a43d != 0x13db0607
[   23.124690] hpet_next_event: hpet_writel failed: 0x13bd5467 != 0x13c2fdba
[   23.150604] hpet_next_event: hpet_writel failed: 0x13c2fdba != 0x13db061a
[   23.155307] hpet_next_event: hpet_writel failed: 0x13db061a != 0x13c7a97e
[   23.171975] hpet_next_event: hpet_writel failed: 0x13c7a97e != 0x13d8d6d4
[   23.202978] hpet_next_event: hpet_writel failed: 0x13d8d6d4 != 0x13d21457
[   23.219647] hpet_next_event: hpet_writel failed: 0x13d21457 != 0x13d5b8b8

It makes a high-pitch squeal when this is occurring, is that OK for the HW?

For your patch, will it allow Turbo Mode and the processor module to both
function properly?

Without the patch/processor module, is there any other way to achieve turbo
mode via a BIOS setting or am I stuck with the max CPU multiplier non-turbo?

If your patch is working, do you have it available for testing?

Justin.


  reply	other threads:[~2009-11-13 18:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 14:35 2.6.31.4: WARNING: at arch/x86/kernel/hpet.c:390 hpet_next_event+0x70/0x80() Justin Piszcz
2009-11-11 19:50 ` Dave Jones
2009-11-11 21:32   ` 2.6.31.4: WARNING: at arch/x86/kernel/hpet.c:390 hpet_next_event+0x70/0x80() [occurs when ACPI_PROCESSOR=y] Justin Piszcz
2009-11-12 16:26     ` Justin Piszcz
2009-11-12 16:33       ` Justin Piszcz
2009-11-12 23:39         ` Justin Piszcz
     [not found]         ` <1f1b08da0911121513l32d47b4x8b9722ad3440ceb6@mail.gmail.com>
     [not found]           ` <alpine.DEB.2.00.0911121824290.2852@p34.internal.lan>
2009-11-12 23:40             ` john stultz
2009-11-12 23:45               ` Justin Piszcz
2009-11-12 23:49                 ` john stultz
2009-11-12 23:53                   ` Justin Piszcz
2009-11-12 23:53               ` Thomas Gleixner
2009-11-12 23:56                 ` Justin Piszcz
2009-11-13  0:18                   ` Pallipadi, Venkatesh
2009-11-13  0:20                     ` Justin Piszcz
2009-11-13  0:30                       ` Pallipadi, Venkatesh
2009-11-13  9:38                     ` Thomas Gleixner
2009-11-13 18:32                       ` Pallipadi, Venkatesh
2009-11-13 18:43                         ` Justin Piszcz [this message]
2009-11-14  1:12                           ` Pallipadi, Venkatesh
2009-11-14  8:48                             ` Justin Piszcz
2009-11-17 11:45                               ` Justin Piszcz
2009-11-17 21:37                                 ` Pallipadi, Venkatesh
2009-11-17 22:53                                   ` Justin Piszcz
2009-11-19 22:08                                     ` Pallipadi, Venkatesh
2009-11-19 23:12                                       ` Justin Piszcz

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.DEB.2.00.0911131340140.5316@p34.internal.lan \
    --to=jpiszcz@lucidpixels.com \
    --cc=arjan@infradead.org \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    /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

all inboxes | Powered by JetHome®