aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-08-05 10:22:30 -0400
committerJason Wessel <jason.wessel@windriver.com>2010-08-05 10:22:30 -0400
commitb45cfba4e9005d64d419718e7ff7f7cab44c1994 (patch)
tree2d454a67c9a87ffc01579d958f9d95dd5e13170e /include/linux/console.h
parent3fa43aba08c5b5a4b407e402606fbe463239b14a (diff)
vt,console,kdb: implement atomic console enter/leave functions
These functions allow the kernel debugger to save and restore the state of the system console. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> CC: David Airlie <airlied@linux.ie> CC: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index dcca5339ceb3..f76fc297322d 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -55,6 +55,16 @@ struct consw {
55 void (*con_invert_region)(struct vc_data *, u16 *, int); 55 void (*con_invert_region)(struct vc_data *, u16 *, int);
56 u16 *(*con_screen_pos)(struct vc_data *, int); 56 u16 *(*con_screen_pos)(struct vc_data *, int);
57 unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *); 57 unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *);
58 /*
59 * Prepare the console for the debugger. This includes, but is not
60 * limited to, unblanking the console, loading an appropriate
61 * palette, and allowing debugger generated output.
62 */
63 int (*con_debug_enter)(struct vc_data *);
64 /*
65 * Restore the console to its pre-debug state as closely as possible.
66 */
67 int (*con_debug_leave)(struct vc_data *);
58}; 68};
59 69
60extern const struct consw *conswitchp; 70extern const struct consw *conswitchp;
@@ -69,6 +79,9 @@ int register_con_driver(const struct consw *csw, int first, int last);
69int unregister_con_driver(const struct consw *csw); 79int unregister_con_driver(const struct consw *csw);
70int take_over_console(const struct consw *sw, int first, int last, int deflt); 80int take_over_console(const struct consw *sw, int first, int last, int deflt);
71void give_up_console(const struct consw *sw); 81void give_up_console(const struct consw *sw);
82int con_debug_enter(struct vc_data *vc);
83int con_debug_leave(void);
84
72/* scroll */ 85/* scroll */
73#define SM_UP (1) 86#define SM_UP (1)
74#define SM_DOWN (2) 87#define SM_DOWN (2)