]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
vt: Remove con_debug_enter/_leave from struct consw
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 8 Dec 2025 10:17:34 +0000 (11:17 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Sun, 21 Dec 2025 17:24:53 +0000 (18:24 +0100)
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
drivers/tty/vt/vt.c
include/linux/console.h

index d9eb8eae602bd626345c8c3a7005413ea3b037c0..e987d260e346629ced23884b68e2e3e67cb39ead 100644 (file)
@@ -187,19 +187,12 @@ static DECLARE_WORK(con_driver_unregister_work, con_driver_unregister_callback);
  * fg_console is the current virtual console,
  * last_console is the last used one,
  * want_console is the console we want to switch to,
- * saved_* variants are for save/restore around kernel debugger enter/leave
  */
 int fg_console;
 EXPORT_SYMBOL(fg_console);
 int last_console;
 int want_console = -1;
 
-static int saved_fg_console;
-static int saved_last_console;
-static int saved_want_console;
-static int saved_vc_mode;
-static int saved_console_blanked;
-
 /*
  * For each existing display, we have a pointer to console currently visible
  * on that display, allowing consoles other than fg_console to be refreshed
@@ -4287,15 +4280,6 @@ EXPORT_SYMBOL(con_is_visible);
  */
 void con_debug_enter(struct vc_data *vc)
 {
-       saved_fg_console = fg_console;
-       saved_last_console = last_console;
-       saved_want_console = want_console;
-       saved_vc_mode = vc->vc_mode;
-       saved_console_blanked = console_blanked;
-       vc->vc_mode = KD_TEXT;
-       console_blanked = 0;
-       if (vc->vc_sw->con_debug_enter)
-               vc->vc_sw->con_debug_enter(vc);
 #ifdef CONFIG_KGDB_KDB
        /* Set the initial LINES variable if it is not already set */
        if (vc->vc_rows < 999) {
@@ -4335,19 +4319,7 @@ EXPORT_SYMBOL_GPL(con_debug_enter);
  * was invoked.
  */
 void con_debug_leave(void)
-{
-       struct vc_data *vc;
-
-       fg_console = saved_fg_console;
-       last_console = saved_last_console;
-       want_console = saved_want_console;
-       console_blanked = saved_console_blanked;
-       vc_cons[fg_console].d->vc_mode = saved_vc_mode;
-
-       vc = vc_cons[fg_console].d;
-       if (vc->vc_sw->con_debug_leave)
-               vc->vc_sw->con_debug_leave(vc);
-}
+{ }
 EXPORT_SYMBOL_GPL(con_debug_leave);
 
 static int do_register_con_driver(const struct consw *csw, int first, int last)
index fc9f5c5c1b04c8b68fcf090caf2c5bc37d0ab989..e22f5c993e2492bd40d18e049825cfbd44483486 100644 (file)
@@ -79,12 +79,6 @@ enum vc_intensity;
  *             characters. (optional)
  * @con_invert_region: invert a region of length @count on @vc starting at @p.
  *             (optional)
- * @con_debug_enter: prepare the console for the debugger. This includes, but
- *             is not limited to, unblanking the console, loading an
- *             appropriate palette, and allowing debugger generated output.
- *             (optional)
- * @con_debug_leave: restore the console to its pre-debug state as closely as
- *             possible. (optional)
  */
 struct consw {
        struct module *owner;
@@ -123,8 +117,6 @@ struct consw {
                        enum vc_intensity intensity,
                        bool blink, bool underline, bool reverse, bool italic);
        void    (*con_invert_region)(struct vc_data *vc, u16 *p, int count);
-       void    (*con_debug_enter)(struct vc_data *vc);
-       void    (*con_debug_leave)(struct vc_data *vc);
 };
 
 extern const struct consw *conswitchp;