[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <fd153e95-b06d-47f9-b079-566908c20df2@app.fastmail.com>
Date: Thu, 24 Jul 2025 22:14:52 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Shivendra Pratap" <shivendra.pratap@....qualcomm.com>,
"Krzysztof Kozlowski" <krzk@...nel.org>,
"Florian Fainelli" <florian.fainelli@...adcom.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>
Cc: "Dmitry Baryshkov" <dmitry.baryshkov@....qualcomm.com>,
"Mukesh Ojha" <mukesh.ojha@....qualcomm.com>,
"Stephen Boyd" <swboyd@...omium.org>,
André Draszik <andre.draszik@...aro.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>,
"Elliot Berman" <elliot.berman@....qualcomm.com>,
"Konrad Dybcio" <konrad.dybcio@....qualcomm.com>
Subject: Re: [PATCH v12 0/8] Implement vendor resets for PSCI SYSTEM_RESET2
On Thu, Jul 24, 2025, at 20:21, Shivendra Pratap wrote:
> On 7/24/2025 8:13 PM, Arnd Bergmann wrote:
>> On Thu, Jul 24, 2025, at 16:04, Shivendra Pratap wrote:
>> 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 would pick 1, to decouple the namespace from the device and to
keep it simpler.
>> 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?
I think this will require a little more rework in the reboot
infrastructure, and I did not mean for you to do it now, we
can always decide to do this as a follow-up, but I brought it
up because the way we pick the namespace will limit our options
later.
Arnd
Powered by blists - more mailing lists