• Anna-Maria Gleixner's avatar
    hrtimer: Add clock bases and hrtimer mode for softirq context · 98ecadd4
    Anna-Maria Gleixner authored
    Currently hrtimer callback functions are always executed in hard interrupt
    context. Users of hrtimers, which need their timer function to be executed
    in soft interrupt context, make use of tasklets to get the proper context.
    
    Add additional hrtimer clock bases for timers which must expire in softirq
    context, so the detour via the tasklet can be avoided. This is also
    required for RT, where the majority of hrtimer is moved into softirq
    hrtimer context.
    
    The selection of the expiry mode happens via a mode bit. Introduce
    HRTIMER_MODE_SOFT and the matching combinations with the ABS/REL/PINNED
    bits and update the decoding of hrtimer_mode in tracepoints.
    Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: keescook@chromium.org
    Link: http://lkml.kernel.org/r/20171221104205.7269-27-anna-maria@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    98ecadd4
timer.h 9.92 KB