History

timer_list: Print name of per-cpu wakeup device

With the introduction of per-cpu wakeup devices that can be used in preference to the broadcast timer, print the name of such devices when they are available.

Will Deacon committed 5 years ago

Commit 245a0571 parent ea5c7f13 files · +17 −1Browse files

Unified · Split

3 files
  1. kernel/time/tick-broadcast.c +7 −0
  2. kernel/time/tick-internal.h +1 −0
  3. kernel/time/timer_list.c +9 −1
kernel/time/tick-broadcast.c+7−0
@@ -63,6 +63,13 @@ struct cpumask *tick_get_broadcast_mask(void) · 62 unmodified lines
63 return tick_broadcast_mask;63 return tick_broadcast_mask;
64}64}
65 65
66static struct clock_event_device *tick_get_oneshot_wakeup_device(int cpu);
67
68const struct clock_event_device *tick_get_wakeup_device(int cpu)
69{
70 return tick_get_oneshot_wakeup_device(cpu);
71}
72
66/*73/*
67 * Start the device in periodic mode74 * Start the device in periodic mode
68 */75 */
kernel/time/tick-internal.h+1−0
@@ -71,6 +71,7 @@ extern void tick_set_periodic_handler(struct clock_event_device *dev, int broadc · 70 unmodified lines
71extern int tick_broadcast_update_freq(struct clock_event_device *dev, u32 freq);71extern int tick_broadcast_update_freq(struct clock_event_device *dev, u32 freq);
72extern struct tick_device *tick_get_broadcast_device(void);72extern struct tick_device *tick_get_broadcast_device(void);
73extern struct cpumask *tick_get_broadcast_mask(void);73extern struct cpumask *tick_get_broadcast_mask(void);
74extern const struct clock_event_device *tick_get_wakeup_device(int cpu);
74# else /* !CONFIG_GENERIC_CLOCKEVENTS_BROADCAST: */75# else /* !CONFIG_GENERIC_CLOCKEVENTS_BROADCAST: */
75static inline void tick_install_broadcast_device(struct clock_event_device *dev, int cpu) { }76static inline void tick_install_broadcast_device(struct clock_event_device *dev, int cpu) { }
76static inline int tick_is_broadcast_device(struct clock_event_device *dev) { return 0; }77static inline int tick_is_broadcast_device(struct clock_event_device *dev) { return 0; }
kernel/time/timer_list.c+9−1
@@ -228,6 +228,14 @@ print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu) · 227 unmodified lines
228 SEQ_printf(m, " event_handler: %ps\n", dev->event_handler);228 SEQ_printf(m, " event_handler: %ps\n", dev->event_handler);
229 SEQ_printf(m, "\n");229 SEQ_printf(m, "\n");
230 SEQ_printf(m, " retries: %lu\n", dev->retries);230 SEQ_printf(m, " retries: %lu\n", dev->retries);
231
232#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
233 if (cpu >= 0) {
234 const struct clock_event_device *wd = tick_get_wakeup_device(cpu);
235
236 SEQ_printf(m, "Wakeup Device: %s\n", wd ? wd->name : "<NULL>");
237 }
238#endif
231 SEQ_printf(m, "\n");239 SEQ_printf(m, "\n");
232}240}
233 241
@@ -248,7 +256,7 @@ static void timer_list_show_tickdevices_header(struct seq_file *m) · 14 unmodified lines
248 256
249static inline void timer_list_header(struct seq_file *m, u64 now)257static inline void timer_list_header(struct seq_file *m, u64 now)
250{258{
251 SEQ_printf(m, "Timer List Version: v0.8\n");259 SEQ_printf(m, "Timer List Version: v0.9\n");
252 SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES);260 SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES);
253 SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now);261 SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now);
254 SEQ_printf(m, "\n");262 SEQ_printf(m, "\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t