drm/rockchip: vop: reject vlank control when vop is disabled
[firefly-linux-kernel-4.4.55.git] / kernel / panic.c
index 4579dbb7ed872a7e1c119fdbbf98d9dc8cd67a87..223564d3e1f8b61b9a1b8396961cd93dd426a6d7 100644 (file)
@@ -28,6 +28,9 @@
 #define PANIC_TIMER_STEP 100
 #define PANIC_BLINK_SPD 18
 
+/* Machine specific panic information string */
+char *mach_panic_string;
+
 int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE;
 static unsigned long tainted_mask;
 static int pause_on_oops;
@@ -152,10 +155,12 @@ void panic(const char *fmt, ...)
         * We may have ended up stopping the CPU holding the lock (in
         * smp_send_stop()) while still having some valuable data in the console
         * buffer.  Try to acquire the lock then release it regardless of the
-        * result.  The release will also print the buffers out.
+        * result.  The release will also print the buffers out.  Locks debug
+        * should be disabled to avoid reporting bad unlock balance when
+        * panic() is not being callled from OOPS.
         */
-       console_trylock();
-       console_unlock();
+       debug_locks_off();
+       console_flush_on_panic();
 
        if (!panic_blink)
                panic_blink = no_blink;
@@ -410,6 +415,11 @@ late_initcall(init_oops_id);
 void print_oops_end_marker(void)
 {
        init_oops_id();
+
+       if (mach_panic_string)
+               printk(KERN_WARNING "Board Information: %s\n",
+                      mach_panic_string);
+
        pr_warn("---[ end trace %016llx ]---\n", (unsigned long long)oops_id);
 }