lkml.org 
[lkml]   [2017]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 17/25] hrtimer: Implementation of softirq hrtimer handling
On Thu, Aug 31, 2017 at 12:23:42PM -0000, Anna-Maria Gleixner wrote:
> static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
> struct hrtimer_clock_base *base,
> - struct hrtimer *timer, ktime_t *now)
> + struct hrtimer *timer, ktime_t *now,
> + bool hardirq)
> {
> enum hrtimer_restart (*fn)(struct hrtimer *);
> int restart;
> @@ -1241,11 +1298,19 @@ static void __run_hrtimer(struct hrtimer
> * protected against migration to a different CPU even if the lock
> * is dropped.
> */
> - raw_spin_unlock(&cpu_base->lock);
> + if (hardirq)
> + raw_spin_unlock(&cpu_base->lock);
> + else
> + raw_spin_unlock_irq(&cpu_base->lock);
> +
> trace_hrtimer_expire_entry(timer, now);
> restart = fn(timer);
> trace_hrtimer_expire_exit(timer);
> - raw_spin_lock(&cpu_base->lock);
> +
> + if (hardirq)
> + raw_spin_lock(&cpu_base->lock);
> + else
> + raw_spin_lock_irq(&cpu_base->lock);
>

That's just nasty...

\
 
 \ /
  Last update: 2017-09-26 17:04    [W:0.337 / U:1.152 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site