From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 0EF707082D for ; Mon, 17 Nov 2025 14:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763390737; cv=none; b=AM+CZenZUbrOcjDULPCNd959QsP8WtBbuCp+qgaBge5iFGgE4vG+VPbkicuXukINZDfKyQbVS9qMiCFqq/3+ECKU1M5GYMFw27mVIKIlt4r467TwUgcggZ5EhiBc40QkdMHRS9EFH0ac/dN1CBPm3I8XdsOQQnTqW1PAV7U5qZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763390737; c=relaxed/simple; bh=Q6zm4hF/iuyshuI8ZTVRPYLVS9bhIMvZAtEoGBwphH8=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=FUvggTyPh8jR8TuiCLt7NKulUYB38fOqc1RdLdUeM4IENAFAk14LTu9J6XCGWApnQqMzeUqCPv12UkJgs5ECPESI7GscAUqJGYhZYaIHWaAb6yyM4di4I4ebN19zduyXih5g2AMpiJg1E59/d59fcjJLQ1T6GshJzYFbdWyfsxo= 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.46 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-f46.google.com with SMTP id 5b1f17b1804b1-4775638d819so25327655e9.1 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=S9mHjLIEJlmCF+vIX2q2yEcL/sLTzP6lXykTJWzu8vLfdmfG5K/rtobGCFu4KnsHC/ CRrUQx8fSJn6FPNxjt2RTxNArh1hSNyHkk5H1MLXRNLV4ZGMTUYjpDxI1xfx+oTAatSb JqUcnMTz5JUKJyk5oRA+rrMdGOy/2bc3sml1U8txx+stH9piyp6u+LZEFIsib5nmXp9O VuMM/nNcJHHObgucWMFnhwBV+2rP+v/AiczwSGnAAlmIrqdX/0++w26rQhi99IPmdhkI mzRHdj78EaK+mjYGsExvulwzjEZvUs2vdthQ6x1oCusWwfsAg3bt3oiY/4Aw1gGt2yPo Uy3w== X-Forwarded-Encrypted: i=1; AJvYcCXH+1W789wQ69T46B0+9gWoA93PYGR93Mv3UY29dsbjGWoqmf6agNmKy05UQdgeiu0kdyvBMW8sgjq4@vger.kernel.org X-Gm-Message-State: AOJu0YzcXNpJNDR4IctiMho3BoIXm+yzdPLc2UjVhALHWzDijdnrk8lZ ThFXrAiEKiiGl+fA2UHwGSWf6vDZh/h57cZAQd6KXanBb/x2GxDob6YuZh7R7gR3WG4= X-Gm-Gg: ASbGncth2Cxy7T2bbWfRxru4a6j6UBP0za/WwMaV9Kazzg7d7S2fvt3/f22XzVUvn4s azNXhnVEKD6MvOWxVsmy3oZ5c9LKXSaK2/WJIBkI/tgL04L+y1kuLVjXxZmP/21kzSAcvSl25n6 5L6xX4JmG138LjwL89uIqr5xOSVa3OHmPMT5j83hdCY/HMCAEmaLj/TudgJKUhTAVG0tZLeanbx eAD9fhaHGanY0dtLuzNM/BKvxC1pGt5QmdUvnN61O1mECmab9KBjfeQ3sah3mQxyEUL7SpwFr/8 nsuNZHf6JOViFmihKgWhJfZDj3F00rZoqduqHXpje/3kuiTd5NOM/vI7TzF06F23qhbeDngwYZv bfsetPpXOBFHApa+kJ1D3lspUSCaW32uaY9hN55OIM1TrllplQqNv1mOmc2NbfyycNisqXdMGox 8DD4+7hnHParv/1uVK4VsxPNv0OYWRHms5zxGXsDAWa8JAT0TL7p/dxm+5896FGn8= X-Google-Smtp-Source: AGHT+IGlg72HMQBd44oB2inZGPtEY6S/5RoSqJOOvYSdU1XD8940TN5ihG3EtEkhqdXoOuWUP9+0Hw== 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: devicetree@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/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa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m+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