From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75883CE7AA0 for ; Thu, 5 Sep 2024 22:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WxCoJ4d7AGkUckvbkcsYkJvEDQd98iS8I6ecIyIUBWQ=; b=4YfVMKxdgGCz0uzZP5NW2YFCVd 29S1uNtzxB68D49D/whpMx01pgiC3J1eh/Yw04uauj6wkQLBFXnE/3dMS6NkU7kVke+mR9neHTax3 aeDzXMtjYixwxytJIirT1gek5iz/XDWUJjzg3w7C0GvbK3+kouKEshWGI47D49JsDPVPSimEScRFy 0aCMiwKBF6p3ytSFR1x/X2KTMTeMBIFzNgswqUTtzO6jat4Al+6/wK/YjSgzRWfK7batMV6Qdxtyq V7dliGuRZ5pGWCT6mRalAyk00x4MXfmGPn49f3etWDDUaVh/AZ55xic+5rIRKpxDo5SMNZY0f8KSw JdxZiKPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smKgQ-00000009yRd-17jX; Thu, 05 Sep 2024 22:10:30 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smKdS-00000009xvZ-2Zay for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 22:07:28 +0000 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2d8815ef6d2so1016877a91.0 for ; Thu, 05 Sep 2024 15:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1725574045; x=1726178845; darn=lists.infradead.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=WxCoJ4d7AGkUckvbkcsYkJvEDQd98iS8I6ecIyIUBWQ=; b=HVdDSKzFaepoS4tOHbyDlV7rVGdHchbvlPhPC+CQMkdnX2o2slA8N8aCM/b159XRaT HznO8VPFBH5kEy0XDzDCyBEaunorqeB321hkVAOk+u66VvfzZS7iihZnjZvxatcckAH9 8w1IUg/3nW3xV3PCYZu65AXKz2q7cN77t7leXYf12Vtp/6VQ+J8NNz5kObWFDmRttKj0 HAIV9quWjFxhvTWpu2cBhY4uAytdchlmSzmJbTz6xYAl8x/uplRxos/HGoBrQIqwS/KT fiqaQVPUgmRv6Ko0GkbabZRy/jbovMXDlW+Ko4NjxBp92qSR6hxQOO2LVyZeu3eDqaql +4yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725574045; x=1726178845; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WxCoJ4d7AGkUckvbkcsYkJvEDQd98iS8I6ecIyIUBWQ=; b=wrCHWEth8dJYPZ3Wi6hX7JwRLPcgrF71mfim7nztSfF/48Z8LQkgB6xq/gg7jNQwbV 1VGqA79TSqaenz/FGkwOcQelXq8v8uIQgkQw6T5X7yR6ERNsMbbXi9/56/zdwr+ACHyv B+6tas4WTt99Z76bzQSMwgNyxwk8Dx/+B6I7OxvN7lMfqyL0AkW3Xpxb6h+K0ALWL4Or BF1cdE3XXKrgwPR5gqIwoqwvqUsrb89+JKacJ23Fu9dAkEeuXDHgq6VUPPYGxlHybfwM o71W6h7FJ0E3cPDXhpOR17XBppearzBilHZMNri+GAnj4ODveEiiADthxyMqV31ieqyz rMgA== X-Forwarded-Encrypted: i=1; AJvYcCXlbDGFmQKZ4Zre36aBvylGgE/As3+Mn+tn4RbeFSfFm8AvirltSs9SiNn4kNTGdXoCJ1UytH1e5xJ7q9WfaoFP@lists.infradead.org X-Gm-Message-State: AOJu0YxoVBHrn/aIjCGYNhJRCpAziMY4PEaVy3alLRazU0+0UArCSrWR DGsKjn+ulOpFdnC7NvfZ9s8UJWqXMFM+w7krvR4e3ddiU3G+yjJOPGV3+odd/G8= X-Google-Smtp-Source: AGHT+IH4wynbAkE58c46Y2j9xwqdI2xq2ZpegRrBUsA7WgnctZ7I/TqzM7iUt/Xmue7/tKSritBwAw== X-Received: by 2002:a17:90a:788e:b0:2da:8e9b:f37b with SMTP id 98e67ed59e1d1-2da8e9bf63amr7752455a91.24.1725574045447; Thu, 05 Sep 2024 15:07:25 -0700 (PDT) Received: from localhost ([71.212.170.185]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d4fbd8538dsm3802879a12.9.2024.09.05.15.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 15:07:24 -0700 (PDT) From: Kevin Hilman To: Ulf Hansson Cc: linux-pm@vger.kernel.org, Nishanth Menon , Vibhore Vardhan , Dhruva Gole , Akashdeep Kaur , Sebin Francis , Markus Schneider-Pargmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/3] pmdomain: ti_sci: collect and send low-power mode constraints In-Reply-To: References: <20240819-lpm-v6-10-constraints-pmdomain-v2-0-461325a6008f@baylibre.com> Date: Thu, 05 Sep 2024 15:07:23 -0700 Message-ID: <7hplphah5w.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_150726_679727_73258671 X-CRM114-Status: GOOD ( 29.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Ulf Hansson writes: > On Tue, 20 Aug 2024 at 02:00, Kevin Hilman wrote: >> >> The latest (10.x) version of the firmware for the PM co-processor (aka >> device manager, or DM) adds support for a "managed" mode, where the DM >> firmware will select the specific low power state which is entered >> when Linux requests a system-wide suspend. >> >> In this mode, the DM will always attempt the deepest low-power state >> available for the SoC. >> >> However, Linux (or OSes running on other cores) may want to constrain >> the DM for certain use cases. For example, the deepest state may have >> a wakeup/resume latency that is too long for certain use cases. Or, >> some wakeup-capable devices may potentially be powered off in deep >> low-power states, but if one of those devices is enabled as a wakeup >> source, it should not be powered off. >> >> These kinds of constraints are are already known in Linux by the use >> of existing APIs such as per-device PM QoS and device wakeup APIs, but >> now we need to communicate these constraints to the DM. >> >> For TI SoCs with TI SCI support, all DM-managed devices will be >> connected to a TI SCI PM domain. So the goal of this series is to use >> the PM domain driver for TI SCI devices to collect constraints, and >> communicate them to the DM via the new TI SCI APIs. >> >> This is all managed by TI SCI PM domain code. No new APIs are needed >> by Linux drivers. Any device that is managed by TI SCI will be >> checked for QoS constraints or wakeup capability and the constraints >> will be collected and sent to the DM. >> >> This series depends on the support for the new TI SCI APIs (v10) and >> was also tested with this series to update 8250_omap serial support >> for AM62x[2]. >> >> [1] https://lore.kernel.org/all/20240801195422.2296347-1-msp@baylibre.com >> [2] https://lore.kernel.org/all/20240807141227.1093006-1-msp@baylibre.com/ >> >> Signed-off-by: Kevin Hilman >> --- >> Changes in v2: >> >> - To simplify this version a bit, drop the pmdomain ->power_off() >> changes. Constraints only sent during ->suspend() path. The pmdomain >> path was an optimization that may be added back later. >> - With the above simplification, drop the extra state variables that >> had been added to keep track of constraint status. >> - Link to v1: https://lore.kernel.org/r/20240805-lpm-v6-10-constraints-pmdomain-v1-0-d186b68ded4c@baylibre.com >> >> --- >> Kevin Hilman (3): >> pmdomain: ti_sci: add per-device latency constraint management >> pmdomain: ti_sci: add wakeup constraint management >> pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups >> >> drivers/pmdomain/ti/ti_sci_pm_domains.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 76 insertions(+) >> --- >> base-commit: ad7eb1b6b92ee0c959a0a6ae846ddadd7a79ea64 >> change-id: 20240802-lpm-v6-10-constraints-pmdomain-f33df5aef449 >> >> Best regards, >> -- >> Kevin Hilman > > Besides a couple of minor things that I have commented on for each > patch, this looks okay to me! > > Taking into account the other series that this depends on, what is the > best merging strategy? Is it safe for me to take it through my > pmdomain tree? That other series should be merged shortly, so I will check with Nishanth (on cc) if he can create an immutable branch/tag that you could use in your tree. It has a build-time dependency on that other series, so I think this is the best way. Alternatively, if you don't expect this to clash with other changes in your tree, with your ack/reviewed-by, Nishanth could merge this series via his tree and we could avoid the cross-tree shuffle. Either way will work. Up to you. Kevin