From patchwork Thu Feb 10 17:58:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 12742272 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 877F7C433F5 for ; Thu, 10 Feb 2022 18:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6aNKxTByR0k1oL0p+mstQZZz40uBk9FKMyN6RPa3OwA=; b=apAfKTMpc5+L3x T94My/I7ySZ2nglCLX1LB8IWA2IvBuUqyADVPmIn3/2X1Fnlg890yDXnsnjccAD168Q/H6yNlcMrl A6S/166fLuK9Be5i0zCRcH/t1GoYz/TocGJO4iJxokjBSDYyQKqNfSD9nOnq5mrSgFLl8pe8fBgAQ sfrM1QZJYKppCElcdRSyAdrm7dl63vy+LDGmq2KNijq6GwS5faH936zKygQ2u28cfT8NNTEdPCsJN xi4WQMv31WYB5t0vkwZ6gr1gQCTRanc78bKiBxGPvAqSglr7MJK29QTL/zSVT+pbNUL2Sx99lSY10 RpqPphGtBxtOGwOLR8dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIDin-004ZFk-5Y; Thu, 10 Feb 2022 17:59:09 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIDii-004Z7O-TK for linux-arm-kernel@lists.infradead.org; Thu, 10 Feb 2022 17:59:07 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 21AHwwXi056699; Thu, 10 Feb 2022 11:58:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1644515939; bh=W2eWwT4upuhk7X3RRCMm34zuY1wDQhxcweXdvMP+xXs=; h=From:To:CC:Subject:Date; b=iPyjIljVZhToZ54m5dqAyQoKPw/SlE5EQXV1KFMAOF2F2HmjUhvS8j/m4zupsm0BG SH8lqjbtjPf+7MqvN3VTD/b2/WHkk+hDNJnUP4omXeUkYJeXyxVVH4ej6qqtuk1Crv SpPqLtKG7lKahOjV/3bLmmdfBYyRCSk0oWPu7PvI= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 21AHwwmR095185 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 10 Feb 2022 11:58:58 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 10 Feb 2022 11:58:58 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Thu, 10 Feb 2022 11:58:58 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 21AHwwOr024273; Thu, 10 Feb 2022 11:58:58 -0600 From: Dave Gerlach To: Nishanth Menon , Tero Kristo , Santosh Shilimkar CC: Dave Gerlach , , , Vignesh Raghavendra Subject: [PATCH 0/1] firmware: ti_sci: Use polled mode of operation during suspend Date: Thu, 10 Feb 2022 11:58:57 -0600 Message-ID: <20220210175858.11247-1-d-gerlach@ti.com> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220210_095905_076238_41A3C679 X-CRM114-Status: GOOD ( 10.83 ) 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 Hi, This series allows the ti_sci driver to be able operate safely in noirq mode. It depends on the ti-msgmgr series here for updates to the ti-msgmgr header [1], and together with that series will stop timeouts that are seen when attempting to suspend platforms using TI SCI. This allows communication with TISCI firmware without the need of interrupts, which is critical during the system suspend path. Currently, the ti_sci_pm_domains genpd driver will communicate with firmware during the noirq phase, so this must be done using a polled communication layer, however it still makes sense to use IRQ mode during normal operation, so continue to support that as well, and only switch to polled mode during low power path. This is accomplished in the ti_sci driver by setting a flag to indicate we are in the suspend path in the system suspend handler that then causes the message handling logic to manually poll the completion used to indicate message response using try_wait_for_completion rather than the original wait_for_completion_timeout, which cannot be used in noirq phase. Regards, Dave [1] https://lore.kernel.org/lkml/20220210041631.26767-1-d-gerlach@ti.com/ Dave Gerlach (1): firmware: ti_sci: Switch transport to polled mode during system suspend drivers/firmware/ti_sci.c | 61 +++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 6 deletions(-)