public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
To: Arnd Bergmann <arnd@arndb.de>, Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: "Bjorn Andersson" <andersson@kernel.org>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Souvik Chakravarty" <Souvik.Chakravarty@arm.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Andy Yan" <andy.yan@rock-chips.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"Moritz Fischer" <moritz.fischer@ettus.com>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"Sudeep Holla" <sudeep.holla@kernel.org>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	"Mukesh Ojha" <mukesh.ojha@oss.qualcomm.com>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Kathiravan Thirumoorthy"
	<kathiravan.thirumoorthy@oss.qualcomm.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	"Srinivas Kandagatla" <srini@kernel.org>
Subject: Re: [PATCH v20 06/10] power: reset: Add psci-reboot-mode driver
Date: Fri, 3 Apr 2026 00:08:37 +0530	[thread overview]
Message-ID: <65c52a56-9c2f-4afc-afa3-a574df0aa045@oss.qualcomm.com> (raw)
In-Reply-To: <f6ed07b1-8bfc-49ea-951e-b590bf8b299a@app.fastmail.com>



On 01-04-2026 20:26, Arnd Bergmann wrote:
> On Wed, Apr 1, 2026, at 16:37, Lorenzo Pieralisi wrote:
>> On Tue, Mar 31, 2026 at 11:30:09PM +0530, Shivendra Pratap wrote:
>>>
>>>>> +#include <linux/err.h>
>>>>> +#include <linux/of.h>
>>>>> +#include <linux/psci.h>
>>>>> +#include <linux/reboot.h>
>>>>> +#include <linux/reboot-mode.h>
>>>>> +#include <linux/types.h>
>>>>> +
>>>>> +/*
>>>>> + * Predefined reboot-modes are defined as per the values
>>>>> + * of enum reboot_mode defined in the kernel: reboot.c.
>>>>> + */
>>>>> +static struct mode_info psci_resets[] = {
>>>>> +	{ .mode = "warm", .magic = REBOOT_WARM},
>>>>> +	{ .mode = "soft", .magic = REBOOT_SOFT},
>>>>> +	{ .mode = "cold", .magic = REBOOT_COLD},
>>
>> These strings match the command userspace issue right ? I think that we
>> should make them match the corresponding PSCI reset types, the list above
>> maps command to reboot_mode values and those can belong to any reboot
>> mode driver to be honest they don't make much sense in a PSCI reboot
>> mode driver only.
>>
>> It is a question for everyone here: would it make sense to make these
>> predefined resets a set of strings, eg:
>>
>> psci-system-reset
>> psci-system-reset2-arch-warm-reset
>>
>> and then vendor resets:
>>
>> psci-system-reset2-vendor-reset
>>
>> at least we know what a string maps to ?
>>
>> We can export a function from the PSCI driver to detect whether PSCI
>> SYSTEM_RESET2 is supported, an equivalent of psci_has_osi_support() for
>> instance that we can call from this driver to detect its presence.
> 
> Sorry I've been out of the loop for this series for a while, but
> can someone refresh me on why we got back to mixing in
> the 'enum reboot_mode' from legacy i386 and arm32 into the new
> interface?
> 
> I don't mind having whichever strings are defined for PSCI present
> in the user interface, but this seems like a mistake to me.
> If at all possible, lets define your own magic constants that
> are not tied to "enum reboot_mode" or the legacy reboot= command
> line argument.

sure. will remove usage of "enum reboot_mode".

thanks,
Shivendra


  reply	other threads:[~2026-04-02 18:39 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 18:03 [PATCH v20 00/10] Implement PSCI reboot mode driver for PSCI resets Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 01/10] power: reset: reboot-mode: Remove devres based allocations Shivendra Pratap
2026-03-05 10:05   ` Bartosz Golaszewski
2026-03-11  9:21   ` Sebastian Reichel
2026-03-12  8:54     ` Shivendra Pratap
2026-04-01 15:19   ` Krzysztof Kozlowski
2026-04-02  6:15     ` Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 02/10] power: reset: reboot-mode: Add support for 64 bit magic Shivendra Pratap
2026-03-11  9:22   ` Sebastian Reichel
2026-03-04 18:03 ` [PATCH v20 03/10] power: reset: reboot-mode: Add support for predefined reboot modes Shivendra Pratap
2026-03-11  9:22   ` Sebastian Reichel
2026-03-04 18:03 ` [PATCH v20 04/10] firmware: psci: Introduce command-based reset in psci_sys_reset Shivendra Pratap
2026-03-27 14:07   ` Lorenzo Pieralisi
2026-03-31 17:38     ` Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 05/10] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 06/10] power: reset: Add psci-reboot-mode driver Shivendra Pratap
2026-03-05 10:02   ` Bartosz Golaszewski
2026-03-05 17:06     ` Shivendra Pratap
2026-03-06 13:32       ` Bartosz Golaszewski
2026-03-27 14:08         ` Lorenzo Pieralisi
2026-03-27 14:09           ` Bartosz Golaszewski
2026-03-27 13:55   ` Lorenzo Pieralisi
2026-03-27 13:59     ` Bartosz Golaszewski
2026-03-31 18:00     ` Shivendra Pratap
2026-04-01 14:37       ` Lorenzo Pieralisi
2026-04-01 14:56         ` Arnd Bergmann
2026-04-02 18:38           ` Shivendra Pratap [this message]
2026-04-02 18:35         ` Shivendra Pratap
2026-04-03 15:50           ` Lorenzo Pieralisi
2026-04-03 17:45             ` Shivendra Pratap
2026-03-27 14:14   ` Lorenzo Pieralisi
2026-03-31 17:40     ` Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 07/10] arm64: dts: qcom: qcm6490: Add psci reboot-modes Shivendra Pratap
2026-03-05 10:57   ` Konrad Dybcio
2026-03-04 18:03 ` [PATCH v20 08/10] arm64: dts: qcom: lemans: " Shivendra Pratap
2026-03-05 11:33   ` Konrad Dybcio
2026-03-05 17:52     ` Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 09/10] arm64: dts: qcom: monaco: " Shivendra Pratap
2026-03-04 18:03 ` [PATCH v20 10/10] arm64: dts: qcom: talos: " Shivendra Pratap
2026-04-06  7:36 ` [PATCH v20 00/10] Implement PSCI reboot mode driver for PSCI resets Pankaj Patil

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=65c52a56-9c2f-4afc-afa3-a574df0aa045@oss.qualcomm.com \
    --to=shivendra.pratap@oss.qualcomm.com \
    --cc=Souvik.Chakravarty@arm.com \
    --cc=andersson@kernel.org \
    --cc=andre.draszik@linaro.org \
    --cc=andy.yan@rock-chips.com \
    --cc=arnd@arndb.de \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=john.stultz@linaro.org \
    --cc=kathiravan.thirumoorthy@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@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=matthias.bgg@gmail.com \
    --cc=moritz.fischer@ettus.com \
    --cc=mukesh.ojha@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=srini@kernel.org \
    --cc=sudeep.holla@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