From patchwork Mon Oct 30 07:10:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117449 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp2316322edm; Mon, 30 Oct 2017 00:10:57 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RRbklxBViiVkpXnVAY2sq5JvmDedUTx5OMMZ0fLxPxZLgMDyPi8Og7Z7yzCTaBZrsPcPby X-Received: by 10.98.100.210 with SMTP id y201mr7639188pfb.178.1509347457042; Mon, 30 Oct 2017 00:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509347457; cv=none; d=google.com; s=arc-20160816; b=sd0BuvN8y+AsJRVT63N4a+nebf7sLIfusbOr/Zj2TXNT2YequwuX5NB9ogs0SA2QK0 QR4DXLdo9xvMkC82mJxo4mdyZ0Ey55c7fsXlOaDzWTeF8UbTu3q/kKQwP6Z1kRA/mzlr jivGV+TICuRTp/E56CmbAY+VIastvWiUBOO8trTkH7TTBrfOP/2pdSNen7kRACUq1b1w ZlfMeQD5oMLHILoF70KOLiO50oR51SmdowN9y6+KB605Pj3drOw2CXQnLFh84JUUvurI OKVs1s0v1pJTK/4uIacwB2Obsow41DxMeWhWVC3DlLBOtkcOK2xzlT7FBIqqx4PIQXdD vcWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from:dkim-signature:arc-authentication-results; bh=p9gPOpH8kvvnRjgsCqvu+rJDpRbPlrzXHSLL6zN2+Jo=; b=Gm+nTjLoXMhR2MqZ3qLOJe3CO5pp8AxdK2xlZbavaIjZ4TAak8ws3GSIdnPm6Ay8e0 CcXPSfKlQJHRT7s/Q3vJBkUXtsw/3Nk8XSaFv8RAgsURa2wlr2beNoLBbFf+by1UnK6P AoO8izhQSb5blGWg/LAckd87BaseknHfk4hcaqZAjZ6AVegOX49awm7pK9AJr6RirTvw OqMymIvkOc3u0NK436cr2n/0MMhOSzMxhk3AM7uIcRa7pDWkuLz528URtcpx9f4EKxji MCyBVQp1l18+L5KjgOeTnwX8ooIXKivMK/WHs1yLRFnpKzUVv2Zl+zBKiAvvElsKYQA5 mKEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=T7Na3sAf; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j125si10212585pfg.602.2017.10.30.00.10.56; Mon, 30 Oct 2017 00:10:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=T7Na3sAf; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751474AbdJ3HKy (ORCPT + 11 others); Mon, 30 Oct 2017 03:10:54 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:51458 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbdJ3HKx (ORCPT ); Mon, 30 Oct 2017 03:10:53 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9U7AplE017348; Mon, 30 Oct 2017 02:10:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509347451; bh=AxOfgRLtX643MQqeEDq4dpXFlo7DKrRFFAtIA6v0g3k=; h=From:To:Subject:Date; b=T7Na3sAfsq49uFNHlVLZYhGwaBxemStkt9VpaEr3XT7kG4WedHC0Y4qE7R2MAGCtF /JdieUfERkmhNYngUtFErnhaF5pcazxk/clq+lk+ICCTbIWXaeMv7vpiSkM1+gBDsA g7DTANJfBOzY3y4CXwLGwQgIhmVH53imUm5OU8A4= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9U7ApIo029301; Mon, 30 Oct 2017 02:10:51 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 30 Oct 2017 02:10:50 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 30 Oct 2017 02:10:50 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9U7AnsZ009555; Mon, 30 Oct 2017 02:10:49 -0500 From: Tero Kristo To: , , Subject: [PATCH] PM / QoS: Fix default runtime_pm device resume latency Date: Mon, 30 Oct 2017 09:10:46 +0200 Message-ID: <1509347446-26105-1-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The recent change to the PM QoS framework to introduce a proper no constraint value overlooked to handle the devices which don't implement PM QoS OPS. Runtime PM is one of the more severely impacted subsystems, failing every attempt to runtime suspend a device. This leads into some nasty second level issues like probe failures and increased power consumption among other things. Fix this by adding a proper return value for devices that don't implement PM QoS implicitly. Fixes: 0cc2b4e5a020 ("PM / QoS: Fix device resume latency PM QoS") Signed-off-by: Tero Kristo Cc: Rafael J. Wysocki --- include/linux/pm_qos.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 6737a8c..d68b056 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h @@ -175,7 +175,8 @@ static inline s32 dev_pm_qos_requested_flags(struct device *dev) static inline s32 dev_pm_qos_raw_read_value(struct device *dev) { return IS_ERR_OR_NULL(dev->power.qos) ? - 0 : pm_qos_read_value(&dev->power.qos->resume_latency); + PM_QOS_RESUME_LATENCY_NO_CONSTRAINT : + pm_qos_read_value(&dev->power.qos->resume_latency); } #else static inline enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev,