Re: [PATCH 0/2] Add support for Gunyah Watchdog
From: Konrad Dybcio <hidden>
Date: 2025-09-05 10:18:15
Also in:
linux-arm-msm, linux-watchdog, lkml
On 9/5/25 2:00 AM, Pavan Kondeti wrote:
On Thu, Sep 04, 2025 at 05:51:24PM -0500, Rob Herring wrote:quoted
quoted
quoted
Why can't you probe by trying to see if watchdog smc call succeeds to see if there is a watchdog? Then you don't need DT for it.There apparently isn't a good way to tell from a running system whether Gunyah is present, unless you make a smc call (which could in theory be parsed by something else, say a different hypervisor..), but then this patch only introduces the watchdog interface, without all the cruft that would actually let us identify the hypervisor, get its version ID and perform sanity checks..IIRC, last time we got just a gunyah node. Now it's that plus a watchdog. What's next? I'm not really a fan of $soc_vendor hypervisor interfaces. I doubt anyone else is either. We have all sorts of standard interfaces already between virtio, vfio, EFI, SCMI, PSCI, etc. Can we please not abuse DT with $soc_vendor hypervisor devices.We are trying to make the watchdog work with existing SoCs, so we are sticking with the existing interfaces. The newer devices will not necessarily need DT to probe hypervisor interfaces. To answer your question on why can't you probe watchdog smc call to see if there is a watchdog. Yes, we can do that. It is just that we won't be able to support pre-timeout IRQ. This IRQ is optional for watchdog functionality, so this is something we can explore.
FWIW Rob, we moved on to SBSA watchdog on newer Gunyah releases.. Which is not ideal as it's still over MMIO, but there's some progress I'm not a fan of including the hypervisor in the picture, but as Pavan said above, we're trying to squeeze the least amount of hacks necessary to get the most out of existing platforms (i.e. ones which will not get newer Gunyah). Perhaps we could extend the MSM KPSS watchdog driver (which pokes at the physical watchdog on the SoC and whose DT node represents "reality") and have it attempt to make the SMC call early during probe, making way for both physical and virt configurations without additional dt alterations.. Konrad