From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F36F4CA29F for ; Thu, 23 Jul 2026 13:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784813510; cv=none; b=EGdaoJBEw3k/9KbbzxsMIdhaFUBUE/WqaxnI+hQaXr+SwQmKBdshGwS3rnJU8QjD8B7RyDd7/xo126gLU+jx50Dnt+AtrsrrIpZZDHbLMhsR2MNxJnu6AU0HvngVFhEJuMfmvKiqYclnx/hHc308pVbIgr6GMzMCV1aiXInlhgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784813510; c=relaxed/simple; bh=9Ol8B4QWV5NXBRf+nSnnc5gyMNdZdIH5zliFKFF7tIs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cgF0feBgXzr0IUWrbnuRcS58FiM/vxV/G4jJmferNTpikIGH0mNF7PIG9I4gJtiPpyZU0pbtbri4QbhPBkc1DqszU5OIax4/fguquTzzg9Aj325xeRw0t/tkb5Qug0wOHMzSbP6tviNo1VWQHOgLPFR3zt31eyR1m9O45QFklfA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=CkUoIIZB; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FLgZgZA5; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="CkUoIIZB"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FLgZgZA5" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66NCvgpw020908 for ; Thu, 23 Jul 2026 13:31:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tKQ0B+W9pZMhr76PdrHF4/xp6Zw+LCJpnEkdrdNCyFk=; b=CkUoIIZBgBJvbNtb 9q7x5RirhZImdElF4zMeucB1GtvkPl751AgbDCA4CXbBU81JlkTyfN8OvupqcuHV KCm5mUsG7Sn+DXqt5d8lfUVcJ/IdtZowPp1fzHFnc+j3ab59xnlfZKceQwi4f0U+ AG0EtKBoSEbRf7SzFWWlOwYmCJOWgzf+J5FgLWwXROuxJHU4Mkskue1dhxKLSWj0 J1b1u0ZGPNwmLfzTqh055ibbWX4u+O4f8fGYMM+xcok4jb16YJQHqwYdiqDwePWn 9IRrkMij2odOAlBNGE4VWdFN/XHurqaBFu7/gSCBXmaQD7MKMjP4UzRQPBH3ml09 PwmojA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fk6c7k8vf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Jul 2026 13:31:45 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2cf1c86963bso5100525ad.0 for ; Thu, 23 Jul 2026 06:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784813505; x=1785418305; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tKQ0B+W9pZMhr76PdrHF4/xp6Zw+LCJpnEkdrdNCyFk=; b=FLgZgZA5n0DXr7JyrGxax9AKdDdT5XqjJn35GKqMOetI6BoesdUA8Kh8STdgxoUgmR Pr5DQXYuOIs+M8NQiDjLtQReBCsQ4g78WN5XUlWMiZAo2CA+JLcSqWAx0VCNq3DCisf3 fI75nImwxtTv5ZtoQ9PthI+9RMIjKaMcfNL+6fQB9uywgNALksqrHClDp0O3cRKh6pUp I3KLI8yqXAdS4fH0zGY/KEgboVcV5fFbU5iw87OhZtDL8RNKmX/K/Wrk0cXCj5K4FpoT lBN7TbmZYXANihcxkhTV6AtDs8MQRWoN4MBJoo2kiLnGUcPXsP+GGD1RxeCFwrQj6fxT 6wUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784813505; x=1785418305; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tKQ0B+W9pZMhr76PdrHF4/xp6Zw+LCJpnEkdrdNCyFk=; b=hgHKJtlyhnkJSh3Lq5ButAzh4VGJNS5qBmzdvFTmNJ3Nno4BSq2vqWzFE/AYk7fsSL rf1cyCHRf4t6e0gwMyHpE0HeAQLyd78xpOejl7sG3PoN7Xzl4xuhnT0k+CR9YBbswjPn oXkR8k5RdDxy/bMOEwWeh4Dr745uAwHEAlIy2ocP9d2hlLDhcbUktH6nyk6bxmxLP6ZW yettCwMuXWQfF8gQ4lMzCPjtU1xNnJ81k92sP609avCxScyMjatdEIfvRDKprs/rjqCt txle5ViYMpkrkfCHGP+sbsONyBPEMjmTrEPf3n4QYsq1tllbJ0+zrxpHtIfImvnT5mGx yIHA== X-Forwarded-Encrypted: i=1; AHgh+RpwDNY7bZlXBj91V8HEJOtVPpcCuYWLZ3btvXFQx1RpEwGsJnZUNC+6YtYbXenG8pLxPE9yEqlNzaAAp9c=@vger.kernel.org X-Gm-Message-State: AOJu0YzjUEudS9fgEwKCuDiYRSOel7xkKDyqGETDe3mtFo6JpEw/cLId nupROQlzgrD23DCLdB+D/95WT1SYKiIVQ5ZdP8Ia0rAQvkxNwpD85HCrUnaUa9zNhhgOvS747UG 7lm9Oderx0gQm0m64//MyOAID5HWKQm6XFKY6BpQ/cMAYpzp0TvJamH8VJVfYW6INDwY= X-Gm-Gg: AR+sD11fF7BIwMLRZ8/9Sd6A8Oah9ysaKbPO2MjvGmofg8LeY34DiNQLnNuyvoWckOc FVKZLcFLuI8d7dt1qD5kU1XrTt9DPOhaPf9z3SxibMVy7hTa/VFgx/cReBbvBK2rGS+hUQ5+n+G 4WWcjLLhuFlpi8BgIPItDPyVgbNYxk4F4uhWHNLhJh/r09XRWg/9arlK1UCHax4kqhxt21WBvLn YoNVcAlLBbbhFPLVbWqz3UKA6oBLP79j7rRVvJZ8adkAyLBm6EObXBGwpZAaOmh5fIpa6cReiz6 XhiRcFTbVui/mD3ewmOdF6lkPYrb3tshvzM7/rJQJu21tNbQJWlHljFqCCXUtnw5BgT75TezZ7Q YxT27HD/q4gXKA4EZqLC9/0kptFG1X3sQTxw= X-Received: by 2002:a17:902:fc84:b0:2cf:461a:3863 with SMTP id d9443c01a7336-2cfa95512a5mr29173635ad.22.1784813504621; Thu, 23 Jul 2026 06:31:44 -0700 (PDT) X-Received: by 2002:a17:902:fc84:b0:2cf:461a:3863 with SMTP id d9443c01a7336-2cfa95512a5mr29172995ad.22.1784813504114; Thu, 23 Jul 2026 06:31:44 -0700 (PDT) Received: from [10.219.57.229] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cf8f2e7a83sm34671765ad.42.2026.07.23.06.31.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jul 2026 06:31:43 -0700 (PDT) Message-ID: Date: Thu, 23 Jul 2026 19:01:33 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v23 07/13] power: reset: Add psci-reboot-mode driver To: Pavan Kondeti Cc: Sebastian Reichel , Mark Rutland , Lorenzo Pieralisi , "Rafael J. Wysocki" , Daniel Lezcano , Christian Loehle , Ulf Hansson , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Souvik Chakravarty , Andy Yan , Matthias Brugger , John Stultz , Moritz Fischer , Bartosz Golaszewski , Sudeep Holla , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Florian Fainelli , Krzysztof Kozlowski , Dmitry Baryshkov , Mukesh Ojha , Andre Draszik , Greg Kroah-Hartman , Kathiravan Thirumoorthy , mfd@lists.linux.dev, Srinivas Kandagatla References: <20260714-arm-psci-system_reset2-vendor-reboots-v23-0-e7453c548c21@oss.qualcomm.com> <20260714-arm-psci-system_reset2-vendor-reboots-v23-7-e7453c548c21@oss.qualcomm.com> <7b1dad52-b9d3-44a7-aedb-62911778f3ad@quicinc.com> Content-Language: en-US From: Shivendra Pratap In-Reply-To: <7b1dad52-b9d3-44a7-aedb-62911778f3ad@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: a_9HbDm-O-jLobUV6jB-E4BXxSidKf-Q X-Proofpoint-ORIG-GUID: a_9HbDm-O-jLobUV6jB-E4BXxSidKf-Q X-Authority-Analysis: v=2.4 cv=baZbluPB c=1 sm=1 tr=0 ts=6a6217c1 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=2z0wryL4N9vVr7V_-cUA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIzMDEzMyBTYWx0ZWRfX40/6h7FeBHhD g0QJV43e2zLGR0ovE0/PE6pVzPoG1woaF9CKr1+Ahz4Fw2p0P8+rNJhynylz3FDVCGO4739OHvL 1Ew+q9H8aLYpLdW6qTKZdOUfUfuTzis= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIzMDEzMyBTYWx0ZWRfX+kioLRqBrvSc XAaFX+X85UsAXQTgaZ9v0aRbiiXmSwamGecBclClCJJQjZ0roLP+A6kGhllI4XCTm0wzHJNvXP2 W/xPK1kZ/U3RqDZ3rktI19NmzP8k6woE6rcgy3fUI9usyIvuz1Q1qqw4cyNci218mEBtmzmya0A FQPEpM+DJJhO++nqIam70S+taIqzSN2AufrPtl/dOwOEe8JWZXIeiL0xi0nHVPNbOCSJfeaorK/ tgZcHqJFO0WaH5ZBXVHFS4sMxRcKkPf9npGutXWVayqldf5hdd1E1NkBo2m+43mxExYIXkgKpBG Bxw93mZydwyMa5pa1/4uihHazsco/se60VBrNpqtdNHMUdwyEztRXQrod/TswE92Hi2WFOj06n7 AAV5GuCH/rr+bK3LYxMBnVUuLLJBJHXcT3Zqa0uTcL/AlVpNi0oZkO8WZZuMCoVZO4Ukbl4PNfL d9Cie9diQXEweJhk5sQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-23_04,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 adultscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607230133 On 22-07-2026 14:30, Pavan Kondeti wrote: > On Tue, Jul 14, 2026 at 10:46:35PM +0530, Shivendra Pratap wrote: >> PSCI supports different types of resets like SYSTEM_RESET, SYSTEM_RESET2 >> ARCH WARM reset and SYSTEM_RESET2 vendor-specific resets. Currently >> there is no common driver that handles all supported psci resets at one >> place. Additionally, there is no common mechanism to issue the supported >> psci resets from userspace. >> >> Add a psci-reboot-mode driver, and define two types of PSCI resets, >> predefined-resets and vendor-specific resets. Predefined-resets are >> defined by psci driver and vendor-specific resets are defined by SoC >> vendors, under the psci:reboot-mode node of SoC device tree. >> >> Register the driver with the reboot-mode framework to interface these >> resets to userspace. When userspace initiates a supported command, pass >> the reset arguments to the PSCI driver to enable command-based reset. >> >> This change allows userspace to issue supported PSCI reset commands >> using the standard reboot system calls while enabling SoC vendors to >> define their specific resets for PSCI. >> >> Signed-off-by: Shivendra Pratap >> --- >> MAINTAINERS | 1 + >> drivers/power/reset/Kconfig | 10 +++++ >> drivers/power/reset/Makefile | 1 + >> drivers/power/reset/psci-reboot-mode.c | 78 ++++++++++++++++++++++++++++++++++ >> 4 files changed, 90 insertions(+) >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index e1ed6abef62a..4910abafa170 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -21576,6 +21576,7 @@ S: Maintained >> F: Documentation/devicetree/bindings/arm/psci.yaml >> F: drivers/firmware/psci/ >> F: drivers/mfd/psci-mfd.c >> +F: drivers/power/reset/psci-reboot-mode.c >> F: include/linux/psci.h >> F: include/uapi/linux/psci.h >> >> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig >> index 124afb99febe..93e4029d9506 100644 >> --- a/drivers/power/reset/Kconfig >> +++ b/drivers/power/reset/Kconfig >> @@ -348,6 +348,16 @@ config NVMEM_REBOOT_MODE >> then the bootloader can read it and take different >> action according to the mode. >> >> +config PSCI_REBOOT_MODE >> + bool "PSCI reboot mode driver" >> + depends on OF && (ARM_PSCI_FW || COMPILE_TEST) >> + select REBOOT_MODE >> + help >> + Say y here will enable PSCI reboot mode driver. This gets >> + the PSCI reboot mode arguments and passes them to psci >> + driver. psci driver uses these arguments for issuing >> + device reset into different boot states. >> + > > Since we have added predefined-resets support, why are we forcing this > driver to depend on OF? > > For example, `reboot psci-system-reset2-arch-warm-reset` gives me > warm reset on non-DT systems, correct? sure. Will update it. thanks. thanks, Shivendra