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]
Date:	Thu, 27 Nov 2014 10:20:03 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Linux PM list <linux-pm@...r.kernel.org>,
	Linux PCI <linux-pci@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Kevin Hilman <khilman@...nel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH 0/4] PM: Use CONFIG_PM instead of CONFIG_PM_RUNTIME in
 core code

On 27 November 2014 at 09:57, Ulf Hansson <ulf.hansson@...aro.org> wrote:
> On 27 November 2014 at 01:37, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
>> Hi,
>>
>> After commit b2b49ccbdd54 "PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
>> selected" (currently in Linux next) CONFIG_PM_RUNTIME is set whenever
>> CONFIG_PM is set, so CONFIG_PM can be used in #ifdefs instead of
>> CONFIG_PM_RUNTIME which simplifies things in quite a few cases.
>>
>> For this reason, the following patches modify some core code to use
>> CONFIG_PM instead of CONFIG_PM_RUNTIME.
>>
>> [1/4] Drop a macro which is redundant after the above commit.
>> [2/4] Use PM instead of PM_RUNTIME in the core device PM code.
>> [3/4] Use PM instead of PM_RUNTIME in the ACPI core.
>> [4/4] Use PM instead of PM_RUNTIME in the PCI core.
>>
>> They build for me for all of the relevant combinations of options (on x86),
>> but more testing (on the other architectures) would be welcome.
>
> I really like the looks of this patchset!
>
> Noticed that you have applied it for your bleeding edge branch, I
> suppose that means you will get some "free" testing in linux-next?
>
> Anyway, I have tested it for ux500 (including the genpd support for
> it, available in linux-next). It works nicely!
>
> I have also tested the two Kconfig options; CONFIG_PM_SLEEP (which
> selects CONFIG_PM_RUNTIME) and for CONFIG_PM_RUNTIME (with
> CONFIG_PM_SLEEP unset).
>
> That brings me to a raise a question; why do we need to keep these two
> configurations options? Couldn't we also have CONFIG_PM_RUNTIME to
> select CONFIG_PM_SLEEP, that will further simplify things?
>

I had look at it. Do you think the below approach could work?

I guess the questions is if there are some configurations that use
CONFIG_PM_RUNTIME but not CONFIG_PM_SLEEP. And if so, should we care?

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 6e7708c..425f83a 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -94,7 +94,6 @@ config PM_STD_PARTITION
 config PM_SLEEP
        def_bool y
        depends on SUSPEND || HIBERNATE_CALLBACKS
-       select PM_RUNTIME

 config PM_SLEEP_SMP
        def_bool y
@@ -131,21 +130,12 @@ config PM_WAKELOCKS_GC
        default y

 config PM_RUNTIME
-       bool "Run-time PM core functionality"
-       ---help---
-         Enable functionality allowing I/O devices to be put into energy-saving
-         (low power) states at run time (or autosuspended) after a specified
-         period of inactivity and woken up in response to a hardware-generated
-         wake-up event or a driver's request.
-
-         Hardware support is generally required for this functionality to work
-         and the bus type drivers of the buses the devices are on are
-         responsible for the actual handling of the autosuspend requests and
-         wake-up events.
+       def_bool y
+       depends on PM_SLEEP

 config PM
        def_bool y
-       depends on PM_SLEEP || PM_RUNTIME
+       depends on PM_SLEEP


Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ