mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
5b39fc049c
s390 is the only architecture that is using own bust_spinlocks() variant, while other arch-s seem to be OK with the common implementation. Heiko Carstens [1] said he would prefer s390 to use the common bust_spinlocks() as well: I did some code archaeology and this function is unchanged since ~17 years. When it was introduced it was close to identical to the x86 variant. All other architectures use the common code variant in the meantime. So if we change this I'd prefer that we switch s390 to the common code variant as well. Right now I can't see a reason for not doing that This patch removes s390 bust_spinlocks() and drops the weak attribute from the common bust_spinlocks() version. [1] lkml.kernel.org/r/20181025062800.GB4037@osiris Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
33 lines
676 B
C
33 lines
676 B
C
// 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 <linux/kernel.h>
|
|
#include <linux/printk.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/tty.h>
|
|
#include <linux/wait.h>
|
|
#include <linux/vt_kern.h>
|
|
#include <linux/console.h>
|
|
|
|
void 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();
|
|
}
|
|
}
|