···30233023}3024302430253025/*30263026- * Legacy console printing from printk() caller context does not respect30273027- * raw_spinlock/spinlock nesting. For !PREEMPT_RT the lockdep warning is a30283028- * false positive. For PREEMPT_RT the false positive condition does not30293029- * occur.30303030- *30313031- * This map is used to temporarily establish LD_WAIT_SLEEP context for the30323032- * console write() callback when legacy printing to avoid false positive30333033- * lockdep complaints, thus allowing lockdep to continue to function for30343034- * real issues.30263026+ * The legacy console always acquires a spinlock_t from its printing30273027+ * callback. This violates lock nesting if the caller acquired an always30283028+ * spinning lock (raw_spinlock_t) while invoking printk(). This is not a30293029+ * problem on PREEMPT_RT because legacy consoles print always from a30303030+ * dedicated thread and never from within printk(). Therefore we tell30313031+ * lockdep that a sleeping spin lock (spinlock_t) is valid here.30353032 */30363033#ifdef CONFIG_PREEMPT_RT30373034static inline void printk_legacy_allow_spinlock_enter(void) { }30383035static inline void printk_legacy_allow_spinlock_exit(void) { }30393036#else30403040-static DEFINE_WAIT_OVERRIDE_MAP(printk_legacy_map, LD_WAIT_SLEEP);30373037+static DEFINE_WAIT_OVERRIDE_MAP(printk_legacy_map, LD_WAIT_CONFIG);3041303830423039static inline void printk_legacy_allow_spinlock_enter(void)30433040{