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: 41606 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5D2972486D for ; Thu, 27 Nov 2014 09:20:14 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf2919874eek.9 for ; Thu, 27 Nov 2014 01:20:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=NOXBzYowESgQqawBFyqixGXQ9+UDzcjIBmDhf/g/zss=; b=mwN/ojOMiwtlajJ7Px/PBYMI9bEWrr6EHlj9gBcaMX1c9iY8tAykB3D9RDYltcu6Nb Jyig7ZT4qo0hPgmPFvpKvWhNA8DrHHNpAZYq1ogubO0ZsJoVSQJ4uBZgM4oPRlVzFThW h+IBkd3j/isFFMa/8k0Q0MDe01gV6uisHjgsAdyM6hIATWaddoTug5ZTLOXAJ4z7+xaf cjvoQRyUn3AR4Iuev2DqkvoufabcZj5BX0d7UCSRJF9r0Vgevx2hSDwogPTGGqE5EoVp ozPB/7DUgsf40HVF7nchnHqskjxrJsz5WDGfs1/KvPCxA3Vz5H8Ba4nxoBgcJHc8eesI s6tw== X-Gm-Message-State: ALoCoQnmsH3+7aGj5iTczZAMQRtSkOaUzdoVlsankPF2DEwskIcTDQfyB73Vl23cJqjTXCca+ynn X-Received: by 10.152.26.72 with SMTP id j8mr10380005lag.3.1417080013590; Thu, 27 Nov 2014 01:20:13 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.40 with SMTP id n8ls494405laj.73.gmail; Thu, 27 Nov 2014 01:20:13 -0800 (PST) X-Received: by 10.112.63.133 with SMTP id g5mr37997106lbs.33.1417080013149; Thu, 27 Nov 2014 01:20:13 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id uj9si6677134lbb.97.2014.11.27.01.20.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Nov 2014 01:20:13 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so3865630lbi.15 for ; Thu, 27 Nov 2014 01:20:13 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr37593891lbo.32.1417080013006; Thu, 27 Nov 2014 01:20:13 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp769114lbc; Thu, 27 Nov 2014 01:20:11 -0800 (PST) X-Received: by 10.68.216.65 with SMTP id oo1mr40100215pbc.105.1417080011085; Thu, 27 Nov 2014 01:20:11 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sg6si10650991pbc.95.2014.11.27.01.20.09 for ; Thu, 27 Nov 2014 01:20:11 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755248AbaK0JUH (ORCPT + 12 others); Thu, 27 Nov 2014 04:20:07 -0500 Received: from mail-qg0-f42.google.com ([209.85.192.42]:43457 "EHLO mail-qg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755094AbaK0JUE (ORCPT ); Thu, 27 Nov 2014 04:20:04 -0500 Received: by mail-qg0-f42.google.com with SMTP id z107so3289594qgd.15 for ; Thu, 27 Nov 2014 01:20:03 -0800 (PST) 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-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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-pm" 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