From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757096AbbCGJcW (ORCPT ); Sat, 7 Mar 2015 04:32:22 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:46890 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbbCGJcS (ORCPT ); Sat, 7 Mar 2015 04:32:18 -0500 Date: Sat, 7 Mar 2015 10:32:14 +0100 From: Ingo Molnar To: John Stultz Cc: lkml , Dave Jones , Linus Torvalds , Thomas Gleixner , Richard Cochran , Prarit Bhargava , Stephen Boyd , Peter Zijlstra Subject: Re: [PATCH 06/12] time: Add infrastructure to cap clocksource reads to the max_cycles value Message-ID: <20150307093214.GE30888@gmail.com> References: <1425696603-16878-1-git-send-email-john.stultz@linaro.org> <1425696603-16878-7-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-7-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: > When calculating the current delta since the last tick, we > currently have no hard protections to prevent a multiplciation Typo. > overflow from ocurring. Typo. > This patch introduces infrastructure to allow a capp that Typo ... > +static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr) > +{ > + /* calculate the delta since the last update_wall_time */ > + return clocksource_delta(tkr->read(tkr->clock), tkr->cycle_last, > + tkr->mask); Please don't do spurious col80 line breaks that don't improve the end result. Thanks, Ingo