]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
s390: use common bust_spinlocks()
authorSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Thu, 25 Oct 2018 07:05:43 +0000 (16:05 +0900)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 30 Nov 2018 06:22:05 +0000 (07:22 +0100)
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>
arch/s390/mm/fault.c
lib/bust_spinlocks.c

index 2b8f32f56e0c20870ef250741562d6d6146d72be..11613362c4e75f9d3668a9618dfed7d7265d9d32 100644 (file)
@@ -81,30 +81,6 @@ static inline int notify_page_fault(struct pt_regs *regs)
        return ret;
 }
 
-
-/*
- * Unlock any spinlocks which will prevent us from getting the
- * message out.
- */
-void bust_spinlocks(int yes)
-{
-       if (yes) {
-               oops_in_progress = 1;
-       } else {
-               int loglevel_save = console_loglevel;
-               console_unblank();
-               oops_in_progress = 0;
-               /*
-                * OK, the message is on the console.  Now we call printk()
-                * without oops_in_progress set so that printk will give klogd
-                * a poke.  Hold onto your hats...
-                */
-               console_loglevel = 15;
-               printk(" ");
-               console_loglevel = loglevel_save;
-       }
-}
-
 /*
  * Find out which address space caused the exception.
  * Access register mode is impossible, ignore space == 3.
index ab719495e2cb42ba7b8c85e7ef5dfadff4695946..8be59f84eaeaf495e9dcf6b3ca049ab360f04753 100644 (file)
@@ -2,7 +2,8 @@
 /*
  * lib/bust_spinlocks.c
  *
- * Provides a minimal bust_spinlocks for architectures which don't have one of their own.
+ * 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.
@@ -16,8 +17,7 @@
 #include <linux/vt_kern.h>
 #include <linux/console.h>
 
-
-void __attribute__((weak)) bust_spinlocks(int yes)
+void bust_spinlocks(int yes)
 {
        if (yes) {
                ++oops_in_progress;