Skip to content
  • Philippe Gerum's avatar
    cobalt/arm64: calibrate: prevent excessive delay of next host tick · abd64d98
    Philippe Gerum authored
    The calibration procedure overwrites the current value of the timer
    counter for a pending oneshot tick event, which is admittedly ok in
    the context of initializing Cobalt. However, the previous
    implementation maxed the counter value, potentially causing excessive
    delay to the host waiting for the overwritten timer event.
    
    Use a shorter delay value when calibrating so that the next shot does
    not occur later than one jiffy after we left the calibration
    routine. One jiffy is also long enough for preventing the timer to
    ever fire while running the calibration loop.
    abd64d98