video: console: mdacon: remove this obsolete driver
Subsystems (6)
PATCH 1/1 video: console: mdacon: remove this obsolete driver
The mdacon driver supports using ISA MDA or Hercules-compatible display adapters as a secondary text console. This was commonly used in the 1990s and earlier for debugging software which took over the primary display. It is highly unlikely anyone is doing so nowadays because serial consoles and much better methods of debugging exist.
The driver is not enabled by any defconfig, nor any of the dozens of distro configs collected at [1]. It has been relegated to VTs 13-16 since commit 0b9cf3aa6b1e ("mdacon messing up default vc's - set default to vc13-16 again") in Linux 2.6.27 (and before Linux 2.5.53 - see the link in the message of the above commit). The change in 2.6.27 was done because it was incorrectly detecting non-MDA adapters as MDA and taking over all VTs, rendering them unusable.
Furthermore, vgacon supports using MDA/Hercules-compatible adapters as the primary text console, so any systems with only one of these adapters were already using vgacon and will not experience any loss in functionality from the removal of this driver.
Given all of these factors, the mdacon driver is likely entirely unused. Remove it.
[1] https://github.com/nyrahul/linux-kernel-configs/tree/f0bee86a135a0406ea427855f52702dd00d770f9
--- .../admin-guide/kernel-parameters.txt | 5 - arch/alpha/kernel/io.c | 2 +- arch/powerpc/include/asm/vga.h | 4 +- drivers/tty/vt/vt.c | 3 - drivers/video/console/Kconfig | 15 - drivers/video/console/Makefile | 1 - drivers/video/console/mdacon.c | 566 ------------------ include/linux/console.h | 2 - include/linux/vt_buffer.h | 2 +- 9 files changed, 4 insertions(+), 596 deletions(-) delete mode 100644 drivers/video/console/mdacon.c
Documentation/admin-guide/kernel-parameters.txt +0 -5
@@ -36,7 +36,6 @@ M68k M68k architecture is enabled. These options have more detailed description inside of Documentation/arch/m68k/kernel-options.rst. - MDA MDA console support is enabled. MIPS MIPS architecture is enabled. MOUSE Appropriate mouse support is enabled. MSI Message Signaled Interrupts (PCI).
@@ -3816,10 +3815,6 @@ Kernel parameters md= [HW] RAID subsystems devices and level See Documentation/admin-guide/md.rst. - mdacon= [MDA] - Format: <first>,<last> - Specifies range of consoles to be captured by the MDA. - mds= [X86,INTEL,EARLY] Control mitigation for the Micro-architectural Data Sampling (MDS) vulnerability.
arch/alpha/kernel/io.c +1 -1
@@ -647,7 +647,7 @@ void _memset_c_io(volatile void __iomem *to, unsigned long c, long count)EXPORT_SYMBOL (_memset_c_io); -#if IS_ENABLED (CONFIG_VGA_CONSOLE ) ||IS_ENABLED (CONFIG_MDA_CONSOLE ) +#if IS_ENABLED (CONFIG_VGA_CONSOLE )#include <asm/vga.h>
arch/powerpc/include/asm/vga.h +2 -2
@@ -14,7 +14,7 @@#include <asm/io.h> -#if defined(CONFIG_VGA_CONSOLE ) || defined(CONFIG_MDA_CONSOLE ) +#ifdef CONFIG_VGA_CONSOLE #define VT_BUF_HAVE_RW /*
@@ -40,7 +40,7 @@ static inline void scr_memsetw(u16 *s, u16 v, unsigned int n) memset16(s, cpu_to_le16(v), n / 2); } -#endif /* !CONFIG_VGA_CONSOLE && !CONFIG_MDA_CONSOLE */ +#endif /* !CONFIG_VGA_CONSOLE */ #ifdef __powerpc64__#define VGA_MAP_MEM (x,s) ((unsigned long) ioremap((x), s))
drivers/tty/vt/vt.c +0 -3
@@ -3978,9 +3978,6 @@ int __init vty_init(const struct file_operations *console_fops)panic ("Couldn't register console driver\n" );kbd_init ();console_map_init (); -#ifdef CONFIG_MDA_CONSOLE -mda_console_init (); -#endif return 0 ; }
drivers/video/console/Kconfig +0 -15
@@ -23,21 +23,6 @@ config VGA_CONSOLE Say Y. -config MDA_CONSOLE - depends on VGA_CONSOLE && ISA - tristate "MDA text console (dual-headed)" - help - Say Y here if you have an old MDA or monochrome Hercules graphics - adapter in your system acting as a second head ( = video card). You - will then be able to use two monitors with your Linux system. Do not - say Y here if your MDA card is the primary card in your system; the - normal VGA driver will handle it. - - To compile this driver as a module, choose M here: the - module will be called mdacon. - - If unsure, say N. - config SGI_NEWPORT_CONSOLE tristate "SGI Newport Console support" depends on SGI_IP22 && HAS_IOMEM
drivers/video/console/Makefile +0 -1
@@ -7,4 +7,3 @@ obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o obj-$(CONFIG_STI_CONSOLE) += sticon.o obj-$(CONFIG_VGA_CONSOLE) += vgacon.o -obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
drivers/video/console/mdacon.c deleted +0 -566
566 lines not on this page · raw message
include/linux/console.h +0 -2
@@ -718,8 +718,6 @@ extern bool console_suspend_enabled;extern void console_suspend_all (void );extern void console_resume_all (void ); -int mda_console_init (void ); -void vcs_make_sysfs (int index);void vcs_remove_sysfs (int index);
include/linux/vt_buffer.h +1 -1
@@ -16,7 +16,7 @@#include <linux/string.h> -#if IS_ENABLED (CONFIG_VGA_CONSOLE ) ||IS_ENABLED (CONFIG_MDA_CONSOLE ) +#if IS_ENABLED (CONFIG_VGA_CONSOLE )#include <asm/vga.h> #endif
Signature · 1 line
2.43.0
Helge Deller
maintainerQuoted 14 lines · Ethan Nelson-Moore
The mdacon driver supports using ISA MDA or Hercules-compatible display adapters as a secondary text console. This was commonly used in the 1990s and earlier for debugging software which took over the primary display. It is highly unlikely anyone is doing so nowadays because serial consoles and much better methods of debugging exist.
The driver is not enabled by any defconfig, nor any of the dozens of distro configs collected at [1]. It has been relegated to VTs 13-16 since commit
0b9cf3aa6b1e("mdacon messing up default vc's - set default to vc13-16 again") in Linux 2.6.27 (and before Linux 2.5.53 - see the link in the message of the above commit). The change in 2.6.27 was done because it was incorrectly detecting non-MDA adapters as MDA and taking over all VTs, rendering them unusable.
Quoted 7 lines
Furthermore, vgacon supports using MDA/Hercules-compatible adapters as the primary text console, so any systems with only one of these adapters were already using vgacon and will not experience any loss in functionality from the removal of this driver.
Given all of these factors, the mdacon driver is likely entirely unused. Remove it.
I've applied this patch to the fbdev git tree, since I also believe that there is no use case or user left (with Linux kernels >= 7.0), which uses the mdacon.
If someone thinks we need to keep it, please speak up.
Helge
Quoted 16 lines
[1] https://github.com/nyrahul/linux-kernel-configs/tree/f0bee86a135a0406ea427855f52702dd00d770f9
Signed-off-by Ethan Nelson-Moore <[email protected]>--- .../admin-guide/kernel-parameters.txt | 5 - arch/alpha/kernel/io.c | 2 +- arch/powerpc/include/asm/vga.h | 4 +- drivers/tty/vt/vt.c | 3 - drivers/video/console/Kconfig | 15 - drivers/video/console/Makefile | 1 - drivers/video/console/mdacon.c | 566 ------------------ include/linux/console.h | 2 - include/linux/vt_buffer.h | 2 +- 9 files changed, 4 insertions(+), 596 deletions(-)delete mode 100644
drivers/video/console/mdacon.c