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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2670390.HS4A6M72fu@n95hx1g2>
Date:   Mon, 12 Oct 2020 12:59:34 +0200
From:   Christian Eggers <ceggers@...i.de>
To:     Sascha Hauer <s.hauer@...gutronix.de>
CC:     Mark Brown <broonie@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        <linux-spi@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, Clark Wang <xiaoning.wang@....com>
Subject: Re: [PATCH] spi: imx: Revert "spi: imx: enable runtime pm support"

Hi Sascha,

On Friday, 9 October 2020, 09:39:44 CEST, Sascha Hauer wrote:
> On Fri, Oct 09, 2020 at 06:27:38AM +0200, Christian Eggers wrote:
> > This reverts commit 525c9e5a32bd7951eae3f06d9d077fea51718a6c.
> > 
> > If CONFIG_PM is disabled, the system completely freezes on probe as
> > nothing enables the clock of the SPI peripheral.
> 
> Instead of reverting it, why not just fix it?
> 
> Normally the device should be brought to active state manually in probe
> before pm_runtime takes over, then CONFIG_PM disabled doesn't hurt.
> Using pm_runtime to put the device to active state initially has the
> problem you describe.

prior introducing runtime pm for spi-imx, the clock was "manually" enabled and 
disabled around each transfer (so the power usage should already have been 
optimal). If we would manually enable the clock in probe() as you suggested, 
for users without CONFIG_PM there would be a drawback compared with the 
previous state (as the clock will always be on now).

What is the benefit of controlling the SPI clock with runtime PM instead of 
doing it manually?

As I have no experience with runtime PM, hopefully somebody else can fix (or 
revert) this.

@Clark: I forgot to put you on CC on my initial message. You can find the full 
discussion here:
https://lore.kernel.org/patchwork/patch/1318736/

Best regards
Christian




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ