From patchwork Thu Apr 2 03:34:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 46696 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7B0BE216D1 for ; Thu, 2 Apr 2015 03:36:53 +0000 (UTC) Received: by lbfb1 with SMTP id b1sf14478173lbf.2 for ; Wed, 01 Apr 2015 20:36:52 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=MxButo4b5+iv+GygfDqstTsm7qpr4bVQIgupMTyihnM=; b=aQ0ljANbNDtTq916f2pyi8ihSrZ/NqUsaZ/f0NIm2MdR7b/jz7zbqUBDffIW0bM/UG NF8dCLIb/ac/OnT1RSPpvscv9cY8UxvvxvyrBF74gAlXoOzWXAWestr2l4maURsxGe1w IqqX1xe5LkUMF1uybC9zDpXSmxHEPRbSvbxZ1QVZaxscXP2bVIolPqfBLsIF6MQJwdG/ oRIRGa0YrgMjRbgQLgY/X1K1bDLhDHTDfC8sw6fo/ixxR1FgtPqv+d2cG80uO8hQt4m1 ItFNhFnOKd+bZDH6yR9cmawi3NFefGVqFJuc6IipZOfNE1CIXfvdyH9PFmCulUVUnX4c C2gA== X-Gm-Message-State: ALoCoQn2kbzVMsoN3L3E4+7trdHsqfDKEVNoZOHeLCV+MWDeO/ShpigODw1wb7htf5vOG/rsKgll X-Received: by 10.152.23.7 with SMTP id i7mr3431920laf.1.1427945812495; Wed, 01 Apr 2015 20:36:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.36 with SMTP id n4ls136125laj.27.gmail; Wed, 01 Apr 2015 20:36:52 -0700 (PDT) X-Received: by 10.112.17.68 with SMTP id m4mr38430880lbd.50.1427945812165; Wed, 01 Apr 2015 20:36:52 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id ns5si3155730lbb.0.2015.04.01.20.36.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2015 20:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lahf3 with SMTP id f3so50489104lah.2 for ; Wed, 01 Apr 2015 20:36:52 -0700 (PDT) X-Received: by 10.152.29.68 with SMTP id i4mr38875816lah.19.1427945812005; Wed, 01 Apr 2015 20:36:52 -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.112.57.201 with SMTP id k9csp1063853lbq; Wed, 1 Apr 2015 20:36:51 -0700 (PDT) X-Received: by 10.68.102.228 with SMTP id fr4mr82038320pbb.87.1427945810102; Wed, 01 Apr 2015 20:36:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13si5580227pdf.62.2015.04.01.20.36.48; Wed, 01 Apr 2015 20:36:50 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753340AbbDBDgq (ORCPT + 27 others); Wed, 1 Apr 2015 23:36:46 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33678 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753004AbbDBDfL (ORCPT ); Wed, 1 Apr 2015 23:35:11 -0400 Received: by pacgg7 with SMTP id gg7so71307764pac.0 for ; Wed, 01 Apr 2015 20:35:11 -0700 (PDT) X-Received: by 10.68.94.197 with SMTP id de5mr83265908pbb.57.1427945711195; Wed, 01 Apr 2015 20:35:11 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id da10sm3572603pac.42.2015.04.01.20.35.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 20:35:10 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Prarit Bhargava , Richard Cochran Subject: [PATCH 20/21] timekeeping: Change timekeeping_check_update() to take a tk_read_base Date: Wed, 1 Apr 2015 20:34:40 -0700 Message-Id: <1427945681-29972-21-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427945681-29972-1-git-send-email-john.stultz@linaro.org> References: <1427945681-29972-1-git-send-email-john.stultz@linaro.org> 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: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) 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: , Ingo noted there was no reason to pass the timekeeper structure to timekeeping_check_update(), and the tk_read_base would be fine, which simplifies the amount of dereferencing to get to values we care about. So this patch simply changes the function as suggested. Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Prarit Bhargava Cc: Richard Cochran Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index fe91e8e..676896e 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -131,11 +131,11 @@ static int timekeeping_overflow_seen; /* last_warning is only modified under the timekeeping lock */ static long timekeeping_last_warning; -static void timekeeping_check_update(struct timekeeper *tk, cycle_t offset) +static void timekeeping_check_update(struct tk_read_base *tkr, cycle_t offset) { - cycle_t max_cycles = tk->tkr_mono.clock->max_cycles; - const char *name = tk->tkr_mono.clock->name; + cycle_t max_cycles = tkr->clock->max_cycles; + const char *name = tkr->clock->name; if (offset > max_cycles) { printk_deferred("WARNING: timekeeping: Cycle offset (%lld) is larger than allowed by the '%s' clock's max_cycles value (%lld): time overflow danger\n", @@ -210,7 +210,7 @@ static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr) return delta; } #else -static inline void timekeeping_check_update(struct timekeeper *tk, cycle_t offset) +static inline void timekeeping_check_update(struct tk_read_base *tkr, cycle_t offset) { } static inline cycle_t timekeeping_get_delta(struct tk_read_base *tkr) @@ -1794,7 +1794,7 @@ void update_wall_time(void) goto out; /* Do some additional sanity checking */ - timekeeping_check_update(real_tk, offset); + timekeeping_check_update(&real_tk->tkr_mono, offset); /* * With NO_HZ we may have to accumulate many cycle_intervals