]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: Revert "Remove kthread"
authorPeter Zijlstra <peterz@infradead.org>
Wed, 5 Sep 2018 08:41:58 +0000 (10:41 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 6 Sep 2018 21:38:35 +0000 (23:38 +0200)
commit00656e5d8fe8215a73601f5e502eb188640e13ce
tree49136573c4a2503cd7ba0658b83a03a250cffd09
parente2ec8d2cd3b78ea7d21a54c1bb133c45ae563b39
clocksource: Revert "Remove kthread"

I turns out that the silly spawn kthread from worker was actually needed.

clocksource_watchdog_kthread() cannot be called directly from
clocksource_watchdog_work(), because clocksource_select() calls
timekeeping_notify() which uses stop_machine(). One cannot use
stop_machine() from a workqueue() due lock inversions wrt CPU hotplug.

Revert the patch but add a comment that explain why we jump through such
apparently silly hoops.

Fixes: 99d7f19ce658 ("clocksource: Remove kthread")
Reported-by: Siegfried Metz <frame@mailbox.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Niklas Cassel <niklas.cassel@linaro.org>
Tested-by: Kevin Shanahan <kevin@shanahan.id.au>
Tested-by: viktor_jaegerskuepper@freenet.de
Tested-by: Siegfried Metz <frame@mailbox.org>
Cc: rafael.j.wysocki@intel.com
Cc: len.brown@intel.com
Cc: diego.viola@gmail.com
Cc: rui.zhang@intel.com
Cc: bjorn.andersson@linaro.org
Link: https://lkml.kernel.org/r/20180905084158.GR24124@hirez.programming.kicks-ass.net
kernel/time/clocksource.c