Skip to content

Commit

Permalink
sysrq, intel_fb: fix sysrq g collision
Browse files Browse the repository at this point in the history
Commit 79e5394 introduced a
regression where you cannot use sysrq 'g' to enter kgdb.  The solution
is to move the intel fb sysrq over to V for video instead of G for
graphics.  The SMP VOYAGER code to register for the sysrq-v is not
anywhere to be found in the mainline kernel, so the comments in the
code were cleaned up as well.

This patch also cleans up the sysrq definitions for kgdb to make it
generic for the kernel debugger, such that the sysrq 'g' can be used
in the future to enter a gdbstub or another kernel debugger.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Jason Wessel committed May 15, 2009
1 parent 45d4474 commit 364b5b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions drivers/char/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
&sysrq_showlocks_op, /* d */
&sysrq_term_op, /* e */
&sysrq_moom_op, /* f */
/* g: May be registered by ppc for kgdb */
/* g: May be registered for the kernel debugger */
NULL, /* g */
NULL, /* h - reserved for help */
&sysrq_kill_op, /* i */
Expand All @@ -431,7 +431,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
&sysrq_sync_op, /* s */
&sysrq_showstate_op, /* t */
&sysrq_mountro_op, /* u */
/* v: May be registered at init time by SMP VOYAGER */
/* v: May be registered for frame buffer console restore */
NULL, /* v */
&sysrq_showstate_blocked_op, /* w */
/* x: May be registered on ppc/powerpc for xmon */
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ static void intelfb_sysrq(int dummy1, struct tty_struct *dummy3)

static struct sysrq_key_op sysrq_intelfb_restore_op = {
.handler = intelfb_sysrq,
.help_msg = "force-fb(G)",
.help_msg = "force-fb(V)",
.action_msg = "Restore framebuffer console",
};

Expand Down Expand Up @@ -898,7 +898,7 @@ int intelfb_probe(struct drm_device *dev)
ret = intelfb_single_fb_probe(dev);
}

register_sysrq_key('g', &sysrq_intelfb_restore_op);
register_sysrq_key('v', &sysrq_intelfb_restore_op);

return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,8 +1583,8 @@ static void sysrq_handle_gdb(int key, struct tty_struct *tty)

static struct sysrq_key_op sysrq_gdb_op = {
.handler = sysrq_handle_gdb,
.help_msg = "Gdb",
.action_msg = "GDB",
.help_msg = "debug(G)",
.action_msg = "DEBUG",
};
#endif

Expand Down

0 comments on commit 364b5b7

Please sign in to comment.