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  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]
Date:   Wed, 25 Oct 2017 14:15:36 +0200
From:   Waldemar Rymarkiewicz <>
To:     Alan Cox <>,
        "Rafael J. Wysocki" <>
Subject: Re: How to power gate a specific single device from outside?

On 25 October 2017 at 01:56, Alan Cox <> wrote:
> For a lot of devices if you close it then it will try and put the device
> into a low power state. If a driver isn't doing that then (unless there
> are hardware constraints preventing it) it would make sense to fix it.
> There are some things entirely in your control - big ones. In particular
> the brightness of laptop panels, pulling everything off one CPU socket,
> disabling the nmi watchdog, hard disk power settings, stopping processes
> that wake up a lot.
> Many of those you can set anyway for best power behaviour (see powertop).

Thanks Alan for your feedback.

This is not really what I'm looking for. I do an embedded design and
need to have more fine-grained control over certain IP blocks inside
the SoC and outside when entering "backup" mode or "selective suspend"
or whatever we call it.

The whole idea is to save maximum power in case of voltage outage on
the main rail to let the system still do some emergency activities
when it's on the backup battery. A simple circuit (or more complex
power switch IC) will discover voltage outage, switch to a
battery-backed rail and will generate an irq to SoC.

Now, what I need in the kernel is to _selectively_ suspend devices
that are not needed in the "backup/emergency" mode.

If current state of the power frameworks for system sleep, runtime pm,
genpd etc. are not able to handle this transition, and as far as I
understand these subsystems they cannot handle this straight away, I
propose to extend with a new power state PM_SUSPEND_EMERGENCY or so to
suspend unnecessary blocks of the system and leave the rest to operate
in emergency mode.

In DT we could specify which devices should go in low power state when
in emergency mode eg.
node {

So the device driver knows if it should be suspended in
PM_SUSPEND_EMERGENCY or not.  The driver has to provide a callback in
pm_ops to handle this transition or we could reuse suspend callback if

Just a brief idea. Does it make sense to anyone?


Powered by blists - more mailing lists