| 1396 | } |
| 1397 | |
| 1398 | static void |
| 1399 | lapic_timer_deadline(struct lapic *la) |
| 1400 | { |
| 1401 | uint32_t value; |
| 1402 | |
| 1403 | value = la->lvt_timer_base; |
| 1404 | value &= ~(APIC_LVTT_TM | APIC_LVT_M); |
| 1405 | value |= APIC_LVTT_TM_TSCDLT; |
| 1406 | if (value != la->lvt_timer_last) { |
| 1407 | la->lvt_timer_last = value; |
| 1408 | lapic_write32_nofence(LAPIC_LVT_TIMER, value); |
| 1409 | if (!x2apic_mode) |
| 1410 | mfence(); |
| 1411 | } |
| 1412 | wrmsr(MSR_TSC_DEADLINE, la->la_timer_period + rdtsc()); |
| 1413 | } |
| 1414 | |
| 1415 | static void |
| 1416 | lapic_timer_stop(struct lapic *la) |
no test coverage detected