| 156 | }; |
| 157 | |
| 158 | static uint64_t |
| 159 | geode_cputicks(void) |
| 160 | { |
| 161 | unsigned c; |
| 162 | static unsigned last; |
| 163 | static uint64_t offset; |
| 164 | |
| 165 | c = inl(geode_counter); |
| 166 | if (c < last) |
| 167 | offset += (1LL << 32); |
| 168 | last = c; |
| 169 | return (offset | c); |
| 170 | } |
| 171 | |
| 172 | /* |
| 173 | * The GEODE watchdog runs from a 32kHz frequency. One period of that is |