devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "André Draszik" <andre.draszik@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>,
	Shivendra Pratap	 <shivendra.pratap@oss.qualcomm.com>,
	Bartosz Golaszewski	 <bartosz.golaszewski@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>,
	 Sebastian Reichel	 <sre@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Sudeep Holla	 <sudeep.holla@arm.com>,
	Souvik Chakravarty <Souvik.Chakravarty@arm.com>,
	 Krzysztof Kozlowski	 <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andy Yan	 <andy.yan@rock-chips.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	 cros-qcom-dts-watchers@chromium.org,
	Vinod Koul <vkoul@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Florian Fainelli	 <florian.fainelli@broadcom.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>,
	Stephen Boyd <swboyd@chromium.org>,
	 linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-arm-msm@vger.kernel.org,
	Elliot Berman <quic_eberman@quicinc.com>,
	 Srinivas Kandagatla <srini@kernel.org>
Subject: Re: [PATCH v13 07/10] firmware: psci: Implement vendor-specific resets as reboot-mode
Date: Thu, 31 Jul 2025 12:05:13 +0100	[thread overview]
Message-ID: <63d090988d04fa81231c984771a563c55daf1bd9.camel@linaro.org> (raw)
In-Reply-To: <592902f1-549f-47c5-9ef4-b5c7ef2c9a47@app.fastmail.com>

On Wed, 2025-07-30 at 19:31 +0200, Arnd Bergmann wrote:
> On Wed, Jul 30, 2025, at 17:23, André Draszik wrote:
> > On Wed, 2025-07-30 at 18:33 +0530, Shivendra Pratap wrote:
> > > On 7/30/2025 2:14 PM, André Draszik wrote:
> 
> > > 1. For this, both commands will be defined in the psci->reboot-mode DT Node with the arguments that
> > >    are defined and supported by the firmware.
> > > 2. Further, such requirement will now be taken care by the underlying firmware that supports
> > >    PSCI vendor-specific reset. When we call into firmware with vendor specific reset arguments,
> > >    firmware will take care of the defined HW writes and warm/cold reset as per the mapping of the
> > >    defined arguments. Firmware and the Linux kernel here are in agreement for executing the
> > >    vendor-specific resets.
> > 
> > So that means
> > 
> >     echo warm > /sys/kernel/reboot/mode
> >     reboot bootloader
> > 
> > and
> > 
> >     echo cold > /sys/kernel/reboot/mode
> >     reboot bootloader
> > 
> > can not be distinguished.
> > 
> > The firmware can not know whether or not cold or warm reboot was
> > requested in this case by the user.
> 
> My feeling is that this is fine: the /sys/kernel/reboot/mode
> interface is not really used on anything other than 32-bit
> arm and x86 machines, and the way it is specific as
> cold/warm/hard/soft/gpio is not that useful.

Currently, reboot_mode as such is also used by gs101 and later, we do
distinguish between the reboot_modes (cold/hard and warm/soft), although
generally not via sysfs indeed. And yes, gpio is a strangely specific
one.

I don't have insight into newer SoCs / board designs in that family,
but my understanding is that newer SoCs use PSCI for reboot as well
and I do believe being able to do cold reboot by default and warm
reboot in some cases (crash handling in particular) to still be a
valid use-case.

> I think for the purpose of the new code here, we should talk
> about reboot "commands" instead of "modes" to avoid confusing
> between the global "enum reboot_mode" variable and the
> firmware interface for reboot modes as listed in DT.

+1 It should really have been added as reboot command or reboot target
in the first place.

A.

  reply	other threads:[~2025-07-31 11:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-27 16:24 [PATCH v13 00/10] Implement vendor resets for PSCI SYSTEM_RESET2 Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 01/10] power: reset: reboot-mode: Synchronize list traversal Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 02/10] power: reset: reboot-mode: Add device tree node-based registration Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 03/10] power: reset: reboot-mode: Add support for 64 bit magic Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 04/10] Documentation: ABI: Add sysfs-class-reboot-mode-reboot_modes Shivendra Pratap
2025-07-30  9:06   ` André Draszik
2025-07-30 13:08     ` Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 05/10] power: reset: reboot-mode: Expose sysfs for registered reboot_modes Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 06/10] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 07/10] firmware: psci: Implement vendor-specific resets as reboot-mode Shivendra Pratap
2025-07-28  4:53   ` Krzysztof Kozlowski
2025-07-28  9:44     ` Dmitry Baryshkov
2025-07-28 11:52       ` Krzysztof Kozlowski
2025-07-28 12:03         ` Dmitry Baryshkov
2025-07-28 12:23           ` Krzysztof Kozlowski
2025-07-28 13:23             ` Sudeep Holla
2025-07-28 15:37               ` Dmitry Baryshkov
2025-07-28 15:54             ` Shivendra Pratap
2025-07-28 18:29               ` Dmitry Baryshkov
2025-07-29  3:14                 ` Shivendra Pratap
2025-07-28 16:08           ` Shivendra Pratap
2025-07-30  8:44   ` André Draszik
2025-07-30 13:03     ` Shivendra Pratap
2025-07-30 15:23       ` André Draszik
2025-07-30 17:31         ` Arnd Bergmann
2025-07-31 11:05           ` André Draszik [this message]
2025-07-31  5:35         ` Shivendra Pratap
2025-07-31 10:25           ` André Draszik
2025-07-27 16:24 ` [PATCH v13 08/10] arm64: dts: qcom: qcm6490-idp: Add PSCI SYSTEM_RESET2 types Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 09/10] arm64: dts: qcom: qcs6490-rb3gen2: " Shivendra Pratap
2025-07-27 16:24 ` [PATCH v13 10/10] arm64: dts: qcom: sa8775p-ride: " Shivendra Pratap
2025-07-30  8:50 ` [PATCH v13 00/10] Implement vendor resets for PSCI SYSTEM_RESET2 André Draszik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63d090988d04fa81231c984771a563c55daf1bd9.camel@linaro.org \
    --to=andre.draszik@linaro.org \
    --cc=Souvik.Chakravarty@arm.com \
    --cc=andersson@kernel.org \
    --cc=andy.yan@rock-chips.com \
    --cc=arnd@arndb.de \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mukesh.ojha@oss.qualcomm.com \
    --cc=quic_eberman@quicinc.com \
    --cc=robh@kernel.org \
    --cc=shivendra.pratap@oss.qualcomm.com \
    --cc=sre@kernel.org \
    --cc=srini@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=swboyd@chromium.org \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).