VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
b24413180f560 (Greg Kroah-Hartman  2017-11-01 15:07:57 +0100  1) // SPDX-License-Identifier: GPL-2.0
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700  2) /*
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700  3)  * lib/bust_spinlocks.c
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700  4)  *
5b39fc049ce12 (Sergey Senozhatsky  2018-10-25 16:05:43 +0900  5)  * Provides a minimal bust_spinlocks for architectures which don't
5b39fc049ce12 (Sergey Senozhatsky  2018-10-25 16:05:43 +0900  6)  * have one of their own.
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700  7)  *
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700  8)  * bust_spinlocks() clears any spinlocks which would prevent oops, die(), BUG()
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700  9)  * and panic() information from reaching the user.
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 10)  */
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 11) 
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 12) #include <linux/kernel.h>
dc72c32e1fd87 (Frederic Weisbecker 2013-03-22 15:04:39 -0700 13) #include <linux/printk.h>
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 14) #include <linux/spinlock.h>
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 15) #include <linux/tty.h>
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 16) #include <linux/wait.h>
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 17) #include <linux/vt_kern.h>
b61312d353da1 (Viktor Rosendahl    2009-01-06 14:40:42 -0800 18) #include <linux/console.h>
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 19) 
5b39fc049ce12 (Sergey Senozhatsky  2018-10-25 16:05:43 +0900 20) void bust_spinlocks(int yes)
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 21) {
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 22) 	if (yes) {
004429956b487 (Jan Beulich         2007-10-16 23:29:33 -0700 23) 		++oops_in_progress;
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 24) 	} else {
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 25) #ifdef CONFIG_VT
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 26) 		unblank_screen();
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 27) #endif
b61312d353da1 (Viktor Rosendahl    2009-01-06 14:40:42 -0800 28) 		console_unblank();
004429956b487 (Jan Beulich         2007-10-16 23:29:33 -0700 29) 		if (--oops_in_progress == 0)
004429956b487 (Jan Beulich         2007-10-16 23:29:33 -0700 30) 			wake_up_klogd();
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 31) 	}
^1da177e4c3f4 (Linus Torvalds      2005-04-16 15:20:36 -0700 32) }