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: 15202 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 CE07C23F8E for ; Sat, 2 Mar 2013 10:10:15 +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 8B616A18482 for ; Sat, 2 Mar 2013 10:10:15 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id f13so2457192vcb.40 for ; Sat, 02 Mar 2013 02:10:15 -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=d9exdtp0o29O2NjQ9dMaa5DaBk3Zo2bs9aGePeQW5aSlcFT3ahxdRWkDat/+z0sTbT oYe9ORvh9fivKNVqjsqahlkLksPuFRO3doKAuVMguKlxE5+P+FEaZTYYGWNjPRyLA2Yd 3YGWjXd14ATMRxk61mzfgns1mpqLwt1n5e+ZHhSESSbaXw1pUG+e/wvkOaCoMxryuCz2 XMfG7y9lmlFWu6ShbxlAMs+ftHQYomvDMUlVWmq6SLbECLZV0OauEIpFybInhMp+3FWr cuxm+WNh0k8y+L7Pds8mdB785UvKH1ZWEEY6oaHSyW7IjiIuNunJ1Tp0C4fPb/KspQze VYAQ== X-Received: by 10.58.181.201 with SMTP id dy9mr5405785vec.34.1362219014950; Sat, 02 Mar 2013 02:10:14 -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.127.98 with SMTP id nf2csp4137veb; Sat, 2 Mar 2013 02:10:14 -0800 (PST) X-Received: by 10.180.98.232 with SMTP id el8mr2370568wib.22.1362219013987; Sat, 02 Mar 2013 02:10:13 -0800 (PST) Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]) by mx.google.com with ESMTPS id m6si6669673wjw.66.2013.03.02.02.10.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 02 Mar 2013 02:10:13 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22d is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c03::22d; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::22d 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-we0-f173.google.com with SMTP id r5so3140575wey.32 for ; Sat, 02 Mar 2013 02:10:13 -0800 (PST) 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 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, rickard.andersson@stericsson.com, vincent.guittot@linaro.org, linus.walleij@stericsson.com 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: ALoCoQmPLoh5zlyEpwQetJTVRrr5LsPLLZFycT07Fwdwdsh1X/WLqTGHS28PbH9ymu9S/dzyOItQ 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 {