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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230314133810.GM7501@atomide.com>
Date:   Tue, 14 Mar 2023 15:38:10 +0200
From:   Tony Lindgren <tony@...mide.com>
To:     Andy Shevchenko <andriy.shevchenko@...el.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH v7 1/1] serial: core: Start managing serial controllers
 to enable runtime PM

* Andy Shevchenko <andriy.shevchenko@...el.com> [230314 13:25]:
> On Tue, Mar 14, 2023 at 09:35:59AM +0200, Tony Lindgren wrote:
> > +	/* Increment the runtime PM usage count for the active check below */
> > +	err = pm_runtime_get(port_dev);
> 
> The question here is why don't we need to actually turn on the device immediately
> (sync) if it's not already powered?

Doing it would require the use of pm_runtime_irq_safe() at least currently.

> > +	if (err < 0) {
> > +		pm_runtime_put_noidle(port_dev);
> > +		return;
> > +	}
> 
> > +	/*
> > +	 * Start TX if enabled, and kick runtime PM. Otherwise we must
> > +	 * wait for a retry. See also serial_port.c for runtime PM
> > +	 * autosuspend timeout.
> > +	 */
> 
> I.o.w. does the start_tx() require device to be powered on at this point?

Yes. And if the device is not enabled, serial_port.c runtime_resume()
calls this function again after the hardware is enabled.

> > +	if (pm_runtime_active(port_dev))
> >  		port->ops->start_tx(port);
> > +	pm_runtime_mark_last_busy(port_dev);
> > +	pm_runtime_put_autosuspend(port_dev);

For your other comments, I'll take a look thanks.

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ