]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/sysrq.c
Merge branch 'e1000' of ssh://198.78.49.142/srv/git/intel/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / char / sysrq.c
index 12d563c648f7377ce640bff741aa782c756c1051..d58f823188539651f6e6eabd76ac091cae7f835b 100644 (file)
@@ -115,7 +115,7 @@ static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
                                struct tty_struct *tty) 
 {
        local_irq_enable();
-       machine_restart(NULL);
+       emergency_restart();
 }
 
 static struct sysrq_key_op sysrq_reboot_op = {
@@ -153,6 +153,21 @@ static struct sysrq_key_op sysrq_mountro_op = {
 
 /* END SYNC SYSRQ HANDLERS BLOCK */
 
+#ifdef CONFIG_DEBUG_MUTEXES
+
+static void
+sysrq_handle_showlocks(int key, struct pt_regs *pt_regs, struct tty_struct *tty)
+{
+       mutex_debug_show_all_locks();
+}
+
+static struct sysrq_key_op sysrq_showlocks_op = {
+       .handler        = sysrq_handle_showlocks,
+       .help_msg       = "show-all-locks(D)",
+       .action_msg     = "Show Locks Held",
+};
+
+#endif
 
 /* SHOW SYSRQ HANDLERS BLOCK */
 
@@ -228,7 +243,7 @@ static struct sysrq_key_op sysrq_term_op = {
 
 static void moom_callback(void *ignored)
 {
-       out_of_memory(GFP_KERNEL, 0);
+       out_of_memory(&NODE_DATA(0)->node_zonelists[ZONE_NORMAL], GFP_KERNEL, 0);
 }
 
 static DECLARE_WORK(moom_work, moom_callback, NULL);
@@ -294,7 +309,11 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
 #else
 /* c */        NULL,
 #endif
+#ifdef CONFIG_DEBUG_MUTEXES
+/* d */ &sysrq_showlocks_op,
+#else
 /* d */ NULL,
+#endif
 /* e */        &sysrq_term_op,
 /* f */        &sysrq_moom_op,
 /* g */        NULL,
@@ -354,7 +373,7 @@ struct sysrq_key_op *__sysrq_get_key_op (int key) {
         return op_p;
 }
 
-void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p) {
+static void __sysrq_put_key_op (int key, struct sysrq_key_op *op_p) {
         int i;
 
        i = sysrq_key_table_key2index(key);
@@ -419,7 +438,7 @@ void handle_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty)
        __handle_sysrq(key, pt_regs, tty, 1);
 }
 
-int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p,
+static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p,
                                 struct sysrq_key_op *remove_op_p) {
 
        int retval;