From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FF6A1E0DD9; Tue, 28 Oct 2025 16:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761669639; cv=none; b=TqTv5NX8JYQgK1VUF9BWYfIyBegOLYN+Xf+JvMKfUckCZo3xIsqJc7QS1aMyLkP4ymmPNn1hMSj9VjEPmiTqCxqX/a6yZs3/+IlhO299gI/uNP5gZxBvphMgKoEMmiezpdYykL100qEWBg4f5fpaobouYi2AqJnIe4c0uJyiy08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761669639; c=relaxed/simple; bh=/JfS7eiiSAq3FKBXLYqqDzVgEh7qbDZ2ncxN1xuql3M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EhGVMu8ddmPB+bI8JG81JRNhdUI26RYWQlZpZ7JBHyi09ptWjRNCTLgY7hqz1B5piOwk41lZddJEkmkNPaZO45iNiTPZg0uNgRVMmTvofJErzTq5KDYicl5q+gIOCedmb/zYIlwuKba5e+X1W9SYnqPE9No4SOFud+XKrWkjgBI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a2JdsJ8S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a2JdsJ8S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE882C4CEE7; Tue, 28 Oct 2025 16:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761669638; bh=/JfS7eiiSAq3FKBXLYqqDzVgEh7qbDZ2ncxN1xuql3M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=a2JdsJ8SyutaDbKgxjbg3ZsYUjtFeDhtbN1TnUTIjFZqjNTatBwv5Y7AKc0HiKKoC 7WO0Fpu+QNUf29xTVd+gkfH1IurBwfp36YYhqa++1euiGMmrlPsbbUNm53pQFK9i6K Z5xlku0+qj8PrMQiTvnwgbGYcWMEDW0QRJnPszzoIEE/NsciyMzdPn9jvVFYIR/33w JubTSYKzTaMoUvr0vnLVQljk0zNLazZ9rr0han0rBZ3Heu0guV92OlgiW5AXCb8+qC 4D+wAEI04uD3YEKp6rm3UTeIbOT0ynFeb2xFyz7wZmp7SBGDT2KVc1gRcamqrRi8R4 y8ftVK+8hmQYA== Message-ID: Date: Tue, 28 Oct 2025 17:40:33 +0100 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] watchdog: Add driver for Gunyah Watchdog To: Pavan Kondeti Cc: Hrishabh Rajput , Bjorn Andersson , Konrad Dybcio , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong References: <20251028-gunyah_watchdog-v3-1-e6d1ea438b1d@oss.qualcomm.com> <25f7ff09-08ea-4969-9184-9fd01b097558@kernel.org> <76479593-c47b-41a7-8349-5d7c1403f7c0@oss.qualcomm.com> <73955d58-544c-4299-a099-bfd9e5912a40@kernel.org> <636a1f99-acd4-4904-8fae-f159646cc1a0@kernel.org> <59a00934-cb42-43de-ac5b-a9292b08301d@quicinc.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krz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FVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <59a00934-cb42-43de-ac5b-a9292b08301d@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 28/10/2025 17:33, Pavan Kondeti wrote: > On Tue, Oct 28, 2025 at 05:17:44PM +0100, Krzysztof Kozlowski wrote: >> On 28/10/2025 13:27, Pavan Kondeti wrote: >>> On Tue, Oct 28, 2025 at 12:07:40PM +0100, Krzysztof Kozlowski wrote: >>>> On 28/10/2025 12:04, Krzysztof Kozlowski wrote: >>>>> On 28/10/2025 11:58, Hrishabh Rajput wrote: >>>>>> >>>>>> On 10/28/2025 3:10 PM, Krzysztof Kozlowski wrote: >>>>>>> On 28/10/2025 10:35, Hrishabh Rajput via B4 Relay wrote: >>>>>>>> + >>>>>>>> +static int __init gunyah_wdt_init(void) >>>>>>>> +{ >>>>>>>> + struct arm_smccc_res res; >>>>>>>> + struct device_node *np; >>>>>>>> + int ret; >>>>>>>> + >>>>>>>> + /* Check if we're running on a Qualcomm device */ >>>>>>>> + np = of_find_compatible_node(NULL, NULL, "qcom,smem"); >>>>>>> I don't think you implemented my feedback. This again is executed on >>>>>>> every platform, e.g. on Samsung, pointlessly. >>>>>>> >>>>>>> Implement previous feedback. >>>>>> >>>>>> Do you want us to add platform device from another driver which is >>>>>> probed only on Qualcomm devices (like socinfo from previous discussion) >>>>>> and get rid of the module init function entirely? As keeping anything in >>>>>> the module init will get it executed on all platforms. >>>>> >>>>> Instead of asking the same can you read previous discussion? What is >>>>> unclear here: >>>>> https://lore.kernel.org/all/3b901f9d-dbfa-4f93-a8d2-3e89bd9783c9@kernel.org/ >>>>> ? >>>>> >>>>>> >>>>>> >>>>>> With this patch version, we have tried to reduce the code execution on >>>>>> non-Qualcomm devices (also tried the alternative as mentioned in the >>>>>> cover letter). Adding platform device from another driver as described >>>>>> above would eliminate it entirely, please let us know if you want us to >>>>>> do that. >>>>> >>>>> Why do I need to repeat the same as last time? >>>> >>>> >>>> Now I see that you completely ignored previous discussion and sent THE >>>> SAME approach. >>> >>> Our intention is not to waste reviewers time at all. It is just a >>> misunderstanding on what your comment is about. Let me elaborate further >>> not to defend our approach here but to get a clarity so that we don't >>> end up in the same situation when v4 is posted. >>> >>> https://lore.kernel.org/all/b94d8ca3-af58-4a78-9a5a-12e3db0bf75f@kernel.org/ >>> >>> You mentioned here >>> >>> ``` >>> To me socinfo feels even better. That way only, really only qcom devices >>> will execute this SMC. >>> ``` >>> >>> We interpreted this comment as `avoid executing this SMC on non qcom >>> devices`. That is exactly what we have done in the current patch. since >> >> >> So where did you use socinfo? Point me to the code. >> > > Okay, lets go a bit deep into the socinfo part. we have used > `soc_device_match()` API to detect if the device is qcom (`family = > Snapdragon`). It works. However, when we built both `socinfo` and socinfo driver. Read my first feedback: "No, your hypervisor driver (which you have) should start the module via adding platform/aux/something devices." And then I agreed if you start it from the socinfo driver. > `gunyah-wdt` as modules, we do see that `gunyah-wdt` gets probed before > `socinfo` because the driver that registers socinfo as platform device > which is `smem` probe is getting delayed. As you may know `smem` device > gets registered by `OF` core directly before the whole platform devices > are populated. To make sure that any configuration works, we went with > `qcom,smem` based detection. This is mentioned in the cover letter, sure > it is a detail that can easily be lost. Now one might just say go and > fix probe deferral problems. The problem here is that `smem` platform > device creation happens differently to other devices which is leading to > probe deferral. I can enumerate the problem in much detail, if that > interests you. > > Please help us understand what is the real concern here? we don't want > to call `of_find_compatible_node()` API on non qcom devices but it is It was told to you already multiple times and it is basic kernel knowledge - you do not execute your init code on other platforms. At all. You are developing like it was 2005. That was the style that time. Write concise replies, I really have not much time to read LLM output. Best regards, Krzysztof