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: 15106 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A512423E24 for ; Tue, 26 Feb 2013 22:17:41 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by fiordland.canonical.com (Postfix) with ESMTP id 661A6A18772 for ; Tue, 26 Feb 2013 22:17:41 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id f13so2432406vcb.26 for ; Tue, 26 Feb 2013 14:17:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=shLxtTdEIpp9EM8exTc31T8jiIZ6SF9AN8HYkzb/+1s=; b=UEjAP/7BzpJyaad6qwQ2Yj6J4FHKLy+NwxOAM6//PRRPBF8PHUwnvzv7CoMo+VkTET tGkKwbizgZGRWbPrZoUQ3FbcKCx21glmp/QQz5H6PXRj2Pp7wJ6/AHh6bAA7R97QSF7s MvfwcdkBRT03qPATsnOLi3bA7FjUfPMSQEKx4iLfaJ3r0fgBaPSBVhiUdWBHm1dF5CqL bJWLYp4JHlsqLYYUuCXFaJHTLWgmBTlumtoUMXH9+BtItR0iD4+Uu9D7r0fv9Wht3gKs E/+6KR4UhDVG5g66HrGEol/tuRiRiUB99CSOZD1iFoFsEY8OBPBk2Timf5mtVw4Ne9Kp 7gkg== X-Received: by 10.58.181.201 with SMTP id dy9mr12922073vec.34.1361917060909; Tue, 26 Feb 2013 14:17:40 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp137613veb; Tue, 26 Feb 2013 14:17:40 -0800 (PST) X-Received: by 10.181.13.175 with SMTP id ez15mr22196182wid.8.1361917056239; Tue, 26 Feb 2013 14:17:36 -0800 (PST) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id aw6si1124010wjc.241.2013.02.26.14.17.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Feb 2013 14:17:36 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-wi0-f172.google.com with SMTP id ez12so5502139wid.11 for ; Tue, 26 Feb 2013 14:17:29 -0800 (PST) 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: ALoCoQmCnAYZHLRo5+v8Vc7gtkVnWzVRGGh8kG9bLeVdit1rNzjguyNTzHdjPn47OfuMnA8YW2/1 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 {