From: Borislav Petkov <bp@alien8.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@amd64.org>,
"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
john stultz <johnstul@us.ibm.com>,
"Herrmann3, Andreas" <Andreas.Herrmann3@amd.com>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>, Ingo Molnar <mingo@elte.hu>,
"hpa@linux.intel.com" <hpa@linux.intel.com>,
Markus Trippelsdorf <markus@trippelsdorf.de>
Subject: Re: [PATCH -v1.1] HPET: Fix HPET readout for small deltas
Date: Tue, 30 Nov 2010 06:32:01 +0100 [thread overview]
Message-ID: <20101130053201.GA19176@liondog.tnic> (raw)
In-Reply-To: <alpine.LFD.2.00.1011292322080.2900@localhost6.localdomain6>
On Mon, Nov 29, 2010 at 11:36:05PM +0100, Thomas Gleixner wrote:
> On Mon, 29 Nov 2010, Borislav Petkov wrote:
> >
> > + /* Accept only sensible values written by BIOS */
> > + if (hpet_tbl->minimum_tick < hpet_min_tick)
> > + hpet_min_tick = hpet_tbl->minimum_tick;
>
> I ran this through everything I could get hold of. And as I feared
> when ACPI was mentioned in the first place, I found at least three
> machines which have hpet_tbl->minimum_tick < 4. Two of those failed to
> boot.
Damn, that's just f*cked up.
> This is all doomed to fail.
>
> 1) ACPI's trustworthiness aproaches ZERO
>
> 2) The chipset manufactures who implement the "HPET spec" are even
> worse. They could tell us the exact number of cycles which are
> necessary to make these "specificatin compliant" trainwrecks
> functional, but all we get is a reference to #1.
... and also, there's the notion of different HPET implementations from
the different chipset vendors hiding under the compliancy blanket. I
could venture a wild guess which shouldn't be far from the truth that
the "exact number of cycles" is different for each implementation.
> Crap. If you don't come up with some real facts,
Sorry, this is all I got ;-( - I'm sure you can imagine why...
> I'm simply going to commit
>
> diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
> index ae03cab..0388a70 100644
> --- a/arch/x86/kernel/hpet.c
> +++ b/arch/x86/kernel/hpet.c
> @@ -408,7 +408,7 @@ static int hpet_next_event(unsigned long delta,
> */
> res = (s32)(cnt - hpet_readl(HPET_COUNTER));
>
> - return res < 8 ? -ETIME : 0;
> + return res < 128 ? -ETIME : 0;
> }
>
> static void hpet_legacy_set_mode(enum clock_event_mode mode,
>
> along with the corresponding fix for the min_delta_ns value.
I'm afraid this is our only option right now.
--
Regards/Gruss,
Boris.
prev parent reply other threads:[~2010-11-30 5:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 15:52 Borislav Petkov
2010-11-29 22:36 ` Thomas Gleixner
2010-11-30 5:32 ` Borislav Petkov [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=20101130053201.GA19176@liondog.tnic \
--to=bp@alien8.de \
--cc=Andreas.Herrmann3@amd.com \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@redhat.com \
--cc=bp@amd64.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@linux.intel.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=mingo@elte.hu \
--cc=mtosatti@redhat.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
all inboxes | Powered by JetHome®