]> git.baikalelectronics.ru Git - kernel.git/commit
x86/apic: Move TSC deadline timer debug printk
authorThomas Gleixner <tglx@linutronix.de>
Mon, 27 Apr 2020 14:55:57 +0000 (16:55 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 1 May 2020 17:15:41 +0000 (19:15 +0200)
commita334853b8d72edc8d255bdb81970bcaa2a526aee
treec10de08808e9273469f844622ebc276fbcc6624b
parent9f62aa97793f75e3021fddfecb497541ad70deb8
x86/apic: Move TSC deadline timer debug printk

Leon reported that the printk_once() in __setup_APIC_LVTT() triggers a
lockdep splat due to a lock order violation between hrtimer_base::lock and
console_sem, when the 'once' condition is reset via
/sys/kernel/debug/clear_warn_once after boot.

The initial printk cannot trigger this because that happens during boot
when the local APIC timer is set up on the boot CPU.

Prevent it by moving the printk to a place which is guaranteed to be only
called once during boot.

Mark the deadline timer check related functions and data __init while at
it.

Reported-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/87y2qhoshi.fsf@nanos.tec.linutronix.de
arch/x86/kernel/apic/apic.c