From patchwork Thu Nov 27 09:20:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5394141 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1AF289F39B for ; Thu, 27 Nov 2014 09:20:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A97F201E4 for ; Thu, 27 Nov 2014 09:20:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51411201C0 for ; Thu, 27 Nov 2014 09:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932203AbaK0JUI (ORCPT ); Thu, 27 Nov 2014 04:20:08 -0500 Received: from mail-qa0-f48.google.com ([209.85.216.48]:53626 "EHLO mail-qa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753920AbaK0JUE (ORCPT ); Thu, 27 Nov 2014 04:20:04 -0500 Received: by mail-qa0-f48.google.com with SMTP id v10so3025315qac.7 for ; Thu, 27 Nov 2014 01:20:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=3okLolgANBvR/SLMqh/DO8frI+JYxYt0vEEhcGU69xw=; b=cVs1e4ZW9RP0IMgaT3n5zW61lkmZR+LCsIDRuefbThJk9/shHu4cUJ64PZDL56cAL6 edK9hPYcywoWPQwHbruNIQTHdSxR1ZU7dPTkMyjq4sNwuVppiD1GT2EV0yHMyEHteW4P SgXKUPpdmB84uyKIQHHRF/gatPDYAl+bxt+yZ/X4V2orQaPUYct98UjZtIlCChkmNl6r yogwr/u5hn/1GFdaHy/ro0k7cmCcFIOOBCyzS0FB3ujZ3XWaQemODlba8FEHseXS5+3D b/iMZ+xeLtSa1AJaU1tf/WlB6s47w3VNwba7u0qzbGkdHvCeSYlvjlp288Kbi9wN2gTK 8PYA== X-Gm-Message-State: ALoCoQm6fNfl0hKoIpPajtUa9+hNC0SBzgtJL6smPwwBzI9Ipf9nbUPQEHx+8hb5G+r3YZUWArUl MIME-Version: 1.0 X-Received: by 10.224.151.134 with SMTP id c6mr36094941qaw.55.1417080003429; Thu, 27 Nov 2014 01:20:03 -0800 (PST) Received: by 10.96.216.199 with HTTP; Thu, 27 Nov 2014 01:20:03 -0800 (PST) In-Reply-To: References: <37310416.jZXoh5nfSC@vostro.rjw.lan> Date: Thu, 27 Nov 2014 10:20:03 +0100 Message-ID: Subject: Re: [PATCH 0/4] PM: Use CONFIG_PM instead of CONFIG_PM_RUNTIME in core code From: Ulf Hansson To: "Rafael J. Wysocki" Cc: Linux PM list , Linux PCI , Linux Kernel Mailing List , ACPI Devel Maling List , Alan Stern , Bjorn Helgaas , Kevin Hilman , Geert Uytterhoeven Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 27 November 2014 at 09:57, Ulf Hansson wrote: > On 27 November 2014 at 01:37, Rafael J. Wysocki 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? Uffe --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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