| 679 | SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); |
| 680 | |
| 681 | void |
| 682 | resume_TSC(void) |
| 683 | { |
| 684 | #ifdef SMP |
| 685 | int quality; |
| 686 | |
| 687 | /* If TSC was not good on boot, it is unlikely to become good now. */ |
| 688 | if (tsc_timecounter.tc_quality < 0) |
| 689 | return; |
| 690 | /* Nothing to do with UP. */ |
| 691 | if (mp_ncpus < 2) |
| 692 | return; |
| 693 | |
| 694 | /* |
| 695 | * If TSC was good, a single synchronization should be enough, |
| 696 | * but honour smp_tsc_adjust if it's set. |
| 697 | */ |
| 698 | quality = test_tsc(MAX(smp_tsc_adjust, 1)); |
| 699 | if (quality != tsc_timecounter.tc_quality) { |
| 700 | printf("TSC timecounter quality changed: %d -> %d\n", |
| 701 | tsc_timecounter.tc_quality, quality); |
| 702 | tsc_timecounter.tc_quality = quality; |
| 703 | } |
| 704 | #endif /* SMP */ |
| 705 | } |
| 706 | |
| 707 | /* |
| 708 | * When cpufreq levels change, find out about the (new) max frequency. We |