devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hrishabh Rajput <hrishabh.rajput@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Pavan Kondeti <pavan.kondeti@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH v5 1/2] firmware: qcom: scm: Register gunyah watchdog device
Date: Wed, 12 Nov 2025 10:07:26 +0530	[thread overview]
Message-ID: <68dbaf42-0d64-45f7-8410-ebcbae2da612@oss.qualcomm.com> (raw)
In-Reply-To: <nkh73mo4h5kj2lrz7paop7fn3ow2itxl5vh43muw6n5dxgmco3@tgvbmdxhbiqo>


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:
>>> On Tue, Nov 11, 2025 at 11:41:51AM +0100, Krzysztof Kozlowski wrote:
>>>> On 11/11/2025 11:34, Dmitry Baryshkov wrote:
>>>>> On Tue, Nov 11, 2025 at 10:51:43AM +0530, Pavan Kondeti wrote:
>>>>>> On Mon, Nov 10, 2025 at 09:43:53AM +0530, Pavan Kondeti wrote:
>>>>>>> On Sat, Nov 08, 2025 at 07:26:46PM +0200, Dmitry Baryshkov wrote:
>>>>>>>>> +static void qcom_scm_gunyah_wdt_free(void *data)
>>>>>>>>> +{
>>>>>>>>> +	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,
>>>>>>>> static const?
>>>>>>>>
>>>>>>>>> +				       0xce, 0x36, 0x67, 0x3d, 0x5f, 0x14);
>>>>>>>>> +	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;
>>>>>>>> This rquires 'select HAVE_ARM_SMCCC_DISCOVERY'
>>>>>>>>
>>>>>>> Probably `depends on HAVE_ARM_SMCCC_DISCOVERY` is correct here.
>>>>>>>
>>>>>> Dmitry / Bjorn,
>>>>>>
>>>>>> 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.
>>>>> The same as before: 'select HAVE_ARM_SMCCC_DISCOVERY'.
>>>> HAVE_ARM_SMCCC_DISCOVERY has a dependency which is not always selected
>>>> (e.g. ARM32), thus selecting it might lead to warnings of unmet
>>>> dependencies.
>>> Then `if (!IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY))` might be a good
>>> option here (and depend on GICv3 selecting it).
>> Thanks a lot Dmitry, wemade the change below and compile tested on various
>> 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; /*
> Unreadable. Don't you read what you are sending?

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


  reply	other threads:[~2025-11-12  4:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 17:53 [PATCH v5 0/2] Add support for Gunyah Watchdog Hrishabh Rajput via B4 Relay
2025-11-07 17:53 ` [PATCH v5 1/2] firmware: qcom: scm: Register gunyah watchdog device Hrishabh Rajput via B4 Relay
2025-11-08  9:49   ` kernel test robot
2025-11-08 12:33   ` kernel test robot
2025-11-08 17:26   ` Dmitry Baryshkov
2025-11-10  4:13     ` Pavan Kondeti
2025-11-11  5:21       ` Pavan Kondeti
2025-11-11 10:34         ` Dmitry Baryshkov
2025-11-11 10:41           ` Krzysztof Kozlowski
2025-11-11 12:22             ` Dmitry Baryshkov
2025-11-11 14:00               ` Hrishabh Rajput
2025-11-11 15:05                 ` Dmitry Baryshkov
2025-11-12  4:37                   ` Hrishabh Rajput [this message]
2025-11-12 16:26                     ` Bjorn Andersson
2025-11-11 16:38         ` Bjorn Andersson
2025-11-11 17:01           ` Pavan Kondeti
2025-11-11 22:36             ` Dmitry Baryshkov
2025-11-07 17:53 ` [PATCH v5 2/2] watchdog: Add driver for Gunyah Watchdog Hrishabh Rajput via B4 Relay

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=68dbaf42-0d64-45f7-8410-ebcbae2da612@oss.qualcomm.com \
    --to=hrishabh.rajput@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=neil.armstrong@linaro.org \
    --cc=pavan.kondeti@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=wim@linux-watchdog.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;
as well as URLs for NNTP newsgroup(s).