From patchwork Mon Mar 20 10:19:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 95494 Delivered-To: patches@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1298415obz; Mon, 20 Mar 2017 03:19:39 -0700 (PDT) X-Received: by 10.25.165.7 with SMTP id o7mr6936093lfe.141.1490005178909; Mon, 20 Mar 2017 03:19:38 -0700 (PDT) Return-Path: Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com. [2a00:1450:4010:c07::233]) by mx.google.com with ESMTPS id u69si9030669lfg.246.2017.03.20.03.19.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Mar 2017 03:19:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::233 as permitted sender) client-ip=2a00:1450:4010:c07::233; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::233 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x233.google.com with SMTP id y193so53268205lfd.3 for ; Mon, 20 Mar 2017 03:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5KIZ6nL2aZukKxZne4YS/KyosXE2bZQMD4xvdYsEm4o=; b=c5fFtS9PpUnkkfUO7ey8YA4nSXfqOpsC0mI0WORf2k+gnjX4uZ/bG7VXgmhfUgCo3B 9FBmgXk9dcciRQt6zbXTMogYXCHOTDfZE5eEhdJXY/L8H866ELPk9WBi1dSwbAkUSssp R3yNx1L28UEdkMUwBxEEEHfG6xHQPqlbNNjhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5KIZ6nL2aZukKxZne4YS/KyosXE2bZQMD4xvdYsEm4o=; b=f6o+EwXAOyruQ0WAiVb+rWPtK1gExBxzPEw2gsdpsWBteDE4pmjyK5TpCJfPRS4xQK +nja1OqNG62W1vTu+5mDsC/chQqYGwoHbihc4s5XYSlwDHYbKocQFnIgaCeZX2LCFeBh nY+DnglBPgzrHE309FJ4jqhQetCm1t5uiq7JNyIoVgdH8oxSNIJ+rOSp1Gq6/kTO4RPC FWkRTOMZXwEhq9lPb74HNzHDhe/0pISL+Se24PxpwJqWHEYHRlb9GAYT1piqctUgO/4E CIpcpKBEWwmK390kPRxIySAamcwDygzT7QyCLzgNzsmc5mNRWmPbGhGQzbyyibuQ7zfm 1PSg== X-Gm-Message-State: AFeK/H0sl59DR6lAUTSL5/5RdTrjVAfmiGQ+D+TXLFDzN2vq74i4llyP9Th9gXnCmXl2PhwGrOg= X-Received: by 10.25.211.2 with SMTP id k2mr7960062lfg.61.1490005178536; Mon, 20 Mar 2017 03:19:38 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c5sm223825lfk.51.2017.03.20.03.19.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Mar 2017 03:19:37 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Ulf Hansson , linux-pm@vger.kernel.org Cc: Len Brown , Pavel Machek , Kevin Hilman , Geert Uytterhoeven , Lina Iyer , Jon Hunter , Marek Szyprowski , Viresh Kumar Subject: [PATCH 4/4] PM / Domains: Don't warn about IRQ safe device for an always on PM domain Date: Mon, 20 Mar 2017 11:19:23 +0100 Message-Id: <1490005163-28633-5-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490005163-28633-1-git-send-email-ulf.hansson@linaro.org> References: <1490005163-28633-1-git-send-email-ulf.hansson@linaro.org> When an IRQ safe device is attached to a no sleep domain, genpd prints a warning once, as to indicate it is a suboptimal configuration from power consumption point of view. However the warning doesn't make sense for an always on domain, since it anyway remains powered on. Therefore, let's change to not print the warning for this configuration. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.7.4 Reviewed-by: Viresh Kumar Reviewed-by: Geert Uytterhoeven Reviewed-by: Bartlomiej Zolnierkiewicz diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 8a2bfc8..bfba02f 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -132,8 +132,12 @@ static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev, ret = pm_runtime_is_irq_safe(dev) && !genpd_is_irq_safe(genpd); - /* Warn once if IRQ safe dev in no sleep domain */ - if (ret) + /* + * Warn once if an IRQ safe device is attached to a no sleep domain, as + * to indicate a suboptimal configuration for PM. For an always on + * domain this isn't case, thus don't warn. + */ + if (ret && !genpd_is_always_on(genpd)) dev_warn_once(dev, "PM domain %s will not be powered off\n", genpd->name);