lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y4RY9XxkK6hHEur4@atomide.com>
Date:   Mon, 28 Nov 2022 08:45:09 +0200
From:   Tony Lindgren <tony@...mide.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Jiri Slaby <jirislaby@...nel.org>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-serial <linux-serial@...r.kernel.org>,
        linux-omap@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] serial: core: Start managing serial controllers
 to enable runtime PM

Hi,

* Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com> [221125 14:02]:
> On Wed, 23 Nov 2022, Tony Lindgren wrote:
> > +	/*
> > +	 * Keep the port device enabled unless autosuspend is supported.
> > +	 * Released on port shutdown.
> > +	 */
> > +	if (!controller->supports_autosuspend) {
> > +		ret = pm_runtime_resume_and_get(dev);
> 
> Should this be done regardless of autosuspend if the port is console?

Well hopefully no need to check anything here for the console unless
enabled state needs to be inherited from the early console.

Note that with what Jiri is proposing, we can just unconditionally do the
pm_runtime_resume_and_get() here on the generic serial port controller
struct device. We can also leave out the tinkering of the serial port
hardware struct device.

The hardware serial port controller drivers that do support autosuspend
can just decrement the runtime PM usage count for the generic serial port
controller child device as needed to enable aggressive PM.

> There's a problem in the current place where this being called from 
> though, uart_console_enabled() doesn't return the correct value with at 
> least some devices this early:
> 
> https://lore.kernel.org/linux-serial/AS8PR04MB84047F39CD10C00CEE29213F92219@AS8PR04MB8404.eurprd04.prod.outlook.com/

OK. Seems the issues with the boot console and early serial port struct
device or whatever might be missing are there even without runtime PM.

Regards,

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ