From 2bbe09ef71ce8446ba0b3e29df2099150e9e6fdf Mon Sep 17 00:00:00 2001 From: Alison Wang Date: Thu, 19 Mar 2015 11:41:45 +0800 Subject: clock: hrtimer: Add workaround to fix building error about hrtimer based broadcast on PowerPC The hrtimer broad support was back-ported from upstream for LS1, the Power platform do not implement this yet. The tick_setup_hrtimer_broadcast function was not defined on Power platform. When build for PowerPC with this backport support, such error occurs: In file included from include/linux/tick.h:9:0, from arch/powerpc/kernel/idle.c:27: include/linux/clockchips.h:193:13: error: 'tick_setup_hrtimer_broadcast' defined but not used [-Werror=unused-function] As hrtimer based broadcast was only backported for ARM, this patch try to provide a workaround to fix the build error on Power platform. In linux-next, PowerPC will support hrtimer based broadcast too. There will be no build error and no workaround needed. Signed-off-by: Alison Wang Change-Id: If0f61062d6aa3d91ff81d074f20765a5880a5168 Reviewed-on: http://git.am.freescale.net:8181/33071 Tested-by: Review Code-CDREVIEW Reviewed-by: Zhengxiong Jin diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 57e3c95..723a15f 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -186,12 +186,16 @@ extern int tick_receive_broadcast(void); #endif #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) +#ifdef CONFIG_ARM extern void tick_setup_hrtimer_broadcast(void); +#endif extern int tick_check_broadcast_expired(void); #else static inline int tick_check_broadcast_expired(void) { return 0; } +#ifdef CONFIG_ARM static void tick_setup_hrtimer_broadcast(void) {}; #endif +#endif #ifdef CONFIG_GENERIC_CLOCKEVENTS extern int clockevents_notify(unsigned long reason, void *arg); -- cgit v0.10.2