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

serial: drop SERIAL_8250_DEPRECATED_OPTIONS

In 3.7, 8250 was unintentionally renamed to 8250_core. This happened in
the commit 835d844d1a28 (8250_pnp: do pnp probe before legacy probe).
This made 8250.<xxxx> module options effectively defunct. Instead,
8250_core.<xxxx> worked.

In 3.9, the commit f2b8dfd9e480 (serial: 8250: Keep 8250.<xxxx> module
options functional after driver rename) made the original options work
again by introducing a hack.

Later in 3.9, the commit 9196d8acd7f9 (TTY: 8250, revert module name
change) changed the module name back to 8250 (from 8250_core). Since
then, the hack was there to support the transient 8250_core.<xxxx>
options. Those were present only in the 3.7..3.9 range.

These transient options were deprecated by 9326b047e4fd (TTY: 8250,
deprecated 8250_core.* options) in v3.9 too.

Now, after those 12 years, it is time to get rid of this hack
completely.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://patch.msgid.link/20251119092457.826789-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
37d55c92 6d4b55bf

-87
-1
arch/arm/configs/aspeed_g4_defconfig
··· 117 117 # CONFIG_VT is not set 118 118 # CONFIG_LEGACY_PTYS is not set 119 119 CONFIG_SERIAL_8250=y 120 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 121 120 CONFIG_SERIAL_8250_CONSOLE=y 122 121 CONFIG_SERIAL_8250_NR_UARTS=6 123 122 CONFIG_SERIAL_8250_RUNTIME_UARTS=6
-1
arch/arm/configs/aspeed_g5_defconfig
··· 138 138 # CONFIG_VT is not set 139 139 # CONFIG_LEGACY_PTYS is not set 140 140 CONFIG_SERIAL_8250=y 141 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 142 141 CONFIG_SERIAL_8250_CONSOLE=y 143 142 CONFIG_SERIAL_8250_NR_UARTS=6 144 143 CONFIG_SERIAL_8250_RUNTIME_UARTS=6
-1
arch/arm/configs/hisi_defconfig
··· 35 35 CONFIG_HIX5HD2_GMAC=y 36 36 CONFIG_HIP04_ETH=y 37 37 CONFIG_SERIAL_8250=y 38 - CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y 39 38 CONFIG_SERIAL_8250_CONSOLE=y 40 39 CONFIG_SERIAL_8250_NR_UARTS=2 41 40 CONFIG_SERIAL_8250_RUNTIME_UARTS=2
-1
arch/arm/configs/lpc18xx_defconfig
··· 90 90 # CONFIG_UNIX98_PTYS is not set 91 91 # CONFIG_LEGACY_PTYS is not set 92 92 CONFIG_SERIAL_8250=y 93 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 94 93 CONFIG_SERIAL_8250_CONSOLE=y 95 94 CONFIG_SERIAL_OF_PLATFORM=y 96 95 CONFIG_SERIAL_NONSTANDARD=y
-1
arch/arm/configs/shmobile_defconfig
··· 75 75 CONFIG_INPUT_ADXL34X=y 76 76 # CONFIG_LEGACY_PTYS is not set 77 77 CONFIG_SERIAL_8250=y 78 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 79 78 # CONFIG_SERIAL_8250_16550A_VARIANTS is not set 80 79 CONFIG_SERIAL_8250_CONSOLE=y 81 80 # CONFIG_SERIAL_8250_PCI is not set
-1
arch/mips/configs/bcm47xx_defconfig
··· 51 51 CONFIG_BRCMSMAC=y 52 52 CONFIG_ISDN=y 53 53 CONFIG_SERIAL_8250=y 54 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 55 54 CONFIG_SERIAL_8250_CONSOLE=y 56 55 # CONFIG_SERIAL_8250_PCI is not set 57 56 CONFIG_SERIAL_8250_NR_UARTS=2
-1
arch/mips/configs/bmips_stb_defconfig
··· 119 119 CONFIG_VT=y 120 120 CONFIG_VT_HW_CONSOLE_BINDING=y 121 121 CONFIG_SERIAL_8250=y 122 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 123 122 CONFIG_SERIAL_8250_CONSOLE=y 124 123 CONFIG_SERIAL_OF_PLATFORM=y 125 124 # CONFIG_HW_RANDOM is not set
-1
arch/mips/configs/gcw0_defconfig
··· 52 52 CONFIG_INPUT_PWM_VIBRA=y 53 53 # CONFIG_SERIO is not set 54 54 CONFIG_SERIAL_8250=y 55 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 56 55 CONFIG_SERIAL_8250_CONSOLE=y 57 56 CONFIG_SERIAL_8250_INGENIC=y 58 57 CONFIG_HW_RANDOM=y
-1
arch/nios2/configs/10m50_defconfig
··· 51 51 # CONFIG_SERIO_SERPORT is not set 52 52 # CONFIG_VT is not set 53 53 CONFIG_SERIAL_8250=y 54 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 55 54 CONFIG_SERIAL_8250_CONSOLE=y 56 55 CONFIG_SERIAL_OF_PLATFORM=y 57 56 CONFIG_SERIAL_ALTERA_JTAGUART=y
-1
arch/parisc/configs/generic-32bit_defconfig
··· 119 119 CONFIG_INPUT_UINPUT=m 120 120 CONFIG_LEGACY_PTY_COUNT=64 121 121 CONFIG_SERIAL_8250=y 122 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 123 122 CONFIG_SERIAL_8250_CONSOLE=y 124 123 CONFIG_SERIAL_8250_NR_UARTS=8 125 124 CONFIG_SERIAL_8250_EXTENDED=y
-1
arch/parisc/configs/generic-64bit_defconfig
··· 158 158 CONFIG_SERIO_RAW=m 159 159 # CONFIG_LEGACY_PTYS is not set 160 160 CONFIG_SERIAL_8250=y 161 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 162 161 CONFIG_SERIAL_8250_CONSOLE=y 163 162 CONFIG_SERIAL_8250_NR_UARTS=8 164 163 CONFIG_SERIAL_8250_RUNTIME_UARTS=8
-1
arch/powerpc/configs/44x/akebono_defconfig
··· 85 85 # CONFIG_SERIO is not set 86 86 # CONFIG_VT is not set 87 87 CONFIG_SERIAL_8250=y 88 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 89 88 CONFIG_SERIAL_8250_CONSOLE=y 90 89 CONFIG_SERIAL_8250_EXTENDED=y 91 90 CONFIG_SERIAL_8250_SHARE_IRQ=y
-1
arch/powerpc/configs/microwatt_defconfig
··· 62 62 # CONFIG_VT is not set 63 63 # CONFIG_LEGACY_PTYS is not set 64 64 CONFIG_SERIAL_8250=y 65 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 66 65 CONFIG_SERIAL_8250_CONSOLE=y 67 66 CONFIG_SERIAL_OF_PLATFORM=y 68 67 CONFIG_SERIAL_NONSTANDARD=y
-1
arch/riscv/configs/nommu_virt_defconfig
··· 48 48 # CONFIG_LEGACY_PTYS is not set 49 49 # CONFIG_LDISC_AUTOLOAD is not set 50 50 CONFIG_SERIAL_8250=y 51 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 52 51 CONFIG_SERIAL_8250_CONSOLE=y 53 52 CONFIG_SERIAL_8250_NR_UARTS=1 54 53 CONFIG_SERIAL_8250_RUNTIME_UARTS=1
-1
arch/xtensa/configs/audio_kc705_defconfig
··· 81 81 # CONFIG_INPUT_MOUSE is not set 82 82 # CONFIG_SERIO is not set 83 83 CONFIG_SERIAL_8250=y 84 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 85 84 CONFIG_SERIAL_8250_CONSOLE=y 86 85 CONFIG_SERIAL_OF_PLATFORM=y 87 86 CONFIG_HW_RANDOM=y
-1
arch/xtensa/configs/generic_kc705_defconfig
··· 79 79 # CONFIG_INPUT_MOUSE is not set 80 80 # CONFIG_SERIO is not set 81 81 CONFIG_SERIAL_8250=y 82 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 83 82 CONFIG_SERIAL_8250_CONSOLE=y 84 83 CONFIG_SERIAL_OF_PLATFORM=y 85 84 CONFIG_HW_RANDOM=y
-1
arch/xtensa/configs/nommu_kc705_defconfig
··· 81 81 # CONFIG_INPUT_MOUSE is not set 82 82 # CONFIG_SERIO is not set 83 83 CONFIG_SERIAL_8250=y 84 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 85 84 CONFIG_SERIAL_8250_CONSOLE=y 86 85 CONFIG_SERIAL_OF_PLATFORM=y 87 86 CONFIG_HW_RANDOM=y
-1
arch/xtensa/configs/smp_lx200_defconfig
··· 83 83 # CONFIG_INPUT_MOUSE is not set 84 84 # CONFIG_SERIO is not set 85 85 CONFIG_SERIAL_8250=y 86 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 87 86 CONFIG_SERIAL_8250_CONSOLE=y 88 87 CONFIG_SERIAL_OF_PLATFORM=y 89 88 CONFIG_HW_RANDOM=y
-1
arch/xtensa/configs/xip_kc705_defconfig
··· 72 72 # CONFIG_INPUT_MOUSE is not set 73 73 # CONFIG_SERIO is not set 74 74 CONFIG_SERIAL_8250=y 75 - # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set 76 75 CONFIG_SERIAL_8250_CONSOLE=y 77 76 CONFIG_SERIAL_OF_PLATFORM=y 78 77 # CONFIG_HWMON is not set
-27
drivers/tty/serial/8250/8250_platform.c
··· 390 390 MODULE_PARM_DESC(skip_txen_test, "Skip checking for the TXEN bug at init time"); 391 391 392 392 MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); 393 - 394 - #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS 395 - #ifndef MODULE 396 - /* 397 - * This module was renamed to 8250_core in 3.7. Keep the old "8250" name 398 - * working as well for the module options so we don't break people. We 399 - * need to keep the names identical and the convenient macros will happily 400 - * refuse to let us do that by failing the build with redefinition errors 401 - * of global variables. So we stick them inside a dummy function to avoid 402 - * those conflicts. The options still get parsed, and the redefined 403 - * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. 404 - * 405 - * This is hacky. I'm sorry. 406 - */ 407 - static void __used s8250_options(void) 408 - { 409 - #undef MODULE_PARAM_PREFIX 410 - #define MODULE_PARAM_PREFIX "8250_core." 411 - 412 - module_param_cb(share_irqs, &param_ops_uint, &share_irqs, 0644); 413 - module_param_cb(nr_uarts, &param_ops_uint, &nr_uarts, 0644); 414 - module_param_cb(skip_txen_test, &param_ops_uint, &skip_txen_test, 0644); 415 - } 416 - #else 417 - MODULE_ALIAS("8250_core"); 418 - #endif 419 - #endif
-24
drivers/tty/serial/8250/8250_rsa.c
··· 201 201 serial_out(up, UART_RSA_FRR, 0); 202 202 } 203 203 EXPORT_SYMBOL_FOR_MODULES(rsa_reset, "8250_base"); 204 - 205 - #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS 206 - #ifndef MODULE 207 - /* 208 - * Keep the old "8250" name working as well for the module options so we don't 209 - * break people. We need to keep the names identical and the convenient macros 210 - * will happily refuse to let us do that by failing the build with redefinition 211 - * errors of global variables. So we stick them inside a dummy function to 212 - * avoid those conflicts. The options still get parsed, and the redefined 213 - * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. 214 - * 215 - * This is hacky. I'm sorry. 216 - */ 217 - static void __used rsa8250_options(void) 218 - { 219 - #undef MODULE_PARAM_PREFIX 220 - #define MODULE_PARAM_PREFIX "8250_core." 221 - 222 - __module_param_call(MODULE_PARAM_PREFIX, probe_rsa, 223 - &param_array_ops, .arr = &__param_arr_probe_rsa, 224 - 0444, -1, 0); 225 - } 226 - #endif 227 - #endif
-17
drivers/tty/serial/8250/Kconfig
··· 34 34 Most people will say Y or M here, so that they can use serial mice, 35 35 modems and similar devices connecting to the standard serial ports. 36 36 37 - config SERIAL_8250_DEPRECATED_OPTIONS 38 - bool "Support 8250_core.* kernel options (DEPRECATED)" 39 - depends on SERIAL_8250 40 - default y 41 - help 42 - In 3.7 we renamed 8250 to 8250_core by mistake, so now we have to 43 - accept kernel parameters in both forms like 8250_core.nr_uarts=4 and 44 - 8250.nr_uarts=4. We now renamed the module back to 8250, but if 45 - anybody noticed in 3.7 and changed their userspace we still have to 46 - keep the 8250_core.* options around until they revert the changes 47 - they already did. 48 - 49 - If 8250 is built as a module, this adds 8250_core alias instead. 50 - 51 - If you did not notice yet and/or you have userspace from pre-3.7, it 52 - is safe (and recommended) to say N here. 53 - 54 37 config SERIAL_8250_PNP 55 38 bool "8250/16550 PNP device support" if EXPERT 56 39 depends on SERIAL_8250 && PNP