File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -186,17 +186,17 @@ static inline int tick_check_broadcast_expired(void) { return 0; }
186
186
#endif
187
187
188
188
#ifdef CONFIG_GENERIC_CLOCKEVENTS
189
- extern void clockevents_notify (unsigned long reason , void * arg );
189
+ extern int clockevents_notify (unsigned long reason , void * arg );
190
190
#else
191
- static inline void clockevents_notify (unsigned long reason , void * arg ) {}
191
+ static inline int clockevents_notify (unsigned long reason , void * arg ) { return 0 ; }
192
192
#endif
193
193
194
194
#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
195
195
196
196
static inline void clockevents_suspend (void ) {}
197
197
static inline void clockevents_resume (void ) {}
198
198
199
- static inline void clockevents_notify (unsigned long reason , void * arg ) {}
199
+ static inline int clockevents_notify (unsigned long reason , void * arg ) { return 0 ; }
200
200
static inline int tick_check_broadcast_expired (void ) { return 0 ; }
201
201
202
202
#endif
Original file line number Diff line number Diff line change @@ -542,12 +542,13 @@ void clockevents_resume(void)
542
542
#ifdef CONFIG_GENERIC_CLOCKEVENTS
543
543
/**
544
544
* clockevents_notify - notification about relevant events
545
+ * Returns 0 on success, any other value on error
545
546
*/
546
- void clockevents_notify (unsigned long reason , void * arg )
547
+ int clockevents_notify (unsigned long reason , void * arg )
547
548
{
548
549
struct clock_event_device * dev , * tmp ;
549
550
unsigned long flags ;
550
- int cpu ;
551
+ int cpu , ret = 0 ;
551
552
552
553
raw_spin_lock_irqsave (& clockevents_lock , flags );
553
554
@@ -560,7 +561,7 @@ void clockevents_notify(unsigned long reason, void *arg)
560
561
561
562
case CLOCK_EVT_NOTIFY_BROADCAST_ENTER :
562
563
case CLOCK_EVT_NOTIFY_BROADCAST_EXIT :
563
- tick_broadcast_oneshot_control (reason );
564
+ ret = tick_broadcast_oneshot_control (reason );
564
565
break ;
565
566
566
567
case CLOCK_EVT_NOTIFY_CPU_DYING :
@@ -603,6 +604,7 @@ void clockevents_notify(unsigned long reason, void *arg)
603
604
break ;
604
605
}
605
606
raw_spin_unlock_irqrestore (& clockevents_lock , flags );
607
+ return ret ;
606
608
}
607
609
EXPORT_SYMBOL_GPL (clockevents_notify );
608
610
Original file line number Diff line number Diff line change @@ -646,14 +646,15 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
646
646
/*
647
647
* Powerstate information: The system enters/leaves a state, where
648
648
* affected devices might stop
649
+ * Returns 0 on success, -EBUSY if the cpu is used to broadcast wakeups.
649
650
*/
650
- void tick_broadcast_oneshot_control (unsigned long reason )
651
+ int tick_broadcast_oneshot_control (unsigned long reason )
651
652
{
652
653
struct clock_event_device * bc , * dev ;
653
654
struct tick_device * td ;
654
655
unsigned long flags ;
655
656
ktime_t now ;
656
- int cpu ;
657
+ int cpu , ret = 0 ;
657
658
658
659
/*
659
660
* Periodic mode does not care about the enter/exit of power
@@ -759,6 +760,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
759
760
}
760
761
out :
761
762
raw_spin_unlock_irqrestore (& tick_broadcast_lock , flags );
763
+ return ret ;
762
764
}
763
765
764
766
/*
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ extern int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *));
46
46
extern void tick_resume_oneshot (void );
47
47
# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
48
48
extern void tick_broadcast_setup_oneshot (struct clock_event_device * bc );
49
- extern void tick_broadcast_oneshot_control (unsigned long reason );
49
+ extern int tick_broadcast_oneshot_control (unsigned long reason );
50
50
extern void tick_broadcast_switch_to_oneshot (void );
51
51
extern void tick_shutdown_broadcast_oneshot (unsigned int * cpup );
52
52
extern int tick_resume_broadcast_oneshot (struct clock_event_device * bc );
@@ -58,7 +58,7 @@ static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
58
58
{
59
59
BUG ();
60
60
}
61
- static inline void tick_broadcast_oneshot_control (unsigned long reason ) { }
61
+ static inline int tick_broadcast_oneshot_control (unsigned long reason ) { return 0 ; }
62
62
static inline void tick_broadcast_switch_to_oneshot (void ) { }
63
63
static inline void tick_shutdown_broadcast_oneshot (unsigned int * cpup ) { }
64
64
static inline int tick_broadcast_oneshot_active (void ) { return 0 ; }
@@ -87,7 +87,7 @@ static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
87
87
{
88
88
BUG ();
89
89
}
90
- static inline void tick_broadcast_oneshot_control (unsigned long reason ) { }
90
+ static inline int tick_broadcast_oneshot_control (unsigned long reason ) { return 0 ; }
91
91
static inline void tick_shutdown_broadcast_oneshot (unsigned int * cpup ) { }
92
92
static inline int tick_resume_broadcast_oneshot (struct clock_event_device * bc )
93
93
{
You can’t perform that action at this time.
0 commit comments