[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250704075452.3222201-1-sakari.ailus@linux.intel.com>
Date: Fri, 4 Jul 2025 10:54:52 +0300
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Peter Korsgaard <jacmet@...site.dk>,
Michal Simek <michal.simek@....com>,
Kevin Hilman <khilman@...libre.com>,
Markus Schneider-Pargmann <msp@...libre.com>,
John Ogness <john.ogness@...utronix.de>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Sherry Sun <sherry.sun@....com>,
Ingo Molnar <mingo@...nel.org>,
Peng Fan <peng.fan@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Petr Mladek <pmladek@...e.com>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
Nam Cao <namcao@...utronix.de>,
Zack Rusin <zack.rusin@...adcom.com>,
Jinjie Ruan <ruanjinjie@...wei.com>,
Sean Anderson <sean.anderson@...ux.dev>
Cc: linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH 66/80] serial: Remove redundant pm_runtime_mark_last_busy() calls
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
---
The cover letter of the set can be found here
<URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com>.
In brief, this patch depends on PM runtime patches adding marking the last
busy timestamp in autosuspend related functions. The patches are here, on
rc2:
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
pm-runtime-6.17-rc1
drivers/tty/serial/8250/8250_omap.c | 9 ---------
drivers/tty/serial/8250/8250_port.c | 2 --
drivers/tty/serial/fsl_lpuart.c | 1 -
drivers/tty/serial/serial_core.c | 1 -
drivers/tty/serial/uartlite.c | 2 --
drivers/tty/serial/xilinx_uartps.c | 1 -
6 files changed, 16 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 6707f55bdbe7..091afea71b95 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -207,7 +207,6 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
__omap8250_set_mctrl(port, mctrl);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
}
@@ -516,7 +515,6 @@ static void omap_8250_set_termios(struct uart_port *port,
omap8250_restore_regs(up);
uart_port_unlock_irq(&up->port);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
/* calculate wakeup latency constraint */
@@ -554,7 +552,6 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state,
uart_port_unlock_irq(port);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
}
@@ -773,7 +770,6 @@ static int omap_8250_startup(struct uart_port *port)
enable_irq(port->irq);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
return 0;
}
@@ -811,7 +807,6 @@ static void omap_8250_shutdown(struct uart_port *port)
serial_out(up, UART_LCR, up->lcr & ~UART_LCR_SBC);
serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
}
@@ -827,7 +822,6 @@ static void omap_8250_throttle(struct uart_port *port)
priv->throttled = true;
uart_port_unlock_irqrestore(port, flags);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
}
@@ -848,7 +842,6 @@ static void omap_8250_unthrottle(struct uart_port *port)
serial_out(up, UART_IER, up->ier);
uart_port_unlock_irqrestore(port, flags);
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
}
@@ -1594,7 +1587,6 @@ static int omap8250_probe(struct platform_device *pdev)
goto err;
}
priv->line = ret;
- pm_runtime_mark_last_busy(&pdev->dev);
pm_runtime_put_autosuspend(&pdev->dev);
return 0;
err:
@@ -1682,7 +1674,6 @@ static int omap8250_resume(struct device *dev)
serial8250_resume_port(priv->line);
/* Paired with pm_runtime_resume_and_get() in omap8250_suspend() */
- pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
return 0;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 7eddcab318b4..22ad70117c44 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -519,7 +519,6 @@ static void serial8250_rpm_put(struct uart_8250_port *p)
{
if (!(p->capabilities & UART_CAP_RPM))
return;
- pm_runtime_mark_last_busy(p->port.dev);
pm_runtime_put_autosuspend(p->port.dev);
}
@@ -659,7 +658,6 @@ static void serial8250_rpm_put_tx(struct uart_8250_port *p)
rpm_active = xchg(&p->rpm_tx_active, 0);
if (!rpm_active)
return;
- pm_runtime_mark_last_busy(p->port.dev);
pm_runtime_put_autosuspend(p->port.dev);
}
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index c9519e649e82..79050a42cd1b 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -825,7 +825,6 @@ lpuart_uart_pm(struct uart_port *port, unsigned int state, unsigned int oldstate
{
switch (state) {
case UART_PM_STATE_OFF:
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
break;
default:
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 86d404d649a3..f9fc9afcd845 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -159,7 +159,6 @@ static void __uart_start(struct uart_state *state)
*/
if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev))
port->ops->start_tx(port);
- pm_runtime_mark_last_busy(&port_dev->dev);
pm_runtime_put_autosuspend(&port_dev->dev);
}
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 39c1fd1ff9ce..c21cd5f5be27 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -422,7 +422,6 @@ static void ulite_pm(struct uart_port *port, unsigned int state,
if (ret < 0)
dev_err(port->dev, "Failed to enable clocks\n");
} else {
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
}
}
@@ -882,7 +881,6 @@ static int ulite_probe(struct platform_device *pdev)
ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
- pm_runtime_mark_last_busy(&pdev->dev);
pm_runtime_put_autosuspend(&pdev->dev);
return ret;
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index fe457bf1e15b..36afa2a8f158 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1240,7 +1240,6 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
{
switch (state) {
case UART_PM_STATE_OFF:
- pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
break;
default:
--
2.39.5
Powered by blists - more mailing lists