| 124 | } |
| 125 | |
| 126 | void |
| 127 | cpu_lock_delay(void) |
| 128 | { |
| 129 | |
| 130 | /* |
| 131 | * Use TSC to wait for a usec if present, otherwise fall back |
| 132 | * to reading from port 0x84. We can't call into timecounters |
| 133 | * for this delay since timecounters might use spin locks. |
| 134 | * |
| 135 | * Note that unlike delay_tc(), this uses the TSC even if it |
| 136 | * is not P-state invariant. For this function it is ok to |
| 137 | * wait even a few usecs. |
| 138 | */ |
| 139 | if (tsc_freq != 0) |
| 140 | delay_tsc(1); |
| 141 | else |
| 142 | inb(0x84); |
| 143 | } |
no test coverage detected