OSDN Git Service

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)
commitc84cb3735fd53c91101ccdb191f2e3331a9262cb
treec10de08808e9273469f844622ebc276fbcc6624b
parentfdc63ff0e49c588884992b4b2656345a5e878b32
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