Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753892AbbFDQwi (ORCPT ); Thu, 4 Jun 2015 12:52:38 -0400 Received: from mail-ig0-f180.google.com ([209.85.213.180]:37367 "EHLO mail-ig0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbbFDQwf (ORCPT ); Thu, 4 Jun 2015 12:52:35 -0400 MIME-Version: 1.0 In-Reply-To: <20150604163816.6684.qmail@ns.horizon.com> References: <20150603190719.20769.qmail@ns.horizon.com> <20150604163816.6684.qmail@ns.horizon.com> Date: Thu, 4 Jun 2015 09:52:34 -0700 X-Google-Sender-Auth: CV2RdcJvzrCgSf6L-ZVcwcgar7k Message-ID: Subject: Re: [PATCH RFC] x86, tsc: Allow for high latency in quick_pit_calibrate() From: Linus Torvalds To: George Spelvin Cc: Ingo Molnar , Adrian Hunter , Andi Kleen , Peter Anvin , Linux Kernel Mailing List , Andy Lutomirski , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1287 Lines: 28 On Thu, Jun 4, 2015 at 9:38 AM, George Spelvin wrote: > > Also, you don't have to enable interrupts in the RTC to get the PF bit > set periodically. You only program the interval (register A lsbits), > not the IRQ (register B bit 6). In fact, disabling the interrupt is > probably safer. Also, I don't know what Ingo's test-code looked like, but it is probably best to set the RTC to 8kHz, and then time a few iterations of "count cycles between PF gets set" rather than "wait for bit to get set after programming". With the usual "have timestamp both before the read that shows the bit set, and after the read" so that you can estimate how big the error window is. Maybe that's what Ingo's jitter numbers already are, without seeing what the test-code was it's hard to guess. And you definitely want to disable interrupts and make sure nobody else reads that register, since reading it will clear it. Although I guess that during early boot there shouldn't be any other RTC activity.. Linus -- 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/