aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/timer_list.c
diff options
context:
space:
mode:
authorNathan Zimmer <nzimmer@sgi.com>2013-03-26 20:56:29 -0400
committerThomas Gleixner <tglx@linutronix.de>2013-04-17 14:51:02 -0400
commit60cf7ea849e77c8782dee147cfb8c38d1984236e (patch)
tree3cdec169578694ff849cfdce09cbb99d7c4664a5 /kernel/time/timer_list.c
parent57b8015e07a70301e9ec9f324db1a8b73b5a1e2b (diff)
timer_list: Split timer_list_show_tickdevices
Split timer_list_show_tickdevices() into the header printout and pull the rest up to timer_list_show. This is a preparatory patch for converting timer_list to a proper seqfile with its own iterator Signed-off-by: Nathan Zimmer <nzimmer@sgi.com> Reported-by: Dave Jones <davej@redhat.com> Cc: John Stultz <johnstul@us.ibm.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Link: http://lkml.kernel.org/r/1364345790-14577-2-git-send-email-nzimmer@sgi.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/timer_list.c')
-rw-r--r--kernel/time/timer_list.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index af5a7e9f164b..380a58977490 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -133,7 +133,6 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now)
133 struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu); 133 struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
134 int i; 134 int i;
135 135
136 SEQ_printf(m, "\n");
137 SEQ_printf(m, "cpu: %d\n", cpu); 136 SEQ_printf(m, "cpu: %d\n", cpu);
138 for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { 137 for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
139 SEQ_printf(m, " clock %d:\n", i); 138 SEQ_printf(m, " clock %d:\n", i);
@@ -187,6 +186,7 @@ static void print_cpu(struct seq_file *m, int cpu, u64 now)
187 186
188#undef P 187#undef P
189#undef P_ns 188#undef P_ns
189 SEQ_printf(m, "\n");
190} 190}
191 191
192#ifdef CONFIG_GENERIC_CLOCKEVENTS 192#ifdef CONFIG_GENERIC_CLOCKEVENTS
@@ -195,7 +195,6 @@ print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu)
195{ 195{
196 struct clock_event_device *dev = td->evtdev; 196 struct clock_event_device *dev = td->evtdev;
197 197
198 SEQ_printf(m, "\n");
199 SEQ_printf(m, "Tick Device: mode: %d\n", td->mode); 198 SEQ_printf(m, "Tick Device: mode: %d\n", td->mode);
200 if (cpu < 0) 199 if (cpu < 0)
201 SEQ_printf(m, "Broadcast device\n"); 200 SEQ_printf(m, "Broadcast device\n");
@@ -230,12 +229,11 @@ print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu)
230 print_name_offset(m, dev->event_handler); 229 print_name_offset(m, dev->event_handler);
231 SEQ_printf(m, "\n"); 230 SEQ_printf(m, "\n");
232 SEQ_printf(m, " retries: %lu\n", dev->retries); 231 SEQ_printf(m, " retries: %lu\n", dev->retries);
232 SEQ_printf(m, "\n");
233} 233}
234 234
235static void timer_list_show_tickdevices(struct seq_file *m) 235static void timer_list_show_tickdevices_header(struct seq_file *m)
236{ 236{
237 int cpu;
238
239#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST 237#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
240 print_tickdevice(m, tick_get_broadcast_device(), -1); 238 print_tickdevice(m, tick_get_broadcast_device(), -1);
241 SEQ_printf(m, "tick_broadcast_mask: %08lx\n", 239 SEQ_printf(m, "tick_broadcast_mask: %08lx\n",
@@ -246,12 +244,7 @@ static void timer_list_show_tickdevices(struct seq_file *m)
246#endif 244#endif
247 SEQ_printf(m, "\n"); 245 SEQ_printf(m, "\n");
248#endif 246#endif
249 for_each_online_cpu(cpu)
250 print_tickdevice(m, tick_get_device(cpu), cpu);
251 SEQ_printf(m, "\n");
252} 247}
253#else
254static void timer_list_show_tickdevices(struct seq_file *m) { }
255#endif 248#endif
256 249
257static int timer_list_show(struct seq_file *m, void *v) 250static int timer_list_show(struct seq_file *m, void *v)
@@ -262,12 +255,16 @@ static int timer_list_show(struct seq_file *m, void *v)
262 SEQ_printf(m, "Timer List Version: v0.7\n"); 255 SEQ_printf(m, "Timer List Version: v0.7\n");
263 SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES); 256 SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES);
264 SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now); 257 SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now);
258 SEQ_printf(m, "\n");
265 259
266 for_each_online_cpu(cpu) 260 for_each_online_cpu(cpu)
267 print_cpu(m, cpu, now); 261 print_cpu(m, cpu, now);
268 262
269 SEQ_printf(m, "\n"); 263#ifdef CONFIG_GENERIC_CLOCKEVENTS
270 timer_list_show_tickdevices(m); 264 timer_list_show_tickdevices_header(m);
265 for_each_online_cpu(cpu)
266 print_tickdevice(m, tick_get_device(cpu), cpu);
267#endif
271 268
272 return 0; 269 return 0;
273} 270}