Commit f5ba4db7 authored by Steven Rostedt's avatar Steven Rostedt
Browse files

rt,ntp: Move call to schedule_delayed_work() to helper thread



The ntp code for notify_cmos_timer() is called from a hard interrupt
context. schedule_delayed_work() under PREEMPT_RT_FULL calls spinlocks
that have been converted to mutexes, thus calling schedule_delayed_work()
from interrupt is not safe.

Add a helper thread that does the call to schedule_delayed_work and wake
up that thread instead of calling schedule_delayed_work() directly.
This is only for CONFIG_PREEMPT_RT_FULL, otherwise the code still calls
schedule_delayed_work() directly in irq context.

Note: There's a few places in the kernel that do this. Perhaps the RT
code should have a dedicated thread that does the checks. Just register
a notifier on boot up for your check and wake up the thread when
needed. This will be a todo.

Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
[bigeasy: use swork_queue() instead a helper thread]
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
parent 9afd87a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment