From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C842B60A260B for ; Fri, 30 Oct 2026 10:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zc8WuXMB; dkim=pass (2048-bit key, unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector2 header.b=aoNVylxW 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-Transfer-Encoding: Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=FQP0HllwggutWWw9yH8MpVuIDMg8fVliSf9COtrhg+Y=; b=zc8WuXMB+z0teb saEtkDJmrDfRaXhWfzG2/CouGbOs8xlCXerk9uqqTPK1MuUwhhr9WJQpJYKoqNJfQuoJTTnXRsN4U 9FkT4LEsaootjJwEPJ89eTXOVlY1ReiLwhZEvVw/2kPi1wmA1OmzQl54uQSs3Fe4oiCxeradvApwt CDd6VKZ0PJsOmoMIDcFWPUigYo3E1HKZGk/EyHPXmayPkEl5bEfyMfWnfCCbrVD9gv/4+oBeH3mZu VoIkheAlAsk4nCc9x696O1+BdmnarS6ujgTOwPQ4NMZXgLzyHJz/WUy1s7weTpNNOI5TMoCLfScwF MeswEQodlT291jB2tjLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xMjTn-0000000BLlW-27Qa; Fri, 30 Oct 2026 10:04:59 +0000 Received: from mail-norwayeastazlp170130007.outbound.protection.outlook.com ([2a01:111:f403:c20f::7] helo=OSPPR02CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xMjTl-0000000BLkq-2fIf for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2026 10:04:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aqtf6UxB5puSZO8AbG30r11IQU0ZLoiBCSQ0qJYFJs75ARbuq4D7mfJJSvSr0EikTJr6Tj9TVSTirzJm4Pz13Z3iXvaCrq1LW1EeMIzMkr1lrhMOBxvZC0vpDmBZU1hQgd0YK74ZweqFR4q2nQb/2Wj3SmEBaBYthnUG6KkGDSDdCp4BNks3dBXy7O5JY8ZV+yL5E71vcXnloC5kmHb6XyWaEMiuBV0m3dVFPgeUHGxVLgL9HsdyNRmwnrYL9Zgzw4fP+3QIKrzWvW6tlcON0A3PH4ukKeFno1RSHFj1O/xyS46T9ldYCU9L9U9Jml3/NskizItir03N2beF4P6IxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FQP0HllwggutWWw9yH8MpVuIDMg8fVliSf9COtrhg+Y=; b=fN/7v9hYGmUCP/g6wcSlAA+KtAJ5Cd3OUn7fkE17C8DsavH8neh0x5AE8C/GMmMeDf3C7O9HcCrzCfsPkh6x++eSQ0ZZFgsFwEjYaszrV0Cmbg9XukEHTjWnwMRf92SXLNCnKNsIaZc0/Y1+gUWzmbx04fJWMYg8bZmUJYdYXvVCM4NBYD48VBCqGD67RUKThQRN30LzJ9JSuP79uvqW/lupqckQ1g5R+0wNTKxImGCy+ZNtnBbpVSkBtyg2+f4Vm8gEr7e9Qc903BdB6oSDgvz8rLe8aWfzcPEITTJ2wcr+qRejPwvxeykawp9wO6kJyOoSSR0tdn2d/zXCk3GaLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 164.130.1.60) smtp.rcpttodomain=kernel.org smtp.mailfrom=foss.st.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=foss.st.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FQP0HllwggutWWw9yH8MpVuIDMg8fVliSf9COtrhg+Y=; b=aoNVylxW19lwD5pniBF2z7r9ZT1yxEMQw/eJGl6BRbJcLOLGO2vH8SHgdJCZVd5jKjbHGxKqmNwE2hmi5W8vQLT2ZNQ0Lc9jHFuYvxqjyT/WSjtvlu1lnXlNf4p/TdIoFs8oFR0Dx5rZ1r4REcI9LqheacuIeIAFdE/5Syhs4gihBzMj08TQ3bqq4lmE0WWTIKa27NAlpQLztnctPJC2iZr7JLYzj1UcXMxl2K/ikI9tUUWqOpgCQN714P6Ftb3UfGoU3SYZ2DcA4fGmIkEiVYst3ZRUJqzov9LwWK4CMDEwJx+PAo3tsYsyL+ApBebScYBVMo018Ju9WKyS4rdlww== Received: from AS9PR06CA0083.eurprd06.prod.outlook.com (2603:10a6:20b:464::27) by BR2PR10MB992260.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:2c8:1d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.592.5; Fri, 30 Oct 2026 10:04:52 +0000 Received: from AM2PEPF00070CF7.eurprd02.prod.outlook.com (2603:10a6:20b:464:cafe::28) by AS9PR06CA0083.outlook.office365.com (2603:10a6:20b:464::27) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.569.9 via Frontend Transport; Fri, 30 Oct 2026 10:04:52 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=fail (sender IP is 164.130.1.60) smtp.mailfrom=foss.st.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=foss.st.com; Received-SPF: Fail (protection.outlook.com: domain of foss.st.com does not designate 164.130.1.60 as permitted sender) receiver=protection.outlook.com; client-ip=164.130.1.60; helo=smtpO365.st.com; Received: from smtpO365.st.com (164.130.1.60) by AM2PEPF00070CF7.mail.protection.outlook.com (10.167.242.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.569.4 via Frontend Transport; Fri, 30 Oct 2026 10:04:52 +0000 Received: from STKDAG1NODE2.st.com (10.75.128.133) by smtpO365.st.com (10.250.44.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Fri, 30 Oct 2026 11:05:33 +0100 Received: from [10.48.87.100] (10.48.87.100) by STKDAG1NODE2.st.com (10.75.128.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.46; Fri, 30 Oct 2026 11:04:50 +0100 Message-ID: <4690f55f-dc13-4e43-82f9-d508253f6c64@foss.st.com> Date: Fri, 30 Oct 2026 11:04:51 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] firmware: psci: handle unsupported SET_SUSPEND_MODE in PC mode To: Sudeep Holla CC: Mark Rutland , Lorenzo Pieralisi , Ulf Hansson , , Linux STM32 , , References: <20261029191624.1.I5f8f3d75a566b72250d629ac6f43cf0d387c0218@changeid> <20261030-origami-tarantula-of-contentment-a70ab2@sudeepholla> Content-Language: en-US From: Patrick DELAUNAY In-Reply-To: <20261030-origami-tarantula-of-contentment-a70ab2@sudeepholla> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: STKCAS1NODE1.st.com (10.75.128.134) To STKDAG1NODE2.st.com (10.75.128.133) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF00070CF7:EE_|BR2PR10MB992260:EE_ X-MS-Office365-Filtering-Correlation-Id: ee2dca98-9b72-43a8-097b-08df366d3da7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|36860700016|376014|23010399003|10067099003|4143699003|11063799006|6133799003|261009223027099003|261028144727099003|261022105027099003|261022075727099003|261021123027099003|261021121427099003|56012099006|261026121527099003|261026140227099003|18092099006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: FUkkZ2jSrfnrYjMhMrRpWkyKgS0RSmuNoHUqaL6agixlfV/NiZpbmOtXUiQjlAYoCDm0oWjN1oI6vFOL6Emueb6MyazSonOHqpXo9ZBAUMMGHKooRZNliqxWrO9gJUikVSOhJc/PnjKDwXojsm4Ne5BvEl+6PBjf2HQVmhoqQxmU+sN8XiR8piH+kQcixiZ9IH3Sj/ECsS2dvP2KffLl1O1Fj5a1ZW98Gg16mcmYClbEn+kYziYP7UPtqggSToIqEiu7EYBO5eefvZ45SKlC5OG6vluCAhTo6NiZN1uHr1nXYabGtDXySRyQfRpEtwLMkK28Ui1tr5aIIg7MrvGNtpWvULYurQwnwg/TyiPHPn0KDJxRVQbljok5duhpP74B33BBjUSqkXVDKrrVfSyr5e8HF7rlPRK2gGWqXlequibFpnmDKqQf2L4JEW0QGT5u6Gd4lTLQeLs8vMTm6ShtNbJ29wdFOyA6wTM5BW0TuNw3ftW+HXi2j4rXVGf9n9xBOe/8P5EXAi7qGW77/Hdmfy38yBfrbNRiNXnU1QE/foTf5tYw45zyfu2LOyzkEyzE8uz5vDKBrpjDNSBql+PYFhntQIYysxF+SI0MG1nrYrLBZRWgsjle76lGY1jNQ1QqfniOdPYGoZOqXl/tpvZlsK7iEuz4vQt3yVuGmfCnFg2GmUttppJnJDSbgQESmQ7U/3yHVJkmDER2XEeih3Cv1Q== X-Forefront-Antispam-Report: CIP:164.130.1.60;CTRY:IT;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:smtpO365.st.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(36860700016)(376014)(23010399003)(10067099003)(4143699003)(11063799006)(6133799003)(261009223027099003)(261028144727099003)(261022105027099003)(261022075727099003)(261021123027099003)(261021121427099003)(56012099006)(261026121527099003)(261026140227099003)(18092099006)(22082099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JhDvJAOxt/OZ7Zvx9OTbHgxPbB+yC6dgu5UllP3zQyVWDJRfuhdDWLg4glSwZY2T2JqCq5hqWQ5tRUWA1WNPLHgfXfgGkV9y4az98y0E/3S+l/3xWpvYEXuT/3XZK6fBTxVZrm1kg0avc9r+YohB5X2+7nIbsrZiZMbJVKrWMBT4iqrSQ3gO6FWkK0vCHT4xPtjRxNioR085dfhzc5nVW5D1WLkKTvTW4Q7Bq1PdmdGKRAeumQcRW4/n0VQ5VXDZY/k8UD3vupNQsymV3iowYUueedqQQtGvAwvbFX+r1piGifwPnb3akedA0xu0d7ZaM0KU8MTLWYGJA+ZOfe2VmxrXIPmgArAFBVtJIoGRIHfv69NOtKRrI57YuzABviszsdgTG/s8HzE+ldfD20LV9u/SzjHnndYv0blIxchryZMMpATmR9bCzrtppRFj2BDv X-OriginatorOrg: foss.st.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2026 10:04:52.2807 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee2dca98-9b72-43a8-097b-08df366d3da7 X-MS-Exchange-CrossTenant-Id: 75e027c9-20d5-47d5-b82f-77d7cd041e8f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=75e027c9-20d5-47d5-b82f-77d7cd041e8f;Ip=[164.130.1.60];Helo=[smtpO365.st.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF00070CF7.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BR2PR10MB992260 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261030_030457_791559_65E27099 X-CRM114-Status: GOOD ( 19.62 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-7.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, On 10/30/26 09:32, Sudeep Holla wrote: > On Thu, Oct 29, 2026 at 07:16:25PM +0100, Patrick Delaunay wrote: >> The PSCI specification makes PSCI_SET_SUSPEND_MODE optional. If it >> returns NOT_SUPPORTED when Linux requests platform-coordinated (PC) >> mode, Linux can assume that PC mode is in effect. Treat this response >> as success so PSCI power-domain providers can initialize when firmware >> does not support OS-initiated (OSI) mode. >> >> Continue to report an error when OSI mode is requested but >> SET_SUSPEND_MODE is not supported. >> > So, your platform advertises the presence/support for OSI mode and yet > opted for not implementing SET_SUSPEND_MODE ? If so, it is indeed a > firmware bug as reported. > I think it is no realy a platform bug but a too strict management in Linux kernel, for PSCI power domain. The OSI mode is not yet supported by the STM32MP25 platform in Linux at upstream but I introduce PSCI domains in device tree (but without idle power domain) just to prepare this activation in next steps. As the PSCI support is not activated in Firmware (TF-A BL31), the firmware correctly expose its capacities (PSCI_OS_INIT_MODE =0) => PSCI feature indicate that OSI is not supported (FF_SUPPORTS_OS_INIT_MODE = 0) => PSCI_SET_SUSPEND_MODE function is not supported (optional when OSI is not supported) in Linux side, the power domain driver (drivers/cpuidle/cpuidle-psci-domain.c) correctly check the support of OSI:     bool use_osi = psci_has_osi_support(); in STM32MP25 platform use_osi = false, so the driver request Plafrom Cooordinated mode (PC mode) as expected But here  the GENPD driver try to use optional function to set mode:     /* let's try to enable OSI. */     ret = psci_set_osi_mode(use_osi);     if (ret)         goto remove_pd; And the problem occurs here because the optional function is called but the normal use case is not handled (OSI mode not supported / PSCI_SET_SUSPEND_MODE not supported) With the proposed patch, the Linux kernel can have PSCI domain in device tree even when PSCI OSI support is deactivated in PSCI firmware (or not yet activated): the domain are always ON (GENPD_FLAG_ALWAYS_ON) NB: I hesitate between the current patch and a patch in PSCI power domain driver:     /* let's try to enable OSI. */     ret = psci_set_osi_mode(use_osi); + if (ret == -EOPNOTSUPP && !use_osi) +    ret = 0;     if (ret)         goto remove_pd; but I patch PSCI firmware driver because I think it is a more generic place to handle optional PSCI function. Regards Patrick