From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Hansson Subject: [PATCH 0/4] PM / Domains: Fix race conditions during boot Date: Tue, 30 Sep 2014 14:43:49 +0200 Message-ID: <1412081033-8136-1-git-send-email-ulf.hansson@linaro.org> Return-path: Received: from mail-la0-f43.google.com ([209.85.215.43]:37090 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751044AbaI3MoG (ORCPT ); Tue, 30 Sep 2014 08:44:06 -0400 Received: by mail-la0-f43.google.com with SMTP id gb8so10293165lab.2 for ; Tue, 30 Sep 2014 05:44:01 -0700 (PDT) Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Cc: Geert Uytterhoeven , Kevin Hilman , Tomasz Figa , Philipp Zabel , Russell King , Mark Brown , Wolfram Sang , Greg Kroah-Hartman , Dmitry Torokhov , Jack Dai , Jinkun Hong , Ulf Hansson When there are more than one device in a PM domain these will obviously be probed at different times. Depending on timing and the implemented support for runtime PM in a driver/subsystem, genpd may be advised to power off a PM domain after a successful probe sequence. Ideally we should have relied on the driver/subsystem, through runtime PM, to bring their device's PM domain into powered state prior doing probing if such requirement exist. Since this is not a common practice by drivers/subsystems, enforcing such a change doesn't seem viable. Instead, let's improve the situation, by preventing genpd from powering off any of the PM domains until late_init. At that point genpd already tries to power off unused PM domains, so it seems like a decent match. Cases which can't be covered within the window of until late_init needs to be adressed separately and likely through a more common long term solution. Ulf Hansson (4): PM / Domains: Remove pm_genpd_dev_need_restore() API ARM: exynos: Ensure PM domains are powered at initialization PM / Domains: Expect PM domains being powered at initialization PM / Domains: Enforce PM domains to stay powered during boot arch/arm/mach-exynos/pm_domains.c | 7 ++++--- arch/arm/mach-s3c64xx/pm.c | 4 ++-- arch/arm/mach-shmobile/pm-r8a7779.c | 2 +- arch/arm/mach-shmobile/pm-rmobile.c | 2 +- drivers/base/power/domain.c | 42 ++++++++++++++++--------------------- include/linux/pm_domain.h | 7 +++---- 6 files changed, 29 insertions(+), 35 deletions(-) -- 1.9.1