From: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>
To: Arnd Bergmann <arnd@arndb.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.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>
Cc: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
"Mukesh Ojha" <mukesh.ojha@oss.qualcomm.com>,
"Stephen Boyd" <swboyd@chromium.org>,
"André Draszik" <andre.draszik@linaro.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>,
"Elliot Berman" <elliot.berman@oss.qualcomm.com>,
"Konrad Dybcio" <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH v12 0/8] Implement vendor resets for PSCI SYSTEM_RESET2
Date: Thu, 24 Jul 2025 23:51:23 +0530 [thread overview]
Message-ID: <58eb8f0e-a029-cb7f-e63a-9eac6a6444df@oss.qualcomm.com> (raw)
In-Reply-To: <36f62026-9517-42bd-8f9a-92f39fcdc136@app.fastmail.com>
On 7/24/2025 8:13 PM, Arnd Bergmann wrote:
> On Thu, Jul 24, 2025, at 16:04, Shivendra Pratap wrote:
>> On 7/24/2025 6:18 PM, Krzysztof Kozlowski wrote:
>>> On 24/07/2025 14:24, Shivendra Pratap wrote:
>
>>> I strongly insist using compatible as way to find your device, not node
>>> names.
>> It will look better to switch to compatible. Will define a compatible for
>> psci reboot-mode binding and align the patch to use the compatible for sysfs.
>> Current patch defines reboot-mode as a property to psci, hope its fine to
>> define a compatible for this property like "psci-vendor-reset" or
>> "psci-reboot-modes"?
>>
>
> How about using the reboot driver name as the identifier in sysfs
> instead of the compatible string? That would make it independent of
> devicetree.
In current patch, psci driver registers to reboot-mode using a device-tree
node. So reboot-mode does not has a driver name for psci's reboot registration.
its like - reboot_mode_register(reboot, <struct device_node *np>)
Now when we want to use the registering reboot driver's name for sysfs,
either we-
1, Pass an explicit name from psci driver(say "psci") while registering
to reboot-mode.
or
2. Create a virtual device in psci driver with name say "psci" and then
register for reboot-mode.
which one is preferred? suggestions?
>
> I had a related idea to provide some namespacing on the actual
> reboot syscall parameter, as we have two (or more) orthogonal
> concepts here, when there is more than one reboot driver and
> drivers support multiple modes.
>
> E.g. you could use
>
> syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
> LINUX_REBOOT_CMD_RESTART2, "watchdog");
>
> vs
>
> syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
> LINUX_REBOOT_CMD_RESTART2, "psci");
>
> to pick one of the drivers, or
>
> syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
> LINUX_REBOOT_CMD_RESTART2, "bootloader");
>
> syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
> LINUX_REBOOT_CMD_RESTART2, "recovery");
>
> to ask for a reboot from any driver that supports a mode, or
> combine the two and ask a specific mode in a specific driver like
>
> syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
> LINUX_REBOOT_CMD_RESTART2, "psci:bootloader");
This will introduce an additional feature in the reboot-mode driver.
If a colon is present in the command like "<driver name>:bootloader",
Call the "<driver name>" specific writes only.
We want to add this feature?
>
> Arnd
next prev parent reply other threads:[~2025-07-24 18:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 18:28 [PATCH v12 0/8] Implement vendor resets for PSCI SYSTEM_RESET2 Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 1/8] power: reset: reboot-mode: Add device tree node-based registration Shivendra Pratap
2025-07-21 21:36 ` Dmitry Baryshkov
2025-07-22 16:17 ` Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 2/8] power: reset: reboot-mode: Add support for 64 bit magic Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 3/8] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 4/8] firmware: psci: Implement vendor-specific resets as reboot-mode Shivendra Pratap
2025-07-22 16:11 ` kernel test robot
2025-07-21 18:28 ` [PATCH v12 5/8] arm64: dts: qcom: qcm6490-idp: Add PSCI SYSTEM_RESET2 types Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 6/8] arm64: dts: qcom: qcs6490-rb3gen2: " Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 7/8] arm64: dts: qcom: sa8775p-ride: " Shivendra Pratap
2025-07-21 18:28 ` [PATCH v12 8/8] power: reset: reboot-mode: Expose sysfs for registered reboot_modes Shivendra Pratap
2025-07-22 17:22 ` kernel test robot
2025-07-24 0:16 ` [PATCH v12 0/8] Implement vendor resets for PSCI SYSTEM_RESET2 Florian Fainelli
2025-07-24 12:24 ` Shivendra Pratap
2025-07-24 12:48 ` Krzysztof Kozlowski
2025-07-24 14:04 ` Shivendra Pratap
2025-07-24 14:38 ` Krzysztof Kozlowski
2025-07-24 14:43 ` Arnd Bergmann
2025-07-24 16:38 ` Florian Fainelli
2025-07-24 18:21 ` Shivendra Pratap [this message]
2025-07-24 20:14 ` Arnd Bergmann
2025-07-25 3:34 ` Shivendra Pratap
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=58eb8f0e-a029-cb7f-e63a-9eac6a6444df@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=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=elliot.berman@oss.qualcomm.com \
--cc=florian.fainelli@broadcom.com \
--cc=konrad.dybcio@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=mukesh.ojha@oss.qualcomm.com \
--cc=quic_eberman@quicinc.com \
--cc=robh@kernel.org \
--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