lkml.org 
[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH -v1.1] HPET: Fix HPET readout for small deltas
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.

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.

Crap. If you don't come up with some real facts, 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.

Thanks,

tglx


\
 
 \ /
  Last update: 2010-11-29 23:39    [W:0.045 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site