From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754229Ab0IOOnJ (ORCPT ); Wed, 15 Sep 2010 10:43:09 -0400 Received: from www.tglx.de ([62.245.132.106]:51300 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754154Ab0IOOnI (ORCPT ); Wed, 15 Sep 2010 10:43:08 -0400 Date: Wed, 15 Sep 2010 16:42:38 +0200 (CEST) From: Thomas Gleixner To: Borislav Petkov cc: LKML , Ingo Molnar , "H. Peter Anvin" , Nix , Artur Skawina , Damien Wyart , John Drescher , Venkatesh Pallipadi , Arjan van de Ven , "Herrmann3, Andreas" , Suresh Siddha Subject: Re: [PATCH RFC] x86: hpet: Avoid the readback penalty In-Reply-To: <20100915144034.GC968@aftab> Message-ID: References: <20100915144034.GC968@aftab> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 15 Sep 2010, Borislav Petkov wrote: > From: Thomas Gleixner > Date: Wed, Sep 15, 2010 at 09:11:57AM -0400 > > > On Tue, 14 Sep 2010, tip-bot for Thomas Gleixner wrote: > > > x86: hpet: Work around hardware stupidity > > > > After my brain recovered from yesterdays exposure with the x86 timer > > horror, I came up with a different solution for this problem, which > > avoids the readback of the compare register completely. It works > > nicely on my affected ATI system, but needs some exposure to the other > > machines. > > Will run in on a couple of SBx00 machines I got here. > > ... > > > If cmp is less than 8 HPET clock cycles, then we decide that the event > > has happened already and return -ETIME. That covers the above #1 and > > #2 problems which would cause a wait for HPET wraparound (~306 > > seconds). > > Make sense. I guess you're choosing a value of 8 just to be on the safe > side wrt to HPET clock cycles it takes to write the cmp register? Yes, I do _NOT_ trust those hardware dudes at all. A factor 4 seems to be an appropriate choice:) Thanks, tglx