From patchwork Tue Feb 26 22:17:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2187721 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9210CDF215 for ; Tue, 26 Feb 2013 22:18:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163Ab3BZWRc (ORCPT ); Tue, 26 Feb 2013 17:17:32 -0500 Received: from mail-we0-f182.google.com ([74.125.82.182]:43429 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755863Ab3BZWRb (ORCPT ); Tue, 26 Feb 2013 17:17:31 -0500 Received: by mail-we0-f182.google.com with SMTP id t57so3946605wey.41 for ; Tue, 26 Feb 2013 14:17:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=shLxtTdEIpp9EM8exTc31T8jiIZ6SF9AN8HYkzb/+1s=; b=S/u0Bh3RYg9GLm5dcTNdVNE/iC+1foiwY7LME1eZDnpK75VdwJKe2AOiFcTzdvfK8G cIyBkGGg82w6Enina/qzTLBz0mVsFCmZiko9CX81EbzW+UcDy9/gSjavRuk+6eWoWZiZ /qINvBNQHTNHrTnbdLs0E3ko5Ruujbfrp2tF35VLELS7V4un6CEUtRZFnQsJ7WL9huNg nVrYxszKYBJ72BN+gQbmPd9hBgZaGLh+XiXxcHKW2Xj1mrDbi9fWAaqiWuczypJ9NNiW FLsaNVapW2xnCuWyGJhhQ/BQrmQeCbWWagSdtHq1kThTwbzxGnmYKh/XkYvxtNOHCRc0 U5YA== X-Received: by 10.180.98.98 with SMTP id eh2mr854189wib.7.1361917049778; Tue, 26 Feb 2013 14:17:29 -0800 (PST) Received: from mai.home (AToulouse-654-1-437-74.w83-205.abo.wanadoo.fr. [83.205.68.74]) by mx.google.com with ESMTPS id ed6sm4920201wib.9.2013.02.26.14.17.27 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Feb 2013 14:17:29 -0800 (PST) From: Daniel Lezcano To: john.stultz@linaro.org, tglx@linutronix.de Cc: viresh.kumar@linaro.org, jacob.jun.pan@linux.intel.com, linux-arm-kernel@lists.infradead.org, santosh.shilimkar@ti.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, patches@linaro.org, linus.walleij@stericsson.com Subject: [PATCH 1/4] time : pass broadcast parameter Date: Tue, 26 Feb 2013 23:17:24 +0100 Message-Id: <1361917047-29230-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361917047-29230-1-git-send-email-daniel.lezcano@linaro.org> References: <1361917047-29230-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmM62gOLamNLcv8ZBtTeGSLw1qkLID6kUf+wk3bX3ooOrREKkLmXyUh75PxwFTbNKhLO7t2 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The broadcast timer could be passed as parameter to the function instead of using again tick_broadcast_device.evtdev which was previously used in the caller function. Signed-off-by: Daniel Lezcano --- kernel/time/tick-broadcast.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 2fb8cb8..6197ac0 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -406,10 +406,9 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void) return to_cpumask(tick_broadcast_oneshot_mask); } -static int tick_broadcast_set_event(ktime_t expires, int force) +static int tick_broadcast_set_event(struct clock_event_device *bc, + ktime_t expires, int force) { - struct clock_event_device *bc = tick_broadcast_device.evtdev; - if (bc->mode != CLOCK_EVT_MODE_ONESHOT) clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); @@ -479,7 +478,7 @@ again: * Rearm the broadcast device. If event expired, * repeat the above */ - if (tick_broadcast_set_event(next_event, 0)) + if (tick_broadcast_set_event(dev, next_event, 0)) goto again; } raw_spin_unlock(&tick_broadcast_lock); @@ -522,7 +521,7 @@ void tick_broadcast_oneshot_control(unsigned long reason) cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask()); clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN); if (dev->next_event.tv64 < bc->next_event.tv64) - tick_broadcast_set_event(dev->next_event, 1); + tick_broadcast_set_event(bc, dev->next_event, 1); } } else { if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) { @@ -591,7 +590,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); tick_broadcast_init_next_event(to_cpumask(tmpmask), tick_next_period); - tick_broadcast_set_event(tick_next_period, 1); + tick_broadcast_set_event(bc, tick_next_period, 1); } else bc->next_event.tv64 = KTIME_MAX; } else {