Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752751AbYGYOPW (ORCPT ); Fri, 25 Jul 2008 10:15:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751239AbYGYOPH (ORCPT ); Fri, 25 Jul 2008 10:15:07 -0400 Received: from nf-out-0910.google.com ([64.233.182.186]:40734 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751223AbYGYOPF (ORCPT ); Fri, 25 Jul 2008 10:15:05 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=p7/RQTJB3F3xdi8cZx76O74oD3LJ7ymPYtV8KWL3UIpngOF6EHgXMCALgJ50cXSg2/ UG/6vulFZg4hx4EjtCLEB8BFPk94MjJuDpR78EwrQn0xggg3SSzYuT1A7LiYwqP7/2HS dgvrFkHcl/V6ZRyun/26iokRuvA7mAmRCdv+c= Date: Fri, 25 Jul 2008 18:15:02 +0400 From: Cyrill Gorcunov To: Martin Wilck Cc: Thomas Gleixner , "linux-kernel@vger.kernel.org" , "H. Peter Anvin" , "Wichert, Gerhard" , "Maciej W. Rozycki" Subject: Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe (take 3) Message-ID: <20080725141502.GC28466@lenovo> References: <20080724143151.GA32422@lenovo> <20080724150116.GC32422@lenovo> <48889C14.4070408@fujitsu-siemens.com> <4889968E.6020000@fujitsu-siemens.com> <20080725100844.GA16698@lenovo> <4889C723.7050402@fujitsu-siemens.com> <20080725125950.GA28466@lenovo> <4889D767.5050709@fujitsu-siemens.com> <20080725134831.GB28466@lenovo> <4889DCA4.4010800@fujitsu-siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4889DCA4.4010800@fujitsu-siemens.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1759 Lines: 52 [Martin Wilck - Fri, Jul 25, 2008 at 04:01:08PM +0200] > Cyrill Gorcunov wrote: > >> Martin, if I understood you right - this means your patch is not >> needed? > > The patch would still be needed. Just the reported failure of my > simplified patch on the old kernel would not have occurred in the > current kernel. IOW, the patch is fine for the current kernel, but not > for the old one. > >> Actually on 64bit mode APIC_DIVISOR is a bit hidden in >> __setup_APIC_LVTT - you may see it as APIC_TDR_DIV_16 while setting >> up divisor register. I was proposing patch for that but it leaded >> to potetntial overflow (thanks Ingo for catching) so we leave it as >> is. Maybe I miss something? > > The problem was not that the divisor 16 was used for the counter speed > (APIC_TDR_DIV_16), but that the old code set the counter start value to > (250000000/16) rather than just 250000000. That means the counter will > underflow earlier. > > I am attaching a "take 3" patch which minimizes the risk of an underflow > by using the maximum possible initial value for the APIC timer. > > Martin > > -- > Martin Wilck > PRIMERGY System Software Engineer > FSC IP ESP DEV 6 > > Fujitsu Siemens Computers GmbH > Heinz-Nixdorf-Ring 1 > 33106 Paderborn > Germany > > Tel: ++49 5251 8 15113 > Fax: ++49 5251 8 20209 > Email: mailto:martin.wilck@fujitsu-siemens.com > Internet: http://www.fujitsu-siemens.com > Company Details: http://www.fujitsu-siemens.com/imprint.html > ah, ok, thanks - Cyrill - -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/