Re: [PATCH v5 1/2] firmware: qcom: scm: Register gunyah watchdog device
From: Hrishabh Rajput
Date: Tue Nov 11 2025 - 23:37:38 EST
On 11/11/2025 8:35 PM, Dmitry Baryshkov wrote:
On Tue, Nov 11, 2025 at 07:30:59PM +0530, Hrishabh Rajput wrote:
On 11/11/2025 5:52 PM, Dmitry Baryshkov wrote:Unreadable. Don't you read what you are sending?
On Tue, Nov 11, 2025 at 11:41:51AM +0100, Krzysztof Kozlowski wrote:Thanks a lot Dmitry, wemade the change below and compile tested on various
On 11/11/2025 11:34, Dmitry Baryshkov wrote:Then `if (!IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY))` might be a good
On Tue, Nov 11, 2025 at 10:51:43AM +0530, Pavan Kondeti wrote:HAVE_ARM_SMCCC_DISCOVERY has a dependency which is not always selected
On Mon, Nov 10, 2025 at 09:43:53AM +0530, Pavan Kondeti wrote:The same as before: 'select HAVE_ARM_SMCCC_DISCOVERY'.
On Sat, Nov 08, 2025 at 07:26:46PM +0200, Dmitry Baryshkov wrote:Dmitry / Bjorn,
Probably `depends on HAVE_ARM_SMCCC_DISCOVERY` is correct here.+static void qcom_scm_gunyah_wdt_free(void *data)static const?
+{
+ struct platform_device *gunyah_wdt_dev = data;
+
+ platform_device_unregister(gunyah_wdt_dev);
+}
+
+static void qcom_scm_gunyah_wdt_init(struct qcom_scm *scm)
+{
+ struct platform_device *gunyah_wdt_dev;
+ struct device_node *np;
+ bool of_wdt_available;
+ int i;
+ uuid_t gunyah_uuid = UUID_INIT(0xc1d58fcd, 0xa453, 0x5fdb, 0x92, 0x65,
+ 0xce, 0x36, 0x67, 0x3d, 0x5f, 0x14);This rquires 'select HAVE_ARM_SMCCC_DISCOVERY'
+ static const char * const of_wdt_compatible[] = {
+ "qcom,kpss-wdt",
+ "arm,sbsa-gwdt",
+ };
+
+ /* Bail out if we are not running under Gunyah */
+ if (!arm_smccc_hypervisor_has_uuid(&gunyah_uuid))
+ return;
We are debating on this internally on how to resolve this dependency
- QCOM_SCM depends on HAVE_ARM_SMCCC_DISCOVERY which means restricting
QCOM_SCM compilation than what it is today.
- Adding #ifdefry around arm_smccc_hypervisor_has_uuid usage in qcom scm driver
- Adding stub for `arm_smccc_hypervisor_has_uuid()` which is not done
for any of the functions defined in drivers/firmware/smccc/smccc.c
We are trending towards the first option above. Please let us know if
you think otherwise.
(e.g. ARM32), thus selecting it might lead to warnings of unmet
dependencies.
option here (and depend on GICv3 selecting it).
architectures (ARM64, ARM32, x86, PowerPC, RISC-V and MIPS) and it was
success.
We will include it in our next patch version, if there are no further
concerns.
}; /* Bail out if we are not running under Gunyah */ - if
(!arm_smccc_hypervisor_has_uuid(&gunyah_uuid)) + if
(!IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY) || +
!arm_smccc_hypervisor_has_uuid(&gunyah_uuid)) return; /*
Sorry, my mail client messed up the formatting while sending. Here is the proper version:
/* Bail out if we are not running under Gunyah */
- if (!arm_smccc_hypervisor_has_uuid(&gunyah_uuid))
+ if (!IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY) ||
+ !arm_smccc_hypervisor_has_uuid(&gunyah_uuid))
return;
Thanks,
Hrishabh