Hi all, Today's linux-next merge of the tip tree got conflicts in include/linux/clockchips.h, kernel/time/tick-broadcast.c, kernel/time/tick-common.c and kernel/time/tick-internal.h between commit 01b9fdf7e540 ("tick: Move core only declarations and functions to core") (and others) from the pm tree and commit 77e32c89a711 ("clockevents: Manage device's state separately for the core") (and others) from the tip tree. I fixed it up (I *think* I may have figured it all out, but please check - see below and teh final tree later) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au diff --cc include/linux/clockchips.h index 4350d7101982,e20232c3320a..000000000000 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h diff --cc kernel/time/tick-broadcast.c index f8e27cd0b7ab,f0f8ee9dbc28..000000000000 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@@ -553,9 -541,10 +553,9 @@@ static int tick_broadcast_set_event(str return ret; } -int tick_resume_broadcast_oneshot(struct clock_event_device *bc) +static void tick_resume_broadcast_oneshot(struct clock_event_device *bc) { - clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); + clockevents_set_state(bc, CLOCK_EVT_STATE_ONESHOT); - return 0; } /* diff --cc kernel/time/tick-common.c index d9e769e31ee4,a5b877130ae9..000000000000 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@@ -386,19 -380,13 +387,20 @@@ void tick_suspend_local(void clockevents_shutdown(td->evtdev); } -void tick_resume(void) +/** + * tick_resume_local - Resume the local tick device + * + * Called from the local CPU for unfreeze or XEN resume magic. + * + * No locks required. Nothing can change the per cpu device. + */ +void tick_resume_local(void) { struct tick_device *td = this_cpu_ptr(&tick_cpu_device); - int broadcast = tick_resume_broadcast(); + bool broadcast = tick_resume_check_broadcast(); - clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME); + clockevents_tick_resume(td->evtdev); + if (!broadcast) { if (td->mode == TICKDEV_MODE_PERIODIC) tick_setup_periodic(td->evtdev, 0); diff --cc kernel/time/tick-internal.h index 1c7560a533d5,98700e4a2000..000000000000 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@@ -27,31 -30,15 +27,32 @@@ extern void tick_resume(void) extern bool tick_check_replacement(struct clock_event_device *curdev, struct clock_event_device *newdev); extern void tick_install_replacement(struct clock_event_device *dev); +extern int tick_is_oneshot_available(void); +extern struct tick_device *tick_get_device(int cpu); + +/* Check, if the device is functional or a dummy for broadcast */ +static inline int tick_device_is_functional(struct clock_event_device *dev) +{ + return !(dev->features & CLOCK_EVT_FEAT_DUMMY); +} extern void clockevents_shutdown(struct clock_event_device *dev); + extern int clockevents_tick_resume(struct clock_event_device *dev); - +extern void clockevents_exchange_device(struct clock_event_device *old, + struct clock_event_device *new); - extern void clockevents_set_mode(struct clock_event_device *dev, - enum clock_event_mode mode); ++extern void clockevents_set_state(struct clock_event_device *dev, ++ enum clock_event_state state); +extern int clockevents_program_event(struct clock_event_device *dev, + ktime_t expires, bool force); +extern void clockevents_handle_noop(struct clock_event_device *dev); +extern int __clockevents_update_freq(struct clock_event_device *dev, u32 freq); extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt); +#else +static inline void tick_suspend(void) { } +static inline void tick_resume(void) { } +#endif /* GENERIC_CLOCKEVENTS */ -/* - * NO_HZ / high resolution timer shared code - */ +/* Oneshot related functions */ #ifdef CONFIG_TICK_ONESHOT extern void tick_setup_oneshot(struct clock_event_device *newdev, void (*handler)(struct clock_event_device *),