From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755350AbcBXKum (ORCPT ); Wed, 24 Feb 2016 05:50:42 -0500 Received: from www.linutronix.de ([62.245.132.108]:46889 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771AbcBXKui (ORCPT ); Wed, 24 Feb 2016 05:50:38 -0500 Date: Wed, 24 Feb 2016 11:49:10 +0100 (CET) From: Thomas Gleixner To: "Christopher S. Hall" cc: richardcochran@gmail.com, mingo@redhat.com, john.stultz@linaro.org, hpa@zytor.com, jeffrey.t.kirsher@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, kevin.b.stanton@intel.com, kevin.j.clarke@intel.com Subject: Re: [PATCH v8 1/8] time: Add cycles to nanoseconds translation In-Reply-To: <1456139726-3327-2-git-send-email-christopher.s.hall@intel.com> Message-ID: References: <1456139726-3327-1-git-send-email-christopher.s.hall@intel.com> <1456139726-3327-2-git-send-email-christopher.s.hall@intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Feb 2016, Christopher S. Hall wrote: > The timekeeping code does not currently provide a way to translate > externally provided clocksource cycles to system time. The cycle count > is always provided by the result clocksource read() method internal to > the timekeeping code. The added function timekeeping_cycles_to_ns() > calculated a nanosecond value from a cycle count that can be added to > tk_read_base.base value yielding the current system time. This allows > clocksource cycle values external to the timekeeping code to provide a > cycle count that can be transformed to system time. Reviewed-by: Thomas Gleixner