lkml.org 
[lkml]   [2017]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/25] hrtimer: Implementation of softirq hrtimer handling
On Wed, Sep 27, 2017 at 04:22:39PM +0200, Anna-Maria Gleixner wrote:
> I know and Thomas was unhappy about that as well, but we did not come
> up with a better solution.
>
> The nasty alternative is:
>
> 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,
> + unsigned long flags)
> ...
> - raw_spin_unlock(&cpu_base->lock);
> + raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
>
> ...
> - raw_spin_lock(&cpu_base->lock);
> + raw_spin_lock_irq(&cpu_base->lock, flags);
>
> and hand in flags from the callsites via local_save_flags().

Just push it up one more level and use raw_spin_lock_irqsave() in the
(soft)irq handlers and then pass the flags around.

Thta's what I did in that patch I just send.

\
 
 \ /
  Last update: 2017-09-27 18:48    [W:0.086 / U:0.052 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site