Commit 135225a
timekeeping: Let timekeeping_cycles_to_ns() handle both under and overflow
For the case !CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE, forego overflow
protection in the range (mask << 1) < delta <= mask, and interpret it
always as an inconsistency between CPU clock values. That allows
slightly neater code, and it is on a slow path so has no effect on
performance.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240325064023.2997-19-adrian.hunter@intel.com1 parent fcf190c commit 135225a
1 file changed
+13
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | | - | |
272 | | - | |
273 | 271 | | |
274 | | - | |
275 | | - | |
| 272 | + | |
| 273 | + | |
276 | 274 | | |
277 | | - | |
278 | | - | |
279 | 275 | | |
| 276 | + | |
280 | 277 | | |
281 | 278 | | |
282 | 279 | | |
| |||
375 | 372 | | |
376 | 373 | | |
377 | 374 | | |
378 | | - | |
379 | | - | |
| 375 | + | |
| 376 | + | |
380 | 377 | | |
381 | 378 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
391 | 386 | | |
392 | 387 | | |
393 | 388 | | |
| |||
0 commit comments