aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/cris/arch-v10/kernel/fasttimer.c85
-rw-r--r--arch/cris/arch-v32/kernel/fasttimer.c85
2 files changed, 78 insertions, 92 deletions
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c
index 48a59afbeeb1..e9298739d72e 100644
--- a/arch/cris/arch-v10/kernel/fasttimer.c
+++ b/arch/cris/arch-v10/kernel/fasttimer.c
@@ -527,7 +527,8 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
527 i = debug_log_cnt; 527 i = debug_log_cnt;
528 528
529 while (i != end_i || debug_log_cnt_wrapped) { 529 while (i != end_i || debug_log_cnt_wrapped) {
530 if (seq_printf(m, debug_log_string[i], debug_log_value[i]) < 0) 530 seq_printf(m, debug_log_string[i], debug_log_value[i]);
531 if (seq_has_overflowed(m))
531 return 0; 532 return 0;
532 i = (i+1) % DEBUG_LOG_MAX; 533 i = (i+1) % DEBUG_LOG_MAX;
533 } 534 }
@@ -542,24 +543,22 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
542 int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS; 543 int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS;
543 544
544#if 1 //ndef FAST_TIMER_LOG 545#if 1 //ndef FAST_TIMER_LOG
545 seq_printf(m, "div: %i freq: %i delay: %i" 546 seq_printf(m, "div: %i freq: %i delay: %i\n",
546 "\n",
547 timer_div_settings[cur], 547 timer_div_settings[cur],
548 timer_freq_settings[cur], 548 timer_freq_settings[cur],
549 timer_delay_settings[cur]); 549 timer_delay_settings[cur]);
550#endif 550#endif
551#ifdef FAST_TIMER_LOG 551#ifdef FAST_TIMER_LOG
552 t = &timer_started_log[cur]; 552 t = &timer_started_log[cur];
553 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 553 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
554 "d: %6li us data: 0x%08lX" 554 t->name,
555 "\n", 555 (unsigned long)t->tv_set.tv_jiff,
556 t->name, 556 (unsigned long)t->tv_set.tv_usec,
557 (unsigned long)t->tv_set.tv_jiff, 557 (unsigned long)t->tv_expires.tv_jiff,
558 (unsigned long)t->tv_set.tv_usec, 558 (unsigned long)t->tv_expires.tv_usec,
559 (unsigned long)t->tv_expires.tv_jiff, 559 t->delay_us,
560 (unsigned long)t->tv_expires.tv_usec, 560 t->data);
561 t->delay_us, 561 if (seq_has_overflowed(m))
562 t->data) < 0)
563 return 0; 562 return 0;
564#endif 563#endif
565 } 564 }
@@ -571,16 +570,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
571 seq_printf(m, "Timers added: %i\n", fast_timers_added); 570 seq_printf(m, "Timers added: %i\n", fast_timers_added);
572 for (i = 0; i < num_to_show; i++) { 571 for (i = 0; i < num_to_show; i++) {
573 t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS]; 572 t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS];
574 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 573 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
575 "d: %6li us data: 0x%08lX" 574 t->name,
576 "\n", 575 (unsigned long)t->tv_set.tv_jiff,
577 t->name, 576 (unsigned long)t->tv_set.tv_usec,
578 (unsigned long)t->tv_set.tv_jiff, 577 (unsigned long)t->tv_expires.tv_jiff,
579 (unsigned long)t->tv_set.tv_usec, 578 (unsigned long)t->tv_expires.tv_usec,
580 (unsigned long)t->tv_expires.tv_jiff, 579 t->delay_us,
581 (unsigned long)t->tv_expires.tv_usec, 580 t->data);
582 t->delay_us, 581 if (seq_has_overflowed(m))
583 t->data) < 0)
584 return 0; 582 return 0;
585 } 583 }
586 seq_putc(m, '\n'); 584 seq_putc(m, '\n');
@@ -590,16 +588,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
590 seq_printf(m, "Timers expired: %i\n", fast_timers_expired); 588 seq_printf(m, "Timers expired: %i\n", fast_timers_expired);
591 for (i = 0; i < num_to_show; i++) { 589 for (i = 0; i < num_to_show; i++) {
592 t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS]; 590 t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS];
593 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 591 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
594 "d: %6li us data: 0x%08lX" 592 t->name,
595 "\n", 593 (unsigned long)t->tv_set.tv_jiff,
596 t->name, 594 (unsigned long)t->tv_set.tv_usec,
597 (unsigned long)t->tv_set.tv_jiff, 595 (unsigned long)t->tv_expires.tv_jiff,
598 (unsigned long)t->tv_set.tv_usec, 596 (unsigned long)t->tv_expires.tv_usec,
599 (unsigned long)t->tv_expires.tv_jiff, 597 t->delay_us,
600 (unsigned long)t->tv_expires.tv_usec, 598 t->data);
601 t->delay_us, 599 if (seq_has_overflowed(m))
602 t->data) < 0)
603 return 0; 600 return 0;
604 } 601 }
605 seq_putc(m, '\n'); 602 seq_putc(m, '\n');
@@ -611,19 +608,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
611 while (t) { 608 while (t) {
612 nextt = t->next; 609 nextt = t->next;
613 local_irq_restore(flags); 610 local_irq_restore(flags);
614 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 611 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
615 "d: %6li us data: 0x%08lX" 612 t->name,
616/* " func: 0x%08lX" */ 613 (unsigned long)t->tv_set.tv_jiff,
617 "\n", 614 (unsigned long)t->tv_set.tv_usec,
618 t->name, 615 (unsigned long)t->tv_expires.tv_jiff,
619 (unsigned long)t->tv_set.tv_jiff, 616 (unsigned long)t->tv_expires.tv_usec,
620 (unsigned long)t->tv_set.tv_usec, 617 t->delay_us,
621 (unsigned long)t->tv_expires.tv_jiff, 618 t->data);
622 (unsigned long)t->tv_expires.tv_usec, 619 if (seq_has_overflowed(m))
623 t->delay_us,
624 t->data
625/* , t->function */
626 ) < 0)
627 return 0; 620 return 0;
628 local_irq_save(flags); 621 local_irq_save(flags);
629 if (t->next != nextt) 622 if (t->next != nextt)
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c
index b130c2c5fdd8..5c84dbb99f30 100644
--- a/arch/cris/arch-v32/kernel/fasttimer.c
+++ b/arch/cris/arch-v32/kernel/fasttimer.c
@@ -501,7 +501,8 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
501 i = debug_log_cnt; 501 i = debug_log_cnt;
502 502
503 while ((i != end_i || debug_log_cnt_wrapped)) { 503 while ((i != end_i || debug_log_cnt_wrapped)) {
504 if (seq_printf(m, debug_log_string[i], debug_log_value[i]) < 0) 504 seq_printf(m, debug_log_string[i], debug_log_value[i]);
505 if (seq_has_overflowed(m))
505 return 0; 506 return 0;
506 i = (i+1) % DEBUG_LOG_MAX; 507 i = (i+1) % DEBUG_LOG_MAX;
507 } 508 }
@@ -516,23 +517,21 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
516 int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS; 517 int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS;
517 518
518#if 1 //ndef FAST_TIMER_LOG 519#if 1 //ndef FAST_TIMER_LOG
519 seq_printf(m, "div: %i delay: %i" 520 seq_printf(m, "div: %i delay: %i\n",
520 "\n",
521 timer_div_settings[cur], 521 timer_div_settings[cur],
522 timer_delay_settings[cur]); 522 timer_delay_settings[cur]);
523#endif 523#endif
524#ifdef FAST_TIMER_LOG 524#ifdef FAST_TIMER_LOG
525 t = &timer_started_log[cur]; 525 t = &timer_started_log[cur];
526 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 526 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
527 "d: %6li us data: 0x%08lX" 527 t->name,
528 "\n", 528 (unsigned long)t->tv_set.tv_jiff,
529 t->name, 529 (unsigned long)t->tv_set.tv_usec,
530 (unsigned long)t->tv_set.tv_jiff, 530 (unsigned long)t->tv_expires.tv_jiff,
531 (unsigned long)t->tv_set.tv_usec, 531 (unsigned long)t->tv_expires.tv_usec,
532 (unsigned long)t->tv_expires.tv_jiff, 532 t->delay_us,
533 (unsigned long)t->tv_expires.tv_usec, 533 t->data);
534 t->delay_us, 534 if (seq_has_overflowed(m))
535 t->data) < 0)
536 return 0; 535 return 0;
537#endif 536#endif
538 } 537 }
@@ -544,16 +543,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
544 seq_printf(m, "Timers added: %i\n", fast_timers_added); 543 seq_printf(m, "Timers added: %i\n", fast_timers_added);
545 for (i = 0; i < num_to_show; i++) { 544 for (i = 0; i < num_to_show; i++) {
546 t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS]; 545 t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS];
547 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 546 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
548 "d: %6li us data: 0x%08lX" 547 t->name,
549 "\n", 548 (unsigned long)t->tv_set.tv_jiff,
550 t->name, 549 (unsigned long)t->tv_set.tv_usec,
551 (unsigned long)t->tv_set.tv_jiff, 550 (unsigned long)t->tv_expires.tv_jiff,
552 (unsigned long)t->tv_set.tv_usec, 551 (unsigned long)t->tv_expires.tv_usec,
553 (unsigned long)t->tv_expires.tv_jiff, 552 t->delay_us,
554 (unsigned long)t->tv_expires.tv_usec, 553 t->data);
555 t->delay_us, 554 if (seq_has_overflowed(m))
556 t->data) < 0)
557 return 0; 555 return 0;
558 } 556 }
559 seq_putc(m, '\n'); 557 seq_putc(m, '\n');
@@ -563,16 +561,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
563 seq_printf(m, "Timers expired: %i\n", fast_timers_expired); 561 seq_printf(m, "Timers expired: %i\n", fast_timers_expired);
564 for (i = 0; i < num_to_show; i++){ 562 for (i = 0; i < num_to_show; i++){
565 t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS]; 563 t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS];
566 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 564 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
567 "d: %6li us data: 0x%08lX" 565 t->name,
568 "\n", 566 (unsigned long)t->tv_set.tv_jiff,
569 t->name, 567 (unsigned long)t->tv_set.tv_usec,
570 (unsigned long)t->tv_set.tv_jiff, 568 (unsigned long)t->tv_expires.tv_jiff,
571 (unsigned long)t->tv_set.tv_usec, 569 (unsigned long)t->tv_expires.tv_usec,
572 (unsigned long)t->tv_expires.tv_jiff, 570 t->delay_us,
573 (unsigned long)t->tv_expires.tv_usec, 571 t->data);
574 t->delay_us, 572 if (seq_has_overflowed(m))
575 t->data) < 0)
576 return 0; 573 return 0;
577 } 574 }
578 seq_putc(m, '\n'); 575 seq_putc(m, '\n');
@@ -584,19 +581,15 @@ static int proc_fasttimer_show(struct seq_file *m, void *v)
584 while (t != NULL){ 581 while (t != NULL){
585 nextt = t->next; 582 nextt = t->next;
586 local_irq_restore(flags); 583 local_irq_restore(flags);
587 if (seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu " 584 seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
588 "d: %6li us data: 0x%08lX" 585 t->name,
589/* " func: 0x%08lX" */ 586 (unsigned long)t->tv_set.tv_jiff,
590 "\n", 587 (unsigned long)t->tv_set.tv_usec,
591 t->name, 588 (unsigned long)t->tv_expires.tv_jiff,
592 (unsigned long)t->tv_set.tv_jiff, 589 (unsigned long)t->tv_expires.tv_usec,
593 (unsigned long)t->tv_set.tv_usec, 590 t->delay_us,
594 (unsigned long)t->tv_expires.tv_jiff, 591 t->data);
595 (unsigned long)t->tv_expires.tv_usec, 592 if (seq_has_overflowed(m))
596 t->delay_us,
597 t->data
598/* , t->function */
599 ) < 0)
600 return 0; 593 return 0;
601 local_irq_save(flags); 594 local_irq_save(flags);
602 if (t->next != nextt) 595 if (t->next != nextt)