From 76cb841cb886eef6b3bee341a2266c76578724ad Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:02:30 +0200 Subject: Adding upstream version 4.19.249. Signed-off-by: Daniel Baumann --- lib/bust_spinlocks.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lib/bust_spinlocks.c (limited to 'lib/bust_spinlocks.c') diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c new file mode 100644 index 000000000..ab719495e --- /dev/null +++ b/lib/bust_spinlocks.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * lib/bust_spinlocks.c + * + * Provides a minimal bust_spinlocks for architectures which don't have one of their own. + * + * bust_spinlocks() clears any spinlocks which would prevent oops, die(), BUG() + * and panic() information from reaching the user. + */ + +#include +#include +#include +#include +#include +#include +#include + + +void __attribute__((weak)) bust_spinlocks(int yes) +{ + if (yes) { + ++oops_in_progress; + } else { +#ifdef CONFIG_VT + unblank_screen(); +#endif + console_unblank(); + if (--oops_in_progress == 0) + wake_up_klogd(); + } +} -- cgit v1.2.3