[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <63d090988d04fa81231c984771a563c55daf1bd9.camel@linaro.org>
Date: Thu, 31 Jul 2025 12:05:13 +0100
From: André Draszik <andre.draszik@...aro.org>
To: Arnd Bergmann <arnd@...db.de>, Shivendra Pratap
<shivendra.pratap@....qualcomm.com>, Bartosz Golaszewski
<bartosz.golaszewski@...aro.org>, Bjorn Andersson <andersson@...nel.org>,
Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>, Sudeep
Holla <sudeep.holla@....com>, Souvik Chakravarty
<Souvik.Chakravarty@....com>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Andy Yan <andy.yan@...k-chips.com>,
Mark Rutland <mark.rutland@....com>, Lorenzo Pieralisi
<lpieralisi@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
cros-qcom-dts-watchers@...omium.org, Vinod Koul <vkoul@...nel.org>, Catalin
Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>, Florian
Fainelli <florian.fainelli@...adcom.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, Mukesh Ojha
<mukesh.ojha@....qualcomm.com>, Stephen Boyd <swboyd@...omium.org>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, Elliot Berman <quic_eberman@...cinc.com>,
Srinivas Kandagatla
<srini@...nel.org>
Subject: Re: [PATCH v13 07/10] firmware: psci: Implement vendor-specific
resets as reboot-mode
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.
Powered by blists - more mailing lists