From nobody Tue Dec 2 02:19:59 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D299433C523; Wed, 19 Nov 2025 09:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544303; cv=none; b=T/7wARhmzYvwfrCi1CneQgVk8fwzkkMKlQB/9Y7jtExv2TgoMudZAY3TWl/x9DupfNziFEbLrdZiSCYj3/pgz1AWQuN25sDvvT9WR/hyo/MAxBNJGMCBsuA4e7fI7nQ12T+qRKCzjFbUnNBAXgsdVSh8m0n1dwwUCLqXtQVNvOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544303; c=relaxed/simple; bh=Wf88PMb/UGXyIpHUPPH2JLfgFSr11ineysPvYpjmVDc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pVO4TkMhittjtIa0tTE7PohwyyqgiLaXo0pHApc53tRCO0ttqhDjFPQWCNIP96aNQKZAdHPnb5fukSai9yF1OxxQtx3tAmng29e6r+5lQbzmvRcUX4rFcC4D/yIn8ybiz79Hd7mA8XtgHVhPCKse+t2f05pIkLEgPQwg3IFJBu4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AeEyKc34; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AeEyKc34" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08C8BC19425; Wed, 19 Nov 2025 09:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544303; bh=Wf88PMb/UGXyIpHUPPH2JLfgFSr11ineysPvYpjmVDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AeEyKc34mEhVwmF5j/hTy5r2RqT5Zx4PpKWJ1X07xf0JNNuTRac3AfiL5amSXuTmf CKAeNfsdKKHBqiiWeT73h/yGn1rqDBTt8v7yItrXO7knKLunl6RCWHm0VF0A2tvCoW G47tcIfiIPSkQGG1hmzTAYgT5rGzudXW3VtYqcAd7Q5w+oPp9m3ozGadnMg5+EL4kR VtjQE4O3pyX/TCUoTSE+3eM0eaaJOoit0dugls/Sv/rl0TByofbDfDhXSHCCuWvwP/ K0ydHX27O8ftcEMOQIQJyJVl8xrUsczmk9bHf+ouML3p6b/qNKrr26tWBAVCxHrZWj skhb9+5FqkqIQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 1/6] tty: vt: do not open code DIV_ROUND_UP() Date: Wed, 19 Nov 2025 10:24:52 +0100 Message-ID: <20251119092457.826789-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119092457.826789-1-jirislaby@kernel.org> References: <20251119092457.826789-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the designated DIV_ROUND_UP() macro instead of explicit addition with division. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/vt/vt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 6e0089b85c27..59b4b5e126ba 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -4862,7 +4862,7 @@ static int con_font_get(struct vc_data *vc, struct co= nsole_font_op *op) return ret; } =20 - c =3D (font.width+7)/8 * vpitch * font.charcount; + c =3D DIV_ROUND_UP(font.width, 8) * vpitch * font.charcount; =20 if (op->data && font.charcount > op->charcount) return -ENOSPC; @@ -4894,7 +4894,7 @@ static int con_font_set(struct vc_data *vc, const str= uct console_font_op *op) return -EINVAL; if (vpitch < op->height) return -EINVAL; - size =3D (op->width+7)/8 * vpitch * op->charcount; + size =3D DIV_ROUND_UP(op->width, 8) * vpitch * op->charcount; if (size > max_font_size) return -ENOSPC; =20 --=20 2.51.1 From nobody Tue Dec 2 02:19:59 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D25B2F12A9; Wed, 19 Nov 2025 09:25:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544306; cv=none; b=C5KWQSLNuOX3AUe0GWIr5sVTjksJiGaoKvOxyYugSdMNImc9xup7Vveo1kkzQfWq6ozw2bEJFEQOflzlWnPeMhgmWO+22N65qBWEaDlo/jTWQIbjkZ9sQkeeCzHNphXX3ZQ9xIDEsi1PRAuTlBFirekoMib3nEcSn7Vep7uaqTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544306; c=relaxed/simple; bh=7CFuSj4IG2U8EHX0SPSAk32/9j7h/b0rTxyBDxOWsfg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fx3xEPG8WCxf+jkX1+uq4Hj5jwHcdVNkEM4QgDm4v/tmpwaQhzT8YN9xRo6yodScVM8HAUQ2R0/l4XGUIAVGDUqbC15qpOaoJNFfA5+/KkqpdmSUTKa3RcBzHIbvY0juNRbQqmojIMXak6JRf5s1pW9PLgEhA5Ep5Xv7yTrF8o8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qfF5G8a5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qfF5G8a5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5CE9C19424; Wed, 19 Nov 2025 09:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544305; bh=7CFuSj4IG2U8EHX0SPSAk32/9j7h/b0rTxyBDxOWsfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qfF5G8a5i8tMZSgemK6nOdyDUBJko+TBjRiB7VlpL/x0pjrWJHlx23VxsOJAb7ItB RUdjb00cA6JqQhL4KwVz6opuc1dkiZZAZTAk01/RKc+i6zCiPakXANCe2Pss3EI6V2 bJ/YDiH0zKxjaNbqSOOOtWi51PDyFLHxQ8DybqXyCrT3dL9DZIBU0JUmyc07vlykQe tZNR+Xb3GLnsXFZylu844n9K48BNHMPM1RGB4+t1d1QfGXerRtPou2sxBaGHkISkS7 tbDGdvpJlXjddK7+uvfHTIT/Ca0YYWhyi+YLteYUif7huS6L+8vXKM9zKTQtppIoEJ KncW5XJsEDQEg== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Michal Simek , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] serial: xilinx_uartps: drop cdns_uart::cdns_uart_driver Date: Wed, 19 Nov 2025 10:24:53 +0100 Message-ID: <20251119092457.826789-3-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119092457.826789-1-jirislaby@kernel.org> References: <20251119092457.826789-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Provided the uart driver is available globally, there is no need to store a pointer to it in struct cdns_uart. Instead, use the global cdns_uart_uart_driver in the code directly. Signed-off-by: Jiri Slaby (SUSE) Acked-by: Michal Simek --- Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org --- drivers/tty/serial/xilinx_uartps.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx= _uartps.c index a66b44d21fba..c793fc74c26b 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -190,7 +190,6 @@ MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255"); * @port: Pointer to the UART port * @uartclk: Reference clock * @pclk: APB clock - * @cdns_uart_driver: Pointer to UART driver * @baud: Current baud rate * @clk_rate_change_nb: Notifier block for clock changes * @quirks: Flags for RXBS support. @@ -204,7 +203,6 @@ struct cdns_uart { struct uart_port *port; struct clk *uartclk; struct clk *pclk; - struct uart_driver *cdns_uart_driver; unsigned int baud; struct notifier_block clk_rate_change_nb; u32 quirks; @@ -1465,7 +1463,6 @@ static struct console cdns_uart_console =3D { static int cdns_uart_suspend(struct device *device) { struct uart_port *port =3D dev_get_drvdata(device); - struct cdns_uart *cdns_uart =3D port->private_data; int may_wake; =20 may_wake =3D device_may_wakeup(device); @@ -1489,7 +1486,7 @@ static int cdns_uart_suspend(struct device *device) * Call the API provided in serial_core.c file which handles * the suspend. */ - return uart_suspend_port(cdns_uart->cdns_uart_driver, port); + return uart_suspend_port(&cdns_uart_uart_driver, port); } =20 /** @@ -1550,7 +1547,7 @@ static int cdns_uart_resume(struct device *device) uart_port_unlock_irqrestore(port, flags); } =20 - return uart_resume_port(cdns_uart->cdns_uart_driver, port); + return uart_resume_port(&cdns_uart_uart_driver, port); } #endif /* ! CONFIG_PM_SLEEP */ static int __maybe_unused cdns_runtime_suspend(struct device *dev) @@ -1686,8 +1683,6 @@ static int cdns_uart_probe(struct platform_device *pd= ev) } } =20 - cdns_uart_data->cdns_uart_driver =3D &cdns_uart_uart_driver; - match =3D of_match_node(cdns_uart_of_match, pdev->dev.of_node); if (match && match->data) { const struct cdns_platform_data *data =3D match->data; @@ -1862,7 +1857,7 @@ static int cdns_uart_probe(struct platform_device *pd= ev) clk_disable_unprepare(cdns_uart_data->pclk); err_out_unregister_driver: if (!instances) - uart_unregister_driver(cdns_uart_data->cdns_uart_driver); + uart_unregister_driver(&cdns_uart_uart_driver); return rc; } =20 @@ -1880,7 +1875,7 @@ static void cdns_uart_remove(struct platform_device *= pdev) clk_notifier_unregister(cdns_uart_data->uartclk, &cdns_uart_data->clk_rate_change_nb); #endif - uart_remove_one_port(cdns_uart_data->cdns_uart_driver, port); + uart_remove_one_port(&cdns_uart_uart_driver, port); port->mapbase =3D 0; clk_disable_unprepare(cdns_uart_data->uartclk); clk_disable_unprepare(cdns_uart_data->pclk); @@ -1896,7 +1891,7 @@ static void cdns_uart_remove(struct platform_device *= pdev) reset_control_assert(cdns_uart_data->rstc); =20 if (!--instances) - uart_unregister_driver(cdns_uart_data->cdns_uart_driver); + uart_unregister_driver(&cdns_uart_uart_driver); } =20 static struct platform_driver cdns_uart_platform_driver =3D { --=20 2.51.1 From nobody Tue Dec 2 02:19:59 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E74AE33C51B; Wed, 19 Nov 2025 09:25:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544308; cv=none; b=k5CRxsKsucxYzLv7F2Qp9BUXew+EDvNjmOrDMGZ1FiAb2iA0ZwCkl00aUJ4/Ccfrt5oBAw1MGD4fqZdDPmHOrLhTshkhBib+bcBNbdDEx1YJYlzh/6JXELKygFjIKl6JgPTeCWOpuO0soFlimOPayiKpF3s2J5+DkmDQlTpmkIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544308; c=relaxed/simple; bh=YN7iNHw8GZr8vTTesVQDSzRNnf/apZ2VOCuWIEqlkM0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tkb9Jd/sfcvSTrbybJV5n5Pw00l6hZ9/AgVsOh2If58mfwNB1AFj4VgKEh7x/NKzcNbLSLrFGiasN2NVfyqeALE4oKi8rzvdaExWmYIy6Qq+DVpZrRHYlH6V5r8eQ/cswwc8XpICeQfXOz6XqQ4n/+ZnMaW1F5tkr/YY90MupQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZTNPOAwP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZTNPOAwP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C7ABC4AF17; Wed, 19 Nov 2025 09:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544307; bh=YN7iNHw8GZr8vTTesVQDSzRNnf/apZ2VOCuWIEqlkM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZTNPOAwPwdd6F93If+NOZM7oi1S/TrPgyLbyQmov1H+xWqP+JctUxOy15QVedm0rp 61Mqg6S7yXFVuxksu5m1G0dfur2W9x62KIGiWlonkKz0EUz2w8mSmyTEFNKIVwUcLh 1Y5BG5LuPLQIiSmYDGV++skLWH9TQ38rvv3XOhBiJPf35SRzZOPWnpV2fSMVcyd/EZ F9Dj32VXmupmvMFIEIDsTjBcncW1Q+8pZNuwCIrS24OoNBFbzWPCRufFp1RJHWKnQA IsQcYB1rA/RA2AJW68DMwsRxF8InnTGqxcTHfUlecfJeVURHsy7IQDroMKZG7t26Dy 27cO7B/ekGIgw== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 3/6] serial: drop SERIAL_8250_DEPRECATED_OPTIONS Date: Wed, 19 Nov 2025 10:24:54 +0100 Message-ID: <20251119092457.826789-4-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119092457.826789-1-jirislaby@kernel.org> References: <20251119092457.826789-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. module options effectively defunct. Instead, 8250_core. worked. In 3.9, the commit f2b8dfd9e480 (serial: 8250: Keep 8250. 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. 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) --- arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/hisi_defconfig | 1 - arch/arm/configs/lpc18xx_defconfig | 1 - arch/arm/configs/shmobile_defconfig | 1 - arch/mips/configs/bcm47xx_defconfig | 1 - arch/mips/configs/bmips_stb_defconfig | 1 - arch/mips/configs/gcw0_defconfig | 1 - arch/nios2/configs/10m50_defconfig | 1 - arch/parisc/configs/generic-32bit_defconfig | 1 - arch/parisc/configs/generic-64bit_defconfig | 1 - arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/microwatt_defconfig | 1 - arch/riscv/configs/nommu_virt_defconfig | 1 - arch/xtensa/configs/audio_kc705_defconfig | 1 - arch/xtensa/configs/generic_kc705_defconfig | 1 - arch/xtensa/configs/nommu_kc705_defconfig | 1 - arch/xtensa/configs/smp_lx200_defconfig | 1 - arch/xtensa/configs/xip_kc705_defconfig | 1 - drivers/tty/serial/8250/8250_platform.c | 27 --------------------- drivers/tty/serial/8250/8250_rsa.c | 24 ------------------ drivers/tty/serial/8250/Kconfig | 17 ------------- 22 files changed, 87 deletions(-) diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed= _g4_defconfig index 28b724d59e7e..45d8738abb75 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -117,7 +117,6 @@ CONFIG_KEYBOARD_GPIO_POLLED=3Dy # CONFIG_VT is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_NR_UARTS=3D6 CONFIG_SERIAL_8250_RUNTIME_UARTS=3D6 diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed= _g5_defconfig index c3b0d5f06889..2e6ea13c1e9b 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -138,7 +138,6 @@ CONFIG_SERIO_RAW=3Dy # CONFIG_VT is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_NR_UARTS=3D6 CONFIG_SERIAL_8250_RUNTIME_UARTS=3D6 diff --git a/arch/arm/configs/hisi_defconfig b/arch/arm/configs/hisi_defcon= fig index e19c1039fb93..384aade1a48b 100644 --- a/arch/arm/configs/hisi_defconfig +++ b/arch/arm/configs/hisi_defconfig @@ -35,7 +35,6 @@ CONFIG_NETDEVICES=3Dy CONFIG_HIX5HD2_GMAC=3Dy CONFIG_HIP04_ETH=3Dy CONFIG_SERIAL_8250=3Dy -CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=3Dy CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_NR_UARTS=3D2 CONFIG_SERIAL_8250_RUNTIME_UARTS=3D2 diff --git a/arch/arm/configs/lpc18xx_defconfig b/arch/arm/configs/lpc18xx_= defconfig index 2d489186e945..f142a6637ede 100644 --- a/arch/arm/configs/lpc18xx_defconfig +++ b/arch/arm/configs/lpc18xx_defconfig @@ -90,7 +90,6 @@ CONFIG_KEYBOARD_GPIO_POLLED=3Dy # CONFIG_UNIX98_PTYS is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_SERIAL_NONSTANDARD=3Dy diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobil= e_defconfig index c1fd469e2071..0085921833c3 100644 --- a/arch/arm/configs/shmobile_defconfig +++ b/arch/arm/configs/shmobile_defconfig @@ -75,7 +75,6 @@ CONFIG_INPUT_DA9063_ONKEY=3Dy CONFIG_INPUT_ADXL34X=3Dy # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set # CONFIG_SERIAL_8250_16550A_VARIANTS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy # CONFIG_SERIAL_8250_PCI is not set diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47x= x_defconfig index f56e8db5da95..d10b3d4adbd1 100644 --- a/arch/mips/configs/bcm47xx_defconfig +++ b/arch/mips/configs/bcm47xx_defconfig @@ -51,7 +51,6 @@ CONFIG_B43LEGACY=3Dy CONFIG_BRCMSMAC=3Dy CONFIG_ISDN=3Dy CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy # CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_NR_UARTS=3D2 diff --git a/arch/mips/configs/bmips_stb_defconfig b/arch/mips/configs/bmip= s_stb_defconfig index cd0dc37c3d84..ecfa7f777efa 100644 --- a/arch/mips/configs/bmips_stb_defconfig +++ b/arch/mips/configs/bmips_stb_defconfig @@ -119,7 +119,6 @@ CONFIG_INPUT_UINPUT=3Dy CONFIG_VT=3Dy CONFIG_VT_HW_CONSOLE_BINDING=3Dy CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy # CONFIG_HW_RANDOM is not set diff --git a/arch/mips/configs/gcw0_defconfig b/arch/mips/configs/gcw0_defc= onfig index 8b7ad877e07a..fda9971bdd8d 100644 --- a/arch/mips/configs/gcw0_defconfig +++ b/arch/mips/configs/gcw0_defconfig @@ -52,7 +52,6 @@ CONFIG_INPUT_UINPUT=3Dy CONFIG_INPUT_PWM_VIBRA=3Dy # CONFIG_SERIO is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_INGENIC=3Dy CONFIG_HW_RANDOM=3Dy diff --git a/arch/nios2/configs/10m50_defconfig b/arch/nios2/configs/10m50_= defconfig index 048f74e0dc6d..b7224f44d327 100644 --- a/arch/nios2/configs/10m50_defconfig +++ b/arch/nios2/configs/10m50_defconfig @@ -51,7 +51,6 @@ CONFIG_MARVELL_PHY=3Dy # CONFIG_SERIO_SERPORT is not set # CONFIG_VT is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_SERIAL_ALTERA_JTAGUART=3Dy diff --git a/arch/parisc/configs/generic-32bit_defconfig b/arch/parisc/conf= igs/generic-32bit_defconfig index 52031bde9f17..5444ce6405f3 100644 --- a/arch/parisc/configs/generic-32bit_defconfig +++ b/arch/parisc/configs/generic-32bit_defconfig @@ -119,7 +119,6 @@ CONFIG_INPUT_MISC=3Dy CONFIG_INPUT_UINPUT=3Dm CONFIG_LEGACY_PTY_COUNT=3D64 CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_NR_UARTS=3D8 CONFIG_SERIAL_8250_EXTENDED=3Dy diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/conf= igs/generic-64bit_defconfig index 1aec04c09d0b..ce91f9d1fdbf 100644 --- a/arch/parisc/configs/generic-64bit_defconfig +++ b/arch/parisc/configs/generic-64bit_defconfig @@ -158,7 +158,6 @@ CONFIG_SERIO_SERPORT=3Dm CONFIG_SERIO_RAW=3Dm # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_NR_UARTS=3D8 CONFIG_SERIAL_8250_RUNTIME_UARTS=3D8 diff --git a/arch/powerpc/configs/44x/akebono_defconfig b/arch/powerpc/conf= igs/44x/akebono_defconfig index 1882eb2da354..02e88648a2e6 100644 --- a/arch/powerpc/configs/44x/akebono_defconfig +++ b/arch/powerpc/configs/44x/akebono_defconfig @@ -85,7 +85,6 @@ CONFIG_IBM_EMAC=3Dy # CONFIG_SERIO is not set # CONFIG_VT is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_EXTENDED=3Dy CONFIG_SERIAL_8250_SHARE_IRQ=3Dy diff --git a/arch/powerpc/configs/microwatt_defconfig b/arch/powerpc/config= s/microwatt_defconfig index a64fb1ef8c75..d81989a6f59b 100644 --- a/arch/powerpc/configs/microwatt_defconfig +++ b/arch/powerpc/configs/microwatt_defconfig @@ -62,7 +62,6 @@ CONFIG_LITEX_LITEETH=3Dy # CONFIG_VT is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_SERIAL_NONSTANDARD=3Dy diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/n= ommu_virt_defconfig index d4b03dc3c2c0..0da5069bfbef 100644 --- a/arch/riscv/configs/nommu_virt_defconfig +++ b/arch/riscv/configs/nommu_virt_defconfig @@ -48,7 +48,6 @@ CONFIG_VIRTIO_BLK=3Dy # CONFIG_LEGACY_PTYS is not set # CONFIG_LDISC_AUTOLOAD is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_8250_NR_UARTS=3D1 CONFIG_SERIAL_8250_RUNTIME_UARTS=3D1 diff --git a/arch/xtensa/configs/audio_kc705_defconfig b/arch/xtensa/config= s/audio_kc705_defconfig index dc942bbac69f..7b3f234b337c 100644 --- a/arch/xtensa/configs/audio_kc705_defconfig +++ b/arch/xtensa/configs/audio_kc705_defconfig @@ -81,7 +81,6 @@ CONFIG_MARVELL_PHY=3Dy # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_HW_RANDOM=3Dy diff --git a/arch/xtensa/configs/generic_kc705_defconfig b/arch/xtensa/conf= igs/generic_kc705_defconfig index 3ee7e1c56556..c1b766a77a1e 100644 --- a/arch/xtensa/configs/generic_kc705_defconfig +++ b/arch/xtensa/configs/generic_kc705_defconfig @@ -79,7 +79,6 @@ CONFIG_MARVELL_PHY=3Dy # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_HW_RANDOM=3Dy diff --git a/arch/xtensa/configs/nommu_kc705_defconfig b/arch/xtensa/config= s/nommu_kc705_defconfig index c6e96f0aa700..27b126d4e7bf 100644 --- a/arch/xtensa/configs/nommu_kc705_defconfig +++ b/arch/xtensa/configs/nommu_kc705_defconfig @@ -81,7 +81,6 @@ CONFIG_MARVELL_PHY=3Dy # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_HW_RANDOM=3Dy diff --git a/arch/xtensa/configs/smp_lx200_defconfig b/arch/xtensa/configs/= smp_lx200_defconfig index 373d42b9e510..dfb3d921b850 100644 --- a/arch/xtensa/configs/smp_lx200_defconfig +++ b/arch/xtensa/configs/smp_lx200_defconfig @@ -83,7 +83,6 @@ CONFIG_MARVELL_PHY=3Dy # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy CONFIG_HW_RANDOM=3Dy diff --git a/arch/xtensa/configs/xip_kc705_defconfig b/arch/xtensa/configs/= xip_kc705_defconfig index 5d6013ea70fc..472568b85fb9 100644 --- a/arch/xtensa/configs/xip_kc705_defconfig +++ b/arch/xtensa/configs/xip_kc705_defconfig @@ -72,7 +72,6 @@ CONFIG_MARVELL_PHY=3Dy # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_8250=3Dy -# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_CONSOLE=3Dy CONFIG_SERIAL_OF_PLATFORM=3Dy # CONFIG_HWMON is not set diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index b27981340e76..38b158ec4725 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -390,30 +390,3 @@ module_param(skip_txen_test, uint, 0644); MODULE_PARM_DESC(skip_txen_test, "Skip checking for the TXEN bug at init t= ime"); =20 MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); - -#ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS -#ifndef MODULE -/* - * This module was renamed to 8250_core in 3.7. Keep the old "8250" name - * working as well for the module options so we don't break people. We - * need to keep the names identical and the convenient macros will happily - * refuse to let us do that by failing the build with redefinition errors - * of global variables. So we stick them inside a dummy function to avoid - * those conflicts. The options still get parsed, and the redefined - * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. - * - * This is hacky. I'm sorry. - */ -static void __used s8250_options(void) -{ -#undef MODULE_PARAM_PREFIX -#define MODULE_PARAM_PREFIX "8250_core." - - module_param_cb(share_irqs, ¶m_ops_uint, &share_irqs, 0644); - module_param_cb(nr_uarts, ¶m_ops_uint, &nr_uarts, 0644); - module_param_cb(skip_txen_test, ¶m_ops_uint, &skip_txen_test, 0644); -} -#else -MODULE_ALIAS("8250_core"); -#endif -#endif diff --git a/drivers/tty/serial/8250/8250_rsa.c b/drivers/tty/serial/8250/8= 250_rsa.c index 40a3dbd9e452..3b9c00515407 100644 --- a/drivers/tty/serial/8250/8250_rsa.c +++ b/drivers/tty/serial/8250/8250_rsa.c @@ -201,27 +201,3 @@ void rsa_reset(struct uart_8250_port *up) serial_out(up, UART_RSA_FRR, 0); } EXPORT_SYMBOL_FOR_MODULES(rsa_reset, "8250_base"); - -#ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS -#ifndef MODULE -/* - * Keep the old "8250" name working as well for the module options so we d= on't - * break people. We need to keep the names identical and the convenient ma= cros - * will happily refuse to let us do that by failing the build with redefin= ition - * errors of global variables. So we stick them inside a dummy function to - * avoid those conflicts. The options still get parsed, and the redefined - * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. - * - * This is hacky. I'm sorry. - */ -static void __used rsa8250_options(void) -{ -#undef MODULE_PARAM_PREFIX -#define MODULE_PARAM_PREFIX "8250_core." - - __module_param_call(MODULE_PARAM_PREFIX, probe_rsa, - ¶m_array_ops, .arr =3D &__param_arr_probe_rsa, - 0444, -1, 0); -} -#endif -#endif diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kcon= fig index f64ef0819cd4..58f0142a59ff 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig @@ -34,23 +34,6 @@ config SERIAL_8250 Most people will say Y or M here, so that they can use serial mice, modems and similar devices connecting to the standard serial ports. =20 -config SERIAL_8250_DEPRECATED_OPTIONS - bool "Support 8250_core.* kernel options (DEPRECATED)" - depends on SERIAL_8250 - default y - help - In 3.7 we renamed 8250 to 8250_core by mistake, so now we have to - accept kernel parameters in both forms like 8250_core.nr_uarts=3D4 and - 8250.nr_uarts=3D4. We now renamed the module back to 8250, but if - anybody noticed in 3.7 and changed their userspace we still have to - keep the 8250_core.* options around until they revert the changes - they already did. - - If 8250 is built as a module, this adds 8250_core alias instead.=20 - - If you did not notice yet and/or you have userspace from pre-3.7, it - is safe (and recommended) to say N here. - config SERIAL_8250_PNP bool "8250/16550 PNP device support" if EXPERT depends on SERIAL_8250 && PNP --=20 2.51.1 From nobody Tue Dec 2 02:19:59 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ECAA33DEFE; Wed, 19 Nov 2025 09:25:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544310; cv=none; b=c2gE88goYgzCtaE6pNHBebPghBVvIAM38HqFUtPthziV6Rs2hnlg6e3ziZJ2Tt0tlfiOhrMUaZtP7ibSBXUPB9amHo6RMWAIf0ggcNEzvRNTmy2RQmDy/PmJrL9GoXQFf31aCC47Nsj+ymW1iofzOwUC/hFsJgctOKLYe1XIxvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544310; c=relaxed/simple; bh=NRn1NfBgPUORdw8OpscMlXHnoEzm+3rzwpdJkyfa6GI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Pf9uRJ+buPkzbsIvxRnXRMsCidnZhHP32yaDVnGdEc9Hak2qIRPQmHtGyC738twn3lpYmhPpRctpFrXzi1ItYKEQWYatp1J9cqYmcICGgzcxy28CmYs+n35wf1on0EJgcKHrAV7sn9e/e+PECPLw6uEh1NLuwUFUXu/IAZLH93M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UaKZ4NH4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UaKZ4NH4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE5F7C2BC87; Wed, 19 Nov 2025 09:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544309; bh=NRn1NfBgPUORdw8OpscMlXHnoEzm+3rzwpdJkyfa6GI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UaKZ4NH4TkUmZMnA6ih5P724uNcq7N5+sbDHpgNZrBXVdnNCdXoA/JMf2urvucgYL Et9XAtK87rmijCu3qjWqC+opZF4FFeZadxsxlwlFuv5Vypa2vxwBxKb8dMYO5BDtQg sNg6Pz6fimcJOIirrgMST1s+ntIGfUhSdvcjr6zrh5V2ktLc4d1csD3uOOnAFp4Z6T 7SEbXAqY866dzKuN/uMf19ur+ghWglfJ9EYufn9oIeV6p46Xe9vaQ6SYQIeWaHGS4e azje1/Xr0M1MENe2RL4t0aLIcEUGYH5KcyDw35hE9+bT4MOXQDrc+zOvxRyuofvjYl BbZ41QCpi4mag== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 4/6] serial: 8250: move skip_txen_test to core Date: Wed, 19 Nov 2025 10:24:55 +0100 Message-ID: <20251119092457.826789-5-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119092457.826789-1-jirislaby@kernel.org> References: <20251119092457.826789-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 8250_core is the only place where skip_txen_test is used. And platform and core end up in 8250.ko, so there is no change in module name (param prefix). Therefore, move skip_txen_test there and make it local. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/serial/8250/8250.h | 1 - drivers/tty/serial/8250/8250_core.c | 4 ++++ drivers/tty/serial/8250/8250_platform.c | 5 ----- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index 58e64c4e1e3a..d8a726b355d5 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -105,7 +105,6 @@ extern unsigned int nr_uarts; #endif =20 extern unsigned int share_irqs; -extern unsigned int skip_txen_test; =20 #define SERIAL8250_PORT_FLAGS(_base, _irq, _flags) \ { \ diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/= 8250_core.c index bfa421ab3253..0e81f78c6063 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -52,6 +52,10 @@ struct irq_info { static DEFINE_HASHTABLE(irq_lists, IRQ_HASH_BITS); static DEFINE_MUTEX(hash_mutex); /* Used to walk the hash */ =20 +static bool skip_txen_test; +module_param(skip_txen_test, bool, 0644); +MODULE_PARM_DESC(skip_txen_test, "Skip checking for the TXEN bug at init t= ime"); + /* * This is the serial driver's interrupt routine. * diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 38b158ec4725..6f09416d4107 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -29,10 +29,8 @@ * Configuration: * share_irqs: Whether we pass IRQF_SHARED to request_irq(). * This option is unsafe when used on edge-triggered inter= rupts. - * skip_txen_test: Force skip of txen test at init time. */ unsigned int share_irqs =3D SERIAL8250_SHARE_IRQS; -unsigned int skip_txen_test; =20 unsigned int nr_uarts =3D CONFIG_SERIAL_8250_RUNTIME_UARTS; =20 @@ -386,7 +384,4 @@ MODULE_PARM_DESC(share_irqs, "Share IRQs with other non= -8250/16x50 devices (unsa module_param(nr_uarts, uint, 0644); MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODU= LE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")"); =20 -module_param(skip_txen_test, uint, 0644); -MODULE_PARM_DESC(skip_txen_test, "Skip checking for the TXEN bug at init t= ime"); - MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); --=20 2.51.1 From nobody Tue Dec 2 02:19:59 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A87533EB10; Wed, 19 Nov 2025 09:25:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544311; cv=none; b=jKp0xPvYE5SRwpsK6Z+9rmT2CALr19+dQ5rauCJLdl+bfwxXDkdHBgqVSoEkAEs7cL9q4HL4qzkvO3knTbv1APPE4KViRYDIq1HIMgCO39slpxJN309rXl3sYK02IPhf/xwCKyw09tOECVBrF8PB18ClKZm7j+0062+E8pok4ZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544311; c=relaxed/simple; bh=NLb0YGQMrP2Yt0bQsyXsXONWpxEsUuifqfc1ANvBTko=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H88X+Z28aVS4kgWYyDe4HhrmXlu78BGCQF5a3aKSFwnnkjmLiku0yPPUQAxyjCsqp+qhjFuTBaBAEJijs/PCocIFt8zeQKSkcSWWoELVqqoREgJI6bq5CpEif/Sw4Z0P9CwM1ES2cKGG/FaWgc3BuIWyzg/N/R336+KyQ7vRnrM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mVd/yLjG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mVd/yLjG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4E53C4AF11; Wed, 19 Nov 2025 09:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544310; bh=NLb0YGQMrP2Yt0bQsyXsXONWpxEsUuifqfc1ANvBTko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mVd/yLjGJjAEuapPN7EckvTB5WzpNP1tfu5ye3a8stcTd4jfHE7ee41c4fALELZen mTIkceSxzQedQBoY7ZIeqcbEo2Yo6c3dV3G3VPym3rp0kUpSUkvoQdLY4dY1c1ySqF NJbg+s4Feio1WMQgDarX+f7oH15Vx3bgQOdJxe39+8K0s186gFFo6H/RsUGtLJxtCW C/iJiLNllUJqggKwfzMO+qCt3/L4mMxyDrtGUu20DWKjNtCWimTDh2LwKO1/wHvgSu TZmWFwf2m4YNFPHZcOJ2yRePaW4nxtYLLJd7RZ7xNmZBtVfzzoOSTRRAaFCVxTHn61 gPUUUrUJHV8dg== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 5/6] serial: 8250: make share_irqs local to 8250_platform Date: Wed, 19 Nov 2025 10:24:56 +0100 Message-ID: <20251119092457.826789-6-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119092457.826789-1-jirislaby@kernel.org> References: <20251119092457.826789-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" share_irqs is used solely in 8250_platform. Make it local to that file. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/serial/8250/8250.h | 8 -------- drivers/tty/serial/8250/8250_platform.c | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index d8a726b355d5..3cd8614e6339 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -98,14 +98,6 @@ struct serial8250_config { =20 extern unsigned int nr_uarts; =20 -#ifdef CONFIG_SERIAL_8250_SHARE_IRQ -#define SERIAL8250_SHARE_IRQS 1 -#else -#define SERIAL8250_SHARE_IRQS 0 -#endif - -extern unsigned int share_irqs; - #define SERIAL8250_PORT_FLAGS(_base, _irq, _flags) \ { \ .iobase =3D _base, \ diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 6f09416d4107..4c1166a46a1f 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -30,7 +30,7 @@ * share_irqs: Whether we pass IRQF_SHARED to request_irq(). * This option is unsafe when used on edge-triggered inter= rupts. */ -unsigned int share_irqs =3D SERIAL8250_SHARE_IRQS; +static bool share_irqs =3D IS_ENABLED(CONFIG_SERIAL_8250_SHARE_IRQ); =20 unsigned int nr_uarts =3D CONFIG_SERIAL_8250_RUNTIME_UARTS; =20 @@ -378,7 +378,7 @@ module_exit(serial8250_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Generic 8250/16x50 serial platform driver"); =20 -module_param_hw(share_irqs, uint, other, 0644); +module_param_hw(share_irqs, bool, other, 0644); MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices= (unsafe)"); =20 module_param(nr_uarts, uint, 0644); --=20 2.51.1 From nobody Tue Dec 2 02:19:59 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EC9E33F394; Wed, 19 Nov 2025 09:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544313; cv=none; b=T6JobHLfN58y4Zg4LWjCp68e8148q9kz/zrbPDaIjzXFHDCnOJp366yFZhaIJANIi7MLkg8DD6gDvUW0S5iT7l9FKKBO92wJMvXQU+M94ZP0eWhssFr/EfTI7UhtMe2KqetMG802ZjW5/aj9AJr0KDWtt4eDdkrx/RyEhhRz3Us= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763544313; c=relaxed/simple; bh=avsZf4Hby80T8aqUVyWfb3572Q3z7lYinMuQ3rE64bw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MCY5IPP0BBXU/gOJ0RYW9vA7jJAo81pi4bhhPGy6eaAtVjxEKv2dfq3peWd1eLGn2YOQYstsQ9+2S6HVaPgDlI92qw5m7ysUBKdhXoE4mu6lWu+a2eluyvt09LdYm0ngI184jsTCqWPAtrLzGHgrDIx5r11jH4RSzwjOwe+sRWk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gIyMPBcs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gIyMPBcs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A572C4AF12; Wed, 19 Nov 2025 09:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763544312; bh=avsZf4Hby80T8aqUVyWfb3572Q3z7lYinMuQ3rE64bw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gIyMPBcsDbdOhe2ItdWcjNEsB8g1b/4ZrDS7w7K03QD+f0x+U9YN5acQ6yD+xxqUR /2aeU2VWbq65fikwJ+jfy6BFzB86aSYR55R25N+Ulz8DrqLlWczddglthQYN7jSLjW SaAjBZuiXCmimpeegDvA815LCSI+2n5IZk1Qcr7gOzW1Sjtz2o1TM4cNOKAKOgGeYx oT/wLKUWNkp1ilObd1m6ub0X8JgiC18L4tnu8Uih1sj7BJZEOpo258/GM/8BONely6 +BTwlpjPM4MXk5p1wTkf+d/CoUdwnhCYs/LewmoJ3DxGjZ0DgPkBfB8fhESHooFtPP tsRoO8Cai2Zrg== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 6/6] serial: 8250_platform: simplify IRQF_SHARED handling Date: Wed, 19 Nov 2025 10:24:57 +0100 Message-ID: <20251119092457.826789-7-jirislaby@kernel.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251119092457.826789-1-jirislaby@kernel.org> References: <20251119092457.826789-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" IRQF_SHARED is the only flag handled in __serial8250_isa_init_ports() and serial8250_probe_platform(). There is no need to precompute the flags. Instead, initialize port->irqflags directly in the for loop. Note the "if (bool)" is cheap and these are not hot paths anyway. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/serial/8250/8250_platform.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 4c1166a46a1f..af16a36193bf 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -58,7 +58,7 @@ EXPORT_SYMBOL(serial8250_set_isa_configurator); =20 static void __init __serial8250_isa_init_ports(void) { - int i, irqflag =3D 0; + int i; =20 if (nr_uarts > UART_NR) nr_uarts =3D UART_NR; @@ -75,9 +75,6 @@ static void __init __serial8250_isa_init_ports(void) univ8250_port_ops =3D *univ8250_port_base_ops; univ8250_rsa_support(&univ8250_port_ops); =20 - if (share_irqs) - irqflag =3D IRQF_SHARED; - for (i =3D 0; i < ARRAY_SIZE(old_serial_port) && i < nr_uarts; i++) { struct uart_8250_port *up =3D serial8250_get_port(i); struct uart_port *port =3D &up->port; @@ -92,7 +89,9 @@ static void __init __serial8250_isa_init_ports(void) port->iotype =3D old_serial_port[i].io_type; port->regshift =3D old_serial_port[i].iomem_reg_shift; =20 - port->irqflags |=3D irqflag; + if (share_irqs) + port->irqflags |=3D IRQF_SHARED; + if (serial8250_isa_config !=3D NULL) serial8250_isa_config(i, &up->port, &up->capabilities); } @@ -155,15 +154,12 @@ static int serial8250_probe_acpi(struct platform_devi= ce *pdev) =20 static int serial8250_probe_platform(struct platform_device *dev, struct p= lat_serial8250_port *p) { - int ret, i, irqflag =3D 0; + int ret, i; =20 struct uart_8250_port *uart __free(kfree) =3D kzalloc(sizeof(*uart), GFP_= KERNEL); if (!uart) return -ENOMEM; =20 - if (share_irqs) - irqflag =3D IRQF_SHARED; - for (i =3D 0; p && p->flags !=3D 0; p++, i++) { uart->port.iobase =3D p->iobase; uart->port.membase =3D p->membase; @@ -191,7 +187,10 @@ static int serial8250_probe_platform(struct platform_d= evice *dev, struct plat_se uart->port.get_mctrl =3D p->get_mctrl; uart->port.pm =3D p->pm; uart->port.dev =3D &dev->dev; - uart->port.irqflags |=3D irqflag; + + if (share_irqs) + uart->port.irqflags |=3D IRQF_SHARED; + ret =3D serial8250_register_8250_port(uart); if (ret < 0) { dev_err(&dev->dev, "unable to register port at index %d " --=20 2.51.1