From patchwork Fri Mar 28 11:41:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27271 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 64EA320062 for ; Fri, 28 Mar 2014 11:43:42 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id j17sf17547113oag.2 for ; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Ma86DSZ3+ydq8WCNYNb8nbyPIc1oRjtE1KwGcZe8Kcc=; b=Ek7xB2CIFZfJwh03nx+5ljemvuKwK+U/84wO7DTdPjN7WTBp7RdiMEZu7cT6uZtnq6 0zPvK6dCNP9vExdlJ5glrSc1wMzt3oZFOASXzfyM3QR7vtDQgTDN6VAiTTRzrtj9uyet QX3KZTf3nkjnML7nRisXsDPK/BVH66t0RM9WKPn7EkXlyC7UHa+k/pYnrLEVbHbX47ah 9Q0yp8Kt2/6jvLFqm4Fpi/7yJ9ozmdbnFOlPkfBSIHqvuX+X1krt5agYu1DqwgH8SniL A9h/D+4Itw4GSs031fyBxmfxXFjo3lHmb3KuyypY12pzJfZhRl7P1m8c+luTInGaqosV Hb8w== X-Gm-Message-State: ALoCoQme44VLz+nwQaP2YFS8z74JhV31gXZcyBTTTap97bZKB4WV5OgekaqtLWW/irI90KPmjIo/ X-Received: by 10.182.104.200 with SMTP id gg8mr3062446obb.45.1396007021962; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.131 with SMTP id l3ls1586936qgf.40.gmail; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Received: by 10.58.91.101 with SMTP id cd5mr6624883veb.5.1396007021844; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id vg8si1196369veb.93.2014.03.28.04.43.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so5526847veb.41 for ; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Received: by 10.220.191.134 with SMTP id dm6mr6868226vcb.16.1396007021763; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp1606vcv; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Received: by 10.66.164.36 with SMTP id yn4mr8098437pab.25.1396007021015; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id et3si3511120pbc.420.2014.03.28.04.43.40; Fri, 28 Mar 2014 04:43:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752443AbaC1Lnf (ORCPT + 27 others); Fri, 28 Mar 2014 07:43:35 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:58718 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752406AbaC1Lna (ORCPT ); Fri, 28 Mar 2014 07:43:30 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi5so642100wib.5 for ; Fri, 28 Mar 2014 04:43:29 -0700 (PDT) X-Received: by 10.180.189.139 with SMTP id gi11mr46878031wic.53.1396007009455; Fri, 28 Mar 2014 04:43:29 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id q2sm6438593wix.5.2014.03.28.04.43.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:28 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, linaro-networking@linaro.org, Arvind.Chauhan@arm.com, Viresh Kumar , Ingo Molnar Subject: [PATCH 14/16] hrtimer: replace base by new_base to get resolution: __hrtimer_start_range_ns() Date: Fri, 28 Mar 2014 17:11:33 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This code was added long back by following commit: commit 06027bdd278a32a84b273e41db68a5db8ffd2bb6 Author: Ingo Molnar Date: Tue Feb 14 13:53:15 2006 -0800 [PATCH] hrtimer: round up relative start time on low-res arches Don't know if it was a mistake or was intentional. But probably we must use new_base instead of base here to get resolution. Things might be working smoothly as resolution might be same for both the bases in most of the cases. Cc: Ingo Molnar Signed-off-by: Viresh Kumar --- Also commit log of above commit has this: "This will go away with the GTOD framework". So, should we get this removed? kernel/hrtimer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 0ae0fbf..5d77f36 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -925,12 +925,11 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, unsigned long delta_ns, const enum hrtimer_mode mode, int wakeup) { - struct hrtimer_clock_base *base, *new_base; + struct hrtimer_clock_base *new_base; unsigned long flags; int ret; lock_hrtimer_base(timer, &flags); - base = timer->base; /* Remove an active timer from the queue: */ ret = remove_hrtimer(timer); @@ -949,7 +948,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, * timeouts. This will go away with the GTOD framework. */ #ifdef CONFIG_TIME_LOW_RES - tim = ktime_add_safe(tim, base->resolution); + tim = ktime_add_safe(tim, new_base->resolution); #endif }