From patchwork Fri Dec 21 10:02:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 1902791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id D028640076 for ; Fri, 21 Dec 2012 10:04:49 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TlzQf-0001lh-O5; Fri, 21 Dec 2012 10:02:10 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TlzQR-0001jP-3f for linux-arm-kernel@lists.infradead.org; Fri, 21 Dec 2012 10:01:55 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qBLA1VgL001342; Fri, 21 Dec 2012 04:01:31 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBLA1UsH014618; Fri, 21 Dec 2012 15:31:30 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Fri, 21 Dec 2012 15:31:30 +0530 Received: from [172.24.136.136] (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id qBLA1TBq028124; Fri, 21 Dec 2012 15:31:30 +0530 Message-ID: <50D433AA.6070606@ti.com> Date: Fri, 21 Dec 2012 15:32:18 +0530 From: Santosh Shilimkar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Mark Rutland Subject: Re: [RFC PATCH 2/5] clockevents: Add generic timer broadcast receiver References: <1355832418-31692-1-git-send-email-mark.rutland@arm.com> <1355832418-31692-3-git-send-email-mark.rutland@arm.com> In-Reply-To: <1355832418-31692-3-git-send-email-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121221_050155_293262_1CECF56E X-CRM114-Status: GOOD ( 17.57 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.41 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux@arm.linux.org.uk, nico@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, john.stultz@linaro.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Tuesday 18 December 2012 05:36 PM, Mark Rutland wrote: > Currently the broadcast mechanism used for timers is abstracted by a > function pointer on struct clock_event_device. As the fundamental > mechanism for broadcast is architecture-specific, this ties each > clock_event_device driver to a single architecture, even where the > driver is otherwise generic. > > This patch adds a standard path for the receipt of timer broadcasts, so > drivers and/or architecture backends need not manage redundant lists of > timers for the purpose of routing broadcast timer ticks. > > Signed-off-by: Mark Rutland > --- > include/linux/clockchips.h | 4 ++++ > kernel/time/tick-broadcast.c | 15 +++++++++++++++ > 2 files changed, 19 insertions(+), 0 deletions(-) > > diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h > index 8a7096f..e1089aa 100644 > --- a/include/linux/clockchips.h > +++ b/include/linux/clockchips.h > @@ -161,6 +161,10 @@ clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec) > extern void clockevents_suspend(void); > extern void clockevents_resume(void); > > +#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST > +extern int tick_receive_broadcast(void); > +#endif > + As mentioned in earlier patch, CONFIG_GENERIC_CLOCKEVENTS_BROADCAST isn't must for SMP kernel and hence when build with !GENERIC_CLOCKEVENTS_BROADCAST, $subject patch will break the build. Below is the fix for the same. Feel free to fold it if you agree. diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 6634652..921568b 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -168,6 +168,11 @@ extern void tick_broadcast(const struct cpumask *mask); #define tick_broadcast NULL #endif extern int tick_receive_broadcast(void); +#else +static inline int tick_receive_broadcast(void) +{ + return 0; +} #endif #ifdef CONFIG_GENERIC_CLOCKEVENTS