From patchwork Fri Oct 21 11:34:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9388739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C33E8607D0 for ; Fri, 21 Oct 2016 11:35:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4D4A2A0E8 for ; Fri, 21 Oct 2016 11:35:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A602A2A0EB; Fri, 21 Oct 2016 11:35:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 556762A0EA for ; Fri, 21 Oct 2016 11:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754995AbcJULfD (ORCPT ); Fri, 21 Oct 2016 07:35:03 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:51424 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754943AbcJULfC (ORCPT ); Fri, 21 Oct 2016 07:35:02 -0400 Received: from ayla.of.borg ([84.193.137.253]) by laurent.telenet-ops.be with bizsmtp id yBaw1t00R5UCtCs01BawQn; Fri, 21 Oct 2016 13:34:58 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1bxY6C-0001Fy-P5; Fri, 21 Oct 2016 13:34:56 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1bxY6H-0007Aw-6c; Fri, 21 Oct 2016 13:35:01 +0200 From: Geert Uytterhoeven To: "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas Cc: Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] PM / Domains: Restrict "samsung, power-domain" checks to ARCH_EXYNOS Date: Fri, 21 Oct 2016 13:34:16 +0200 Message-Id: <1477049656-27535-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the generic PM Domain code code checks for the presence of both (generic) "power-domains" and (Samsung Exynos legacy) "samsung,power-domain" properties in all device tree nodes representing devices. There are two issues with this: 1. This imposes a small boot-time penalty on all platforms using DT, 2. Platform-specific checks do not really belong in core framework code. While moving the check from platform-agnostic code to Samsung-specific code is non-trivial, the runtime overhead can be restricted to kernels including support for 32-bit Samsung Exynos platforms. Signed-off-by: Geert Uytterhoeven --- "samsung,power-domain" was only ever used in: - arch/arm/boot/dts/exynos4415.dtsi: Unused? - arch/arm/boot/dts/exynos3250.dtsi: CONFIG_ARCH_EXYNOS3 - arch/arm/boot/dts/exynos4.dtsi: CONFIG_ARCH_EXYNOS4 - arch/arm/boot/dts/exynos4x12.dtsi: CONFIG_ARCH_EXYNOS4 exynos4212.dtsi is unused? - arch/arm/boot/dts/exynos5250.dtsi: CONFIG_ARCH_EXYNOS5 - arch/arm/boot/dts/exynos5420.dtsi: CONFIG_ARCH_EXYNOS5 --- drivers/base/power/domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e023066e421547c5..d94d6a4b9b527108 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1853,7 +1853,8 @@ int genpd_dev_pm_attach(struct device *dev) ret = of_parse_phandle_with_args(dev->of_node, "power-domains", "#power-domain-cells", 0, &pd_args); if (ret < 0) { - if (ret != -ENOENT) + if (ret != -ENOENT || !IS_ENABLED(CONFIG_ARCH_EXYNOS) || + IS_ENABLED(CONFIG_64BIT)) return ret; /*