* Prepare event timer parameters after configuration changes. */
| 421 | * Prepare event timer parameters after configuration changes. |
| 422 | */ |
| 423 | static void |
| 424 | setuptimer(void) |
| 425 | { |
| 426 | int freq; |
| 427 | |
| 428 | if (periodic && (timer->et_flags & ET_FLAGS_PERIODIC) == 0) |
| 429 | periodic = 0; |
| 430 | else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0) |
| 431 | periodic = 1; |
| 432 | singlemul = MIN(MAX(singlemul, 1), 20); |
| 433 | freq = hz * singlemul; |
| 434 | while (freq < (profiling ? profhz : stathz)) |
| 435 | freq += hz; |
| 436 | freq = round_freq(timer, freq); |
| 437 | timerperiod = SBT_1S / freq; |
| 438 | } |
| 439 | |
| 440 | /* |
| 441 | * Reconfigure specified per-CPU timer on other CPU. Called from IPI handler. |
no test coverage detected