From patchwork Sat Mar 2 10:10:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2206581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 20AB1DF230 for ; Sat, 2 Mar 2013 10:13:22 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UBjOV-0000qF-IN; Sat, 02 Mar 2013 10:10:19 +0000 Received: from mail-we0-x22c.google.com ([2a00:1450:400c:c03::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UBjOR-0000pa-Tj for linux-arm-kernel@lists.infradead.org; Sat, 02 Mar 2013 10:10:17 +0000 Received: by mail-we0-f172.google.com with SMTP id x10so3245156wey.17 for ; Sat, 02 Mar 2013 02:10:13 -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=VamCx1vUDmdOaHUxXwSe0o+E4WVkFpgkcJ5l3iDTt81vzbrd7VG56K+PmoL7GX8GVK qmAPEUGNxY9Gz/m6PPo7mqFVx3kSALLuqYYZGLkJfxK4FFbwUURaRISBMjgZhp9cDmks Wkswku1EzO8mrVXNKEBiTZtag/frTvmROgCsHDAL92/WnDXpY3U1hTn4YqQEYEskDAeD Jt6w4frk9OLTvT5WUuE+7oxbnC1/8lVYSdyI5UMbEfzo7OZWZGP6pTnT3mv9P9i9He0N 20ds1iGIimpqkA/N45Zuk7r+mjBWT/U4qmJXJ5Iokt2w5UvaNuKBuh+V/ZsZ+Ln32nRG Tozg== X-Received: by 10.180.79.227 with SMTP id m3mr2410422wix.12.1362219013473; Sat, 02 Mar 2013 02:10:13 -0800 (PST) Received: from mai.home (AToulouse-654-1-336-203.w86-199.abo.wanadoo.fr. [86.199.223.203]) by mx.google.com with ESMTPS id cf8sm2519888wib.1.2013.03.02.02.10.11 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Mar 2013 02:10:12 -0800 (PST) From: Daniel Lezcano To: john.stultz@linaro.org, tglx@linutronix.de Subject: [PATCH 1/4][V2] time : pass broadcast parameter Date: Sat, 2 Mar 2013 11:10:10 +0100 Message-Id: <1362219013-18173-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362219013-18173-1-git-send-email-daniel.lezcano@linaro.org> References: <1362219013-18173-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmPkh9aXg5lIja/QNlicGdy+UyGWRuqgvSiDYq56G0U76AsVUz/hy6/T4Svnm3eZBAF7kl6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130302_051016_149519_1F45BE82 X-CRM114-Status: GOOD ( 11.68 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: jacob.jun.pan@linux.intel.com, vincent.guittot@linaro.org, linus.walleij@stericsson.com, linux-pm@vger.kernel.org, viresh.kumar@linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, rickard.andersson@stericsson.com, linaro-kernel@lists.linaro.org, santosh.shilimkar@ti.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 {