From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CF04332907 for ; Mon, 17 Nov 2025 14:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763390738; cv=none; b=i7Vs6QNPL0iJ6x5NcwbwY7wBphlLa6pMyXPLd2XeUooSAsawumA5pRnjbgheZpgSlKMTr+iJqUef2yRKd1jfknas1AkD5KGM42kw1/+dxvsGg6x+kXsKz55nYIX2OyGrCe0LAZMVbAFm9wdNhzlBXYn3CwYviJTGFjvXGcR+7Jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763390738; c=relaxed/simple; bh=Q6zm4hF/iuyshuI8ZTVRPYLVS9bhIMvZAtEoGBwphH8=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=e/mBYk7H8hIpUxJxtRoWFkP8139Qbc1ZU/3E0xl/BlI8JsRPiA3uT0WgoPc3U9jiYl6TYOzhN3zKUYAvsZZN7XHbiyH3tddDq2lXPmcEzWKvAANcBbzAKuozMU50PgFOnIK1ZmtbrivbGhrtzjWgfXkSR6k1gqa7psZVRfXdhis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ilgPcbIh; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ilgPcbIh" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-47118259fd8so32729705e9.3 for ; Mon, 17 Nov 2025 06:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763390733; x=1763995533; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=Tk1rjAouZOijY60x5awEeFZKndj7NK9f5IbkSRl7Hig=; b=ilgPcbIhX64PZXxn2qgIjAK8KupZkkjeaBdC6GnUi9CDSeTkOFM+VL63LkVDzmzQOF HfR0lXyqfRZcRv+hM9OkgVfZ5kpyeSJglbL+5X2hlKO4znxkZv0AYiOWyFGIULeU/UH6 is/BoMcuP+5Ja+/5On3a/KGXiff3Fi6iLjYYUUZUbS7S8QjZUcG+N8D5BPN0K20DUFTR c99Oqyc/jWpA+6i2brxgZ6PvXeMaHs2/4DgQtlwrQEZlxtqYy1YwO7+VKedqWBiCY79u onCPY3LcDjM6rB7zW5bxdMiELWCdD8oFHGDjDOG906yThOE+ftsqWw0ZPA2MR3ddN2qD HIcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763390733; x=1763995533; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tk1rjAouZOijY60x5awEeFZKndj7NK9f5IbkSRl7Hig=; b=h5U9GAZl5A0kc1j6XLFMoVEXR2RU59Uk/IpsWfxgo5WjgXjVa45LJ1JK8C7epfL1Nd uNtxTZqTNr9d8P14u3VGSDazh4MlFgUrdDH0aWKFUlE0nTt1zI+OyAzPl6Axd5Wm5Wkm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Hw== X-Received: by 2002:a05:600c:c177:b0:46f:d682:3c3d with SMTP id 5b1f17b1804b1-4778fe683d6mr111222665e9.13.1763390733101; Mon, 17 Nov 2025 06:45:33 -0800 (PST) Received: from ?IPV6:2a01:e0a:3d9:2080:d631:aa74:9313:e9f3? ([2a01:e0a:3d9:2080:d631:aa74:9313:e9f3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4779920f2cdsm154148925e9.10.2025.11.17.06.45.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Nov 2025 06:45:32 -0800 (PST) Message-ID: <168374f9-cf03-481b-b4b2-ed51787a3def@linaro.org> Date: Mon, 17 Nov 2025 15:45:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH v7 0/2] Add support for Gunyah Watchdog To: hrishabh.rajput@oss.qualcomm.com, Bjorn Andersson , Konrad Dybcio , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Pavan Kondeti , Dmitry Baryshkov References: <20251114-gunyah_watchdog-v7-0-f5c155b941d5@oss.qualcomm.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2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BNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20251114-gunyah_watchdog-v7-0-f5c155b941d5@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/14/25 08:57, Hrishabh Rajput via B4 Relay wrote: > Gunyah is a Type-I hypervisor which was introduced in the patch series > [1]. It is an open source hypervisor. The source repo is available at > [2]. > > The Gunyah Hypervisor doesn't allow its Virtual Machines to directly > access the MMIO watchdog. It either provides the fully emulated MMIO > based watchdog interface or the SMC-based watchdog interface depending > on the hypervisor configuration. > The SMC-based watchdog follows ARM's SMC Calling Convention (SMCCC) > version 1.1 and uses Vendor Specific Hypervisor Service Calls space. > > This patch series adds support for the SMC-based watchdog interface > provided by the Gunyah Hypervisor. > > This series is tested on SM8750 platform. > > [1] > https://lore.kernel.org/all/20240222-gunyah-v17-0-1e9da6763d38@quicinc.com/ > > [2] > https://github.com/quic/gunyah-hypervisor > > Signed-off-by: Hrishabh Rajput > --- > Changes in v7: > - Convert local `const` arrays to `static const` to optimize > initialization and stack allocation. > - Link to v6: https://lore.kernel.org/r/20251112-gunyah_watchdog-v6-0-38ad01f8dac0@oss.qualcomm.com > > Changes in v6: > - Fix build issues reported by the kernel test robot on PowerPC and RISC-V > architectures by adding IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY) check > before calling arm_smccc_hypervisor_has_uuid(). > - Link to v5: https://lore.kernel.org/r/20251107-gunyah_watchdog-v5-0-4c6e3fb6eb17@oss.qualcomm.com > > Changes in v5: > - Move the gunyah_wdt device registration from the SMEM driver to the > SCM driver. Add additional logic to check if we're running under the > Gunyah Hypervisor. > - Implement .remove() for gunyah_wdt driver to make it not persistent. > - Link to v4: https://lore.kernel.org/r/20251031-gunyah_watchdog-v4-0-7abb1ee11315@oss.qualcomm.com > > Changes in v4: > - Move the contents of gunyah_wdt_init() to qcom_smem_probe() to make > sure we're registering the watchdog only on the Qualcomm devices. > - Link to v3: https://lore.kernel.org/r/20251028-gunyah_watchdog-v3-1-e6d1ea438b1d@oss.qualcomm.com > > Changes in v3: > - Move back to platform driver model. In module init, determine if we're > running on a Qualcomm device and there is no supported memory-mapped > watchdog present. Then proceed to register platform device and driver > for SMC-based Gunyah watchdog. > - To determine if we're running on a Qualcomm device we're checking the > presence of "qcom,smem" compatible devicetree node. As an alternative, > we also tried using socinfo for the same purpose. When both > gunyah_wdt and socinfo drivers were made built-in, it couldn't be > ensured that the socinfo driver probed successfully before gunyah_wdt > init was called. Hence, we resorted to the devicetree node approach. > - Limit the errors listed in gunyah_error to the ones that can be > produced by the driver. > - Link to v2: https://lore.kernel.org/r/20251006-gunyah_watchdog-v2-1-b99d41d45450@oss.qualcomm.com > > Changes in v2: > - Move away from platform driver model since the devicetree overlay does > not happen by default. > See https://lore.kernel.org/all/91002189-9d9e-48a2-8424-c42705fed3f8@quicinc.com/ > - Only when MMIO-based watchdog device is absent in the devicetree, > proceed to detect SMC-based watchdog using GUNYAH_WDT_STATUS SMC and > initialize if SMC returns success. > - Implement pm notifiers as gunyah_wdt is no longer a platform driver so > dev_pm_ops cannot be used. > - Pretimeout IRQ is no longer supported. > - Remove struct gunyah_wdt since it is not required. > - Move the contents of gunyah_errno.h to gunyah_wdt.c. > - Link to v1: https://lore.kernel.org/r/20250903-gunyah_watchdog-v1-0-3ae690530e4b@oss.qualcomm.com > > --- > Hrishabh Rajput (2): > firmware: qcom: scm: Register gunyah watchdog device > watchdog: Add driver for Gunyah Watchdog > > MAINTAINERS | 1 + > drivers/firmware/qcom/qcom_scm.c | 53 ++++++++ > drivers/watchdog/Kconfig | 13 ++ > drivers/watchdog/Makefile | 1 + > drivers/watchdog/gunyah_wdt.c | 260 +++++++++++++++++++++++++++++++++++++++ > 5 files changed, 328 insertions(+) > --- > base-commit: e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c > change-id: 20250903-gunyah_watchdog-2d2649438e29 > > Best regards, Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: Neil Armstrong # on SM8650-HDK Thanks, Neil