libata: adjust speed down rules
[pandora-kernel.git] / kernel / panic.c
index 3886bd8..da4d6ba 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/nmi.h>
 #include <linux/kexec.h>
 #include <linux/debug_locks.h>
+#include <linux/random.h>
 
 int panic_on_oops;
 int tainted;
@@ -148,7 +149,7 @@ EXPORT_SYMBOL(panic);
  *  'F' - Module has been forcibly loaded.
  *  'S' - SMP with CPUs not designed for SMP.
  *  'R' - User forced a module unload.
- *  'M' - Machine had a machine check experience.
+ *  'M' - System experienced a machine check exception.
  *  'B' - System has hit bad_page.
  *  'U' - Userspace-defined naughtiness.
  *
@@ -265,6 +266,20 @@ void oops_enter(void)
        do_oops_enter_exit();
 }
 
+/*
+ * 64-bit random ID for oopses:
+ */
+static u64 oops_id;
+
+static int init_oops_id(void)
+{
+       if (!oops_id)
+               get_random_bytes(&oops_id, sizeof(oops_id));
+
+       return 0;
+}
+late_initcall(init_oops_id);
+
 /*
  * Called when the architecture exits its oops handler, after printing
  * everything.
@@ -272,6 +287,9 @@ void oops_enter(void)
 void oops_exit(void)
 {
        do_oops_enter_exit();
+       init_oops_id();
+       printk(KERN_WARNING "---[ end trace %016llx ]---\n",
+               (unsigned long long)oops_id);
 }
 
 #ifdef CONFIG_CC_STACKPROTECTOR