Skip to content
  • Max Filippov's avatar
    target-xtensa: avoid duplicate timer interrupt delivery · c9e9521f
    Max Filippov authored
    
    
    Timer interrupt should be raised at the same cycle when CCOUNT equals
    CCOMPARE. As cycles are counted in batches, timer interrupt is sent
    every time CCOMPARE lies in the interval [old CCOUNT, new CCOUNT]. This
    is wrong, because when new CCOUNT equals CCOMPARE interrupt is sent
    twice, once for the upper interval boundary and once for the lower. Fix
    that by excluding lower interval boundary from the condition.
    
    This doesn't have user-visible effect, because CCOMPARE reload always
    causes CCOUNT increment followed by current timer interrupt reset.
    
    Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    c9e9521f