| 49 | } |
| 50 | |
| 51 | void |
| 52 | set_tsc_freq(void) |
| 53 | { |
| 54 | struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config; |
| 55 | uint64_t freq; |
| 56 | |
| 57 | if (rte_eal_process_type() == RTE_PROC_SECONDARY) { |
| 58 | /* |
| 59 | * Just use the primary process calculated TSC rate in any |
| 60 | * secondary process. It avoids any unnecessary overhead on |
| 61 | * systems where arch-specific frequency detection is not |
| 62 | * available. |
| 63 | */ |
| 64 | eal_tsc_resolution_hz = mcfg->tsc_hz; |
| 65 | return; |
| 66 | } |
| 67 | |
| 68 | freq = get_tsc_freq_arch(); |
| 69 | if (!freq) |
| 70 | freq = get_tsc_freq(); |
| 71 | if (!freq) |
| 72 | freq = estimate_tsc_freq(); |
| 73 | |
| 74 | RTE_LOG(DEBUG, EAL, "TSC frequency is ~%" PRIu64 " KHz\n", freq / 1000); |
| 75 | eal_tsc_resolution_hz = freq; |
| 76 | mcfg->tsc_hz = freq; |
| 77 | } |
| 78 | |
| 79 | void rte_delay_us_callback_register(void (*userfunc)(unsigned int)) |
| 80 | { |
no test coverage detected