From: santosh.shilimkar@ti•com (Santosh Shilimkar)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC PATCH 2/5] clockevents: Add generic timer broadcast receiver
Date: Fri, 21 Dec 2012 15:32:18 +0530 [thread overview]
Message-ID: <50D433AA.6070606@ti.com> (raw)
In-Reply-To: <1355832418-31692-3-git-send-email-mark.rutland@arm.com>
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 <mark.rutland@arm•com>
> ---
> 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
next prev parent reply other threads:[~2012-12-21 10:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 12:06 [RFC PATCH 0/5] clockevents: decouple broadcast mechanism from drivers Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 1/5] ARM: remove useless guard in smp.c Mark Rutland
2012-12-18 18:47 ` Stephen Boyd
2012-12-19 9:40 ` Mark Rutland
2012-12-21 10:02 ` Santosh Shilimkar
2013-01-02 11:14 ` Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 2/5] clockevents: Add generic timer broadcast receiver Mark Rutland
2012-12-18 22:17 ` Stephen Boyd
2012-12-19 10:19 ` Mark Rutland
2012-12-21 10:02 ` Santosh Shilimkar [this message]
2013-01-02 10:59 ` Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 3/5] ARM: Use generic timer broadcast receive Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 4/5] clockevents: Add generic timer broadcast function Mark Rutland
2012-12-18 22:17 ` Stephen Boyd
2012-12-19 10:37 ` Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 5/5] ARM: Add generic timer broadcast support Mark Rutland
2012-12-21 10:08 ` [RFC PATCH 0/5] clockevents: decouple broadcast mechanism from drivers Santosh Shilimkar
2013-01-02 11:41 ` Mark Rutland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D433AA.6070606@ti.com \
--to=santosh.shilimkar@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox