From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755496AbbCGJpU (ORCPT ); Sat, 7 Mar 2015 04:45:20 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:43134 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbbCGJpR (ORCPT ); Sat, 7 Mar 2015 04:45:17 -0500 Date: Sat, 7 Mar 2015 10:45:12 +0100 From: Ingo Molnar To: John Stultz Cc: lkml , Dave Jones , Linus Torvalds , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Stephen Boyd , Peter Zijlstra , "David S. Miller" , Martin Schwidefsky Subject: Re: [PATCH 10/12] clocksource: Mostly kill clocksource_register() Message-ID: <20150307094511.GH30888@gmail.com> References: <1425696603-16878-1-git-send-email-john.stultz@linaro.org> <1425696603-16878-11-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425696603-16878-11-git-send-email-john.stultz@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * John Stultz wrote: > A long running project has been to cleanup remaining uses > of clocksource_register(), replacing it with the simpler > clocksource_register_khz/hz(). s/.$/ functions. > However, there are a few cases where we need to self-define > our mult/shift values, so switch the function to a more > obviously internal __clocksource_register(), and consolidate s/(),/() name, > much of the internal logic so we don't have duplication. > + if (freq) { > + /* > + * Calc the maximum number of seconds which we can run before > + * wrapping around. For clocksources which have a mask > 32bit > + * we need to limit the max sleep time to have a good > + * conversion precision. 10 minutes is still a reasonable > + * amount. That results in a shift value of 24 for a > + * clocksource with mask >= 40bit and f >= 4GHz. That maps to > + * ~ 0.06ppm granularity for NTP. s/32bit/32-bit s/40bit/40-bit Thanks, Ingo