Re: [PATCH v5 2/3] pps: convert pps_device lock to raw_spinlock for PREEMPT_RT
From: Sebastian Andrzej Siewior
Date: Fri May 22 2026 - 10:55:05 EST
On 2026-04-25 19:20:08 [+0200], Michael Byczkowski wrote:
> --- a/drivers/pps/kapi.c
> +++ b/drivers/pps/kapi.c
> @@ -167,7 +167,7 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event,
>
> timespec_to_pps_ktime(&ts_real, ts->ts_real);
>
> - spin_lock_irqsave(&pps->lock, flags);
> + raw_spin_lock_irqsave(&pps->lock, flags);
>
> /* Must call the echo function? */
> if ((pps->params.mode & (PPS_ECHOASSERT | PPS_ECHOCLEAR)))
> @@ -206,14 +206,18 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event,
>
> pps_kc_event(pps, ts, event);
This acquires a pps_kc_hardpps_lock which is spinlock_t in my tree.
There is also pps_gpio_echo() but this should be all non-blocking.
>
> - /* Wake up if captured something */
> - if (captured) {
> + if (captured)
> pps->last_ev++;
> - wake_up_interruptible_all(&pps->queue);
Sebastian