Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vt: Remove con_debug_enter/_leave from struct consw

There are no implementations of con_debug_enter and con_debug_leave.
Remove the callbacks from struct consw and clean up the caller.

This is a functional revert of commit b45cfba4e900 ("vt,console,kdb:
implement atomic console enter/leave functions").

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20251208102851.40894-3-tzimmermann@suse.de

+1 -37
+1 -29
drivers/tty/vt/vt.c
··· 187 187 * fg_console is the current virtual console, 188 188 * last_console is the last used one, 189 189 * want_console is the console we want to switch to, 190 - * saved_* variants are for save/restore around kernel debugger enter/leave 191 190 */ 192 191 int fg_console; 193 192 EXPORT_SYMBOL(fg_console); 194 193 int last_console; 195 194 int want_console = -1; 196 - 197 - static int saved_fg_console; 198 - static int saved_last_console; 199 - static int saved_want_console; 200 - static int saved_vc_mode; 201 - static int saved_console_blanked; 202 195 203 196 /* 204 197 * For each existing display, we have a pointer to console currently visible ··· 4280 4287 */ 4281 4288 void con_debug_enter(struct vc_data *vc) 4282 4289 { 4283 - saved_fg_console = fg_console; 4284 - saved_last_console = last_console; 4285 - saved_want_console = want_console; 4286 - saved_vc_mode = vc->vc_mode; 4287 - saved_console_blanked = console_blanked; 4288 - vc->vc_mode = KD_TEXT; 4289 - console_blanked = 0; 4290 - if (vc->vc_sw->con_debug_enter) 4291 - vc->vc_sw->con_debug_enter(vc); 4292 4290 #ifdef CONFIG_KGDB_KDB 4293 4291 /* Set the initial LINES variable if it is not already set */ 4294 4292 if (vc->vc_rows < 999) { ··· 4319 4335 * was invoked. 4320 4336 */ 4321 4337 void con_debug_leave(void) 4322 - { 4323 - struct vc_data *vc; 4324 - 4325 - fg_console = saved_fg_console; 4326 - last_console = saved_last_console; 4327 - want_console = saved_want_console; 4328 - console_blanked = saved_console_blanked; 4329 - vc_cons[fg_console].d->vc_mode = saved_vc_mode; 4330 - 4331 - vc = vc_cons[fg_console].d; 4332 - if (vc->vc_sw->con_debug_leave) 4333 - vc->vc_sw->con_debug_leave(vc); 4334 - } 4338 + { } 4335 4339 EXPORT_SYMBOL_GPL(con_debug_leave); 4336 4340 4337 4341 static int do_register_con_driver(const struct consw *csw, int first, int last)
-8
include/linux/console.h
··· 79 79 * characters. (optional) 80 80 * @con_invert_region: invert a region of length @count on @vc starting at @p. 81 81 * (optional) 82 - * @con_debug_enter: prepare the console for the debugger. This includes, but 83 - * is not limited to, unblanking the console, loading an 84 - * appropriate palette, and allowing debugger generated output. 85 - * (optional) 86 - * @con_debug_leave: restore the console to its pre-debug state as closely as 87 - * possible. (optional) 88 82 */ 89 83 struct consw { 90 84 struct module *owner; ··· 117 123 enum vc_intensity intensity, 118 124 bool blink, bool underline, bool reverse, bool italic); 119 125 void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); 120 - void (*con_debug_enter)(struct vc_data *vc); 121 - void (*con_debug_leave)(struct vc_data *vc); 122 126 }; 123 127 124 128 extern const struct consw *conswitchp;