From nobody Sat Apr 18 10:46:40 2026 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 056242D73BD; Sat, 28 Feb 2026 01:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240650; cv=none; b=MsNsFbHRVel8Z0rD20B/pRtBr8XoagENZZLZwkxpl8R0frLZkFO/4BqBiG6ZNg3wd7H6biTmdpXfxstWAuB9H0Vk9OVv7e6+f2UimSle7HSxrqJoZ9JguLJj9o1iCqj5Xvud7grSU2w+95yxnfnr3IVJR1IR+iqexX9RqMCB6eQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240650; c=relaxed/simple; bh=iUtvJwJkLpvlzpAMej+Iu5UtThelJl1DSiHdb8NGr8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V4BGyWG2JVlhKIQ4d0hnwpfoMrfHwoMr1/9aMlQBbbYVpydgUViyIye79a2X+q5MIbhg4md6W+0181UmIJS/CqhsXkQJG5g2tBPvBpbOrJPGTcSmllBHIGXI7D850TMxCkp5rheU/sOi4+3JDGnACq6mZuXpv56Kr6Ghl3vHlBw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=DxsuLAhp; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="DxsuLAhp" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=9OW/nFvTXOKCQg+GiHw9GXlXZyUXAnFEY2zE5a54aGU=; b=DxsuLAhpWJGOk8DgyMAuClUZ33 nFTLxXhxO3xDGqmrdaQz6qDPBLU31YlXW5FGiLF//BT9HaNZoF5sYJCpqi7iKlr3M1KUn8+S+oXuA otRgQti2RioirjgVvipvkZ0FAVvC1Uf9Vf2ZeyaqvQwtFGIGggu8xEd6MP9y0CzEJy0N3ZMsjKY7P vH2Qb3e15SCQu8B1UdboryLF2vRPoIzG/0xWQpdkTlbYyej2jz02JvZ2XyRPMV1d6vL2n6mJC0ZVP unRwZYqi4e+yp130I+WV1LCoWQi4qOSpJq2qQXbFTsa78aw1x1H+f0xTUVh+7EuVz+j43WQgsJlLI K4ux/+nA==; Received: from [50.53.43.113] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw8kW-00000009Mfc-2TZL; Sat, 28 Feb 2026 01:04:04 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jonathan Corbet , Shuah Khan , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 1/5] docs: watchdog: mlx-wdt: small fixes Date: Fri, 27 Feb 2026 17:03:58 -0800 Message-ID: <20260228010402.2389343-2-rdunlap@infradead.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228010402.2389343-1-rdunlap@infradead.org> References: <20260228010402.2389343-1-rdunlap@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Correct some grammar and spelling mistakes in mlx-wdt.rst. Signed-off-by: Randy Dunlap Reviewed-by: Guenter Roeck --- Cc: Jonathan Corbet Cc: Shuah Khan Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/watchdog/mlx-wdt.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20260226.orig/Documentation/watchdog/mlx-wdt.rst +++ linux-next-20260226/Documentation/watchdog/mlx-wdt.rst @@ -28,7 +28,7 @@ Type 3: Same as Type 2 with extended maximum timeout period. Maximum timeout is 65535 sec. =20 -Type 1 HW watchdog implementation exist in old systems and +Type 1 HW watchdog implementation exists in old systems and all new systems have type 2 HW watchdog. Two types of HW implementation have also different register map. =20 @@ -48,7 +48,7 @@ which is optional. Watchdog can be started during a probe, in this case it will be pinged by watchdog core before watchdog device will be opened by user space application. -Watchdog can be initialised in nowayout way, i.e. oncse started +Watchdog can be initialised in nowayout mode, i.e. once started it can't be stopped. =20 This mlx-wdt driver supports both HW watchdog implementations. From nobody Sat Apr 18 10:46:40 2026 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 121EC2D7DC4; Sat, 28 Feb 2026 01:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240649; cv=none; b=GxTRSJXW3/7DIQvYtzNhkWBAh3vJchtK59oA2ntQIi7NAiUC3hLvnovW4WzFgNNvuAe7ttWLwc2P8clFc3ECW91a/O53VfKlhQErNP/DKNZHOj6bbMCtj7RWz/kKa5wNfT+EE64KxppBkUUAGdw8EYZEQPwmhK4Is2mtGwjzFyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240649; c=relaxed/simple; bh=00gRV/8Tlfk0hyLVN6Lg8+CGZQ7yA/JnPgGu9Mh5PLs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zd7+6CU0mV8VTzpeOejaJU8nt/YSvm64CbFUP7Ler1WX+QBFaWS77FC6soUsTuqUqrFEJcn5fp7rDdnoaoSF7NYCebZiL7QnxYjdCHjOvtChE2WcfrasPBSE7kC+J3dzTqIly5aMAFKAkO59gpQhLOhv6RrKQMvP82OohTga1+Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=At/+89gi; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="At/+89gi" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=SNyF0aeqLbp83Ydce9E3N1h+z2UhPlrjyB1V6Oa1nNY=; b=At/+89giSc+y74I6qqfyOC6aut eCa8Q4LEBXGGkDWMgvWt6a85YO3SE0ewI6N44s1gz6vqIWrTzN+JpYtskjwCAgxO9eBq4qgCOxtEn W0+56cn9/BCUg3CT/UBTn4ezplrF7ixX8Wd9kSCzAM41vhxxbhLDxmBQTiXT62jhacJ2oWC6yZHqy RkCDRAAsUzk++6wuopjQWCMz2Yv4dpPvzGZ0BpgqamPiJMYFTbFv3qR77CeU+3/K2mpI4Ga9BQPiP Q40YAdD/0dmrOH3zJjUvWJquiHuhYQOxO4PW8wXelBxqPDTJ+zSa5oEpescrvkDID4doNETglZol9 qNJn46ig==; Received: from [50.53.43.113] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw8kX-00000009Mfc-0CZ1; Sat, 28 Feb 2026 01:04:05 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jonathan Corbet , Shuah Khan , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 2/5] docs: watchdog: pcwd: fix typo and driver info. Date: Fri, 27 Feb 2026 17:03:59 -0800 Message-ID: <20260228010402.2389343-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228010402.2389343-1-rdunlap@infradead.org> References: <20260228010402.2389343-1-rdunlap@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Correct a typo and some technical info for the pcwd driver. Signed-off-by: Randy Dunlap Reviewed-by: Guenter Roeck --- Cc: Jonathan Corbet Cc: Shuah Khan Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/watchdog/pcwd-watchdog.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) --- linux-next-20260226.orig/Documentation/watchdog/pcwd-watchdog.rst +++ linux-next-20260226/Documentation/watchdog/pcwd-watchdog.rst @@ -29,7 +29,7 @@ Documentation and Driver by Ken Hollis < to run the program with an "&" to run it in the background!) =20 If you want to write a program to be compatible with the PC Watchdog - driver, simply use of modify the watchdog test program: + driver, simply use or modify the watchdog test program: tools/testing/selftests/watchdog/watchdog-test.c =20 =20 @@ -37,16 +37,23 @@ Documentation and Driver by Ken Hollis < =20 WDIOC_GETSUPPORT This returns the support of the card itself. This - returns in structure "PCWDS" which returns: + returns in structure watchdog_info: + + identity =3D "PCWD" + + options =3D list of supported options:: + WDIOF_OVERHEAT + WDIOF_CARDRESET + WDIOF_KEEPALIVEPING + WDIOF_SETTIMEOUT + WDIOF_MAGICCLOSE =20 - options =3D WDIOS_TEMPPANIC - (This card supports temperature) firmware_version =3D xxxx (Firmware version of the card) =20 WDIOC_GETSTATUS This returns the status of the card, with the bits of - WDIOF_* bitwise-anded into the value. (The comments + WDIOF_* bitwise-ored into the value. (The comments are in include/uapi/linux/watchdog.h) =20 WDIOC_GETBOOTSTATUS @@ -55,7 +62,7 @@ Documentation and Driver by Ken Hollis < =20 WDIOC_GETTEMP This returns the temperature of the card. (You can also - read /dev/watchdog, which gives a temperature update + read /dev/temperature, which gives a temperature update every second.) =20 WDIOC_SETOPTIONS From nobody Sat Apr 18 10:46:40 2026 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1FE932D839B; Sat, 28 Feb 2026 01:04:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240649; cv=none; b=cnk0csbpdODQUUXb/TLKfCeoOfGnR6V+ctJdr8Ra2Yt8UGR2kA7nz2Uv8yA3gxckmufdRelS23dAW5IfHTs9L1v8WY4PSPzwQt0YGvY1lLI4CKu+1nHL9VurngDyj6J/hijM934Tcht+CWeHFOh25CcImSFl75kPYzPXqaC0DOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240649; c=relaxed/simple; bh=rY4IlC/9+j7O1q//Be/27tic1bY/AHdhYFEJ2X/S5UI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CYTYxHW+j/2yovBVm+fT2QJAfBPRYtHZ797Kc4BBNm/79onwUtj/POPEaol2XE2TztFG4xMebVRsoeMyNHtA3dUz8lzgt7P2uAcUJtsTWHINLFgW7r7xgbypPipFNH23M/T9u/myzydA7vIdcyyPhmccqQGU3BcobwUqELYGre4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=MC49xDum; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="MC49xDum" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Ncg1Cg97cuYjXJjxmO2TWQjS13k8RVZHQbLYYSs/J+4=; b=MC49xDumiGwUs5ozIxAvQqHW9e GzEnUa/w/LRwF2LVPvzF+KLStY3sCztMiNFAZxjMAV0IeUJ8JyibpNWfFe5OfoEwkWG+9f4sG7SLL v10Q/LU2gzTyxbddBN8Y0mHjoIRcvoCT9cuDKHBJFPL+eqEA4ABh+vjQ4ZtMYM9EkwTd8Ibvjj3Wg JIY/FhxwklxjsWN3eHnEZVZGZ9wmCNIqmE5JOte3q8ZYT+E5L4ACnkTbVnrzxUNTlrc6Jl/Vwc9E+ l4km+Ma71I5pxOV/8dXNkW8dVWWrCckeuG9R1fuJpLKzxtukxkk1JuZhmhwvZW5kldbKhbU6qIv58 wxxxLopA==; Received: from [50.53.43.113] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw8kX-00000009Mfc-2BMW; Sat, 28 Feb 2026 01:04:05 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jonathan Corbet , Shuah Khan , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 3/5] docs: watchdog-api: general cleaning Date: Fri, 27 Feb 2026 17:04:00 -0800 Message-ID: <20260228010402.2389343-4-rdunlap@infradead.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228010402.2389343-1-rdunlap@infradead.org> References: <20260228010402.2389343-1-rdunlap@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Correct some grammar, punctuation, and capitalization mistakes. Drop extra words in printf() calls [likely a copy-paste error]. Signed-off-by: Randy Dunlap Reviewed-by: Guenter Roeck --- Cc: Jonathan Corbet Cc: Shuah Khan Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/watchdog/watchdog-api.rst | 38 +++++++++++----------- 1 file changed, 20 insertions(+), 18 deletions(-) --- linux-next-20260226.orig/Documentation/watchdog/watchdog-api.rst +++ linux-next-20260226/Documentation/watchdog/watchdog-api.rst @@ -39,12 +39,12 @@ The simplest API =20 All drivers support the basic mode of operation, where the watchdog activates as soon as /dev/watchdog is opened and will reboot unless -the watchdog is pinged within a certain time, this time is called the +the watchdog is pinged within a certain time; this time is called the timeout or margin. The simplest way to ping the watchdog is to write some data to the device. So a very simple watchdog daemon would look like this source file: see samples/watchdog/watchdog-simple.c =20 -A more advanced driver could for example check that a HTTP server is +A more advanced driver could for example check that an HTTP server is still responding before doing the write call to ping the watchdog. =20 When the device is closed, the watchdog is disabled, unless the "Magic @@ -87,13 +87,13 @@ replaced with:: sleep(10); } =20 -the argument to the ioctl is ignored. +The argument to the ioctl is ignored. =20 Setting and getting the timeout =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =20 For some drivers it is possible to modify the watchdog timeout on the -fly with the SETTIMEOUT ioctl, those drivers have the WDIOF_SETTIMEOUT +fly with the SETTIMEOUT ioctl; those drivers have the WDIOF_SETTIMEOUT flag set in their option field. The argument is an integer representing the timeout in seconds. The driver returns the real timeout used in the same variable, and this timeout might differ from @@ -110,7 +110,7 @@ Starting with the Linux 2.4.18 kernel, i current timeout using the GETTIMEOUT ioctl:: =20 ioctl(fd, WDIOC_GETTIMEOUT, &timeout); - printf("The timeout was is %d seconds\n", timeout); + printf("The timeout is %d seconds\n", timeout); =20 Pretimeouts =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -133,7 +133,7 @@ seconds. Setting a pretimeout to zero d There is also a get function for getting the pretimeout:: =20 ioctl(fd, WDIOC_GETPRETIMEOUT, &timeout); - printf("The pretimeout was is %d seconds\n", timeout); + printf("The pretimeout is %d seconds\n", timeout); =20 Not all watchdog drivers will support a pretimeout. =20 @@ -145,13 +145,13 @@ before the system will reboot. The WDIOC that returns the number of seconds before reboot:: =20 ioctl(fd, WDIOC_GETTIMELEFT, &timeleft); - printf("The timeout was is %d seconds\n", timeleft); + printf("The timeout is %d seconds\n", timeleft); =20 Environmental monitoring =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -All watchdog drivers are required return more information about the system, -some do temperature, fan and power level monitoring, some can tell you +All watchdog drivers are required to return more information about the sys= tem. +Some do temperature, fan and power level monitoring; some can tell you the reason for the last reboot of the system. The GETSUPPORT ioctl is available to ask what the device can do:: =20 @@ -166,7 +166,7 @@ the fields returned in the ident struct options a flags describing what the device supports =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -the options field can have the following bits set, and describes what +The options field can have the following bits set, and describes what kind of information that the GET_STATUS and GET_BOOT_STATUS ioctls can return. =20 @@ -175,13 +175,13 @@ return. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The machine was last rebooted by the watchdog because the thermal limit was -exceeded: +exceeded. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D WDIOF_FANFAULT Fan failed =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D =20 -A system fan monitored by the watchdog card has failed +A system fan monitored by the watchdog card has failed. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D WDIOF_EXTERN1 External relay 1 @@ -195,26 +195,26 @@ a reset. WDIOF_EXTERN2 External relay 2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =20 -External monitoring relay/source 2 was triggered +External monitoring relay/source 2 was triggered. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D WDIOF_POWERUNDER Power bad/power fault =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The machine is showing an undervoltage status +The machine is showing an undervoltage status. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D WDIOF_CARDRESET Card previously reset the CPU =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The last reboot was caused by the watchdog card +The last reboot was caused by the watchdog card. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D WDIOF_POWEROVER Power over voltage =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The machine is showing an overvoltage status. Note that if one level is -under and one over both bits will be set - this may seem odd but makes +under and one over, both bits will be set - this may seem odd but makes sense. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -227,12 +227,14 @@ The watchdog saw a keepalive ping since WDIOF_SETTIMEOUT Can set/get the timeout =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The watchdog can do pretimeouts. +The watchdog can get/set the timeout. =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D WDIOF_PRETIMEOUT Pretimeout (in seconds), get/set =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 +The watchdog can do pretimeouts. + =20 For those drivers that return any bits set in the option field, the GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current @@ -255,7 +257,7 @@ returned value is the temperature in deg ioctl(fd, WDIOC_GETTEMP, &temperature); =20 Finally the SETOPTIONS ioctl can be used to control some aspects of -the cards operation:: +the card's operation:: =20 int options =3D 0; ioctl(fd, WDIOC_SETOPTIONS, &options); From nobody Sat Apr 18 10:46:40 2026 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E5E3B2D73A6; Sat, 28 Feb 2026 01:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240651; cv=none; b=Q0Zp7xLN2Hq+FUTqRzsVjvbogrfPk+oQdkQP/e+wpeYCPeIfVOxxDAQhjI0Z0pQS7ERzcDMfR+Kt7DhX40zDV+qOlcDZyaaksLYb/DXj9dO8jN/VP2sQL6qBbHGsDSDprK6/neVlOu5w+ewtKFVble9LA7tf36fwtQU87yUvtr0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240651; c=relaxed/simple; bh=tVLggoFebkAfNnxYS6zfQPUr+0g4pFS4bcnkv/JVsn4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gcRfMC4h50JDP9w6u5LaUAomfa91I6S+wkQZ+sqEdXSflhybQjYhC9A4A3nrBPn8s5WfaNhREGzBn4gN7RbHyAHoWfwYkxiaRcidmxMedp2BUd/nva2szI8k5t+2I9RP39MUlIMr8yJwnhqq1VDFv8Q8njB7Iil+m5HXiK2umAI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=R38aaFnB; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="R38aaFnB" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Zjq6BXTlTfUUfVB5XqyRQcickx/QeCRPF4dFlky672A=; b=R38aaFnB9f7PbJgiEqWP7vi4DV BPfgAlanrCBvWLs18XiSHN8Sne11WYBBkGy6aYdXoCR9Py3Cd+lu6Y2G65qkE57v3JZMi+80NRvTh NHcR+FmhPZ9ojhsOSeHDdOCJ95CQwlMJTj+o0i2RUHk60JAYcfSlnMAnX/AJZtJ+v4TKTYAB6eg7t cAqTFfUvUEzFRUih4ZrvPiqZNBN/6E82hSDQ0uaG/Rrf6He6n31NES3RmnA8Ssb3FLEHyVF/ru5Do n+tsU+NW7820ZFT3JEwhiNTSQSDOxrM0H2Yar96bxZgUmzLmTxHJ/rUuMHM3YZ//nq17ponvDigq5 Ig8Wd5ww==; Received: from [50.53.43.113] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw8kX-00000009Mfc-48TV; Sat, 28 Feb 2026 01:04:06 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jonathan Corbet , Shuah Khan , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 4/5] docs: watchdog-kernel-api: general cleanups Date: Fri, 27 Feb 2026 17:04:01 -0800 Message-ID: <20260228010402.2389343-5-rdunlap@infradead.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228010402.2389343-1-rdunlap@infradead.org> References: <20260228010402.2389343-1-rdunlap@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix grammar and punctuation. Add a missing struct member (pm_nb) and its description. Add a subheading for Helper Functions between the struct descriptions and just pure helper functions. Signed-off-by: Randy Dunlap Reviewed-by: Guenter Roeck --- Cc: Jonathan Corbet Cc: Shuah Khan Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/watchdog/watchdog-kernel-api.rst | 20 +++++++++------ 1 file changed, 13 insertions(+), 7 deletions(-) --- linux-next-20260226.orig/Documentation/watchdog/watchdog-kernel-api.rst +++ linux-next-20260226/Documentation/watchdog/watchdog-kernel-api.rst @@ -38,8 +38,8 @@ The watchdog_unregister_device routine d device. The parameter of this routine is the pointer to the registered watchdog_device structure. =20 -The watchdog subsystem includes an registration deferral mechanism, -which allows you to register an watchdog as early as you wish during +The watchdog subsystem includes a registration deferral mechanism, +which allows you to register a watchdog as early as you wish during the boot process. =20 The watchdog device structure looks like this:: @@ -60,13 +60,14 @@ The watchdog device structure looks like unsigned int max_hw_heartbeat_ms; struct notifier_block reboot_nb; struct notifier_block restart_nb; + struct notifier_block pm_nb; void *driver_data; struct watchdog_core_data *wd_data; unsigned long status; struct list_head deferred; }; =20 -It contains following fields: +It contains the following fields: =20 * id: set by watchdog_register_device, id 0 is special. It has both a /dev/watchdog0 cdev (dynamic major, minor 0) as well as the old @@ -105,6 +106,8 @@ It contains following fields: internal use only. If a watchdog is capable of restarting the machine, it should define ops->restart. Priority can be changed through watchdog_set_restart_priority. +* pm_nb: coordinates watchdog_dev_suspend/resume to cancel a ping worker + during suspend and restore it during resume. * bootstatus: status of the device after booting (reported with watchdog WDIOF_* status bits). * driver_data: a pointer to the drivers private data of a watchdog device. @@ -204,7 +207,7 @@ they are supported. These optional routi If the watchdog driver does not have to perform any action but setting t= he watchdog_device.timeout, this callback can be omitted. =20 - If set_timeout is not provided but, WDIOF_SETTIMEOUT is set, the watchdog + If set_timeout is not provided but WDIOF_SETTIMEOUT is set, the watchdog infrastructure updates the timeout value of the watchdog_device internal= ly to the requested value. =20 @@ -220,7 +223,7 @@ they are supported. These optional routi the watchdog". A value of 0 disables pretimeout notification. =20 (Note: the WDIOF_PRETIMEOUT needs to be set in the options field of the - watchdog's info structure). + watchdog's info structure.) =20 If the watchdog driver does not have to perform any action but setting t= he watchdog_device.pretimeout, this callback can be omitted. That means if @@ -239,7 +242,7 @@ they are supported. These optional routi The status bits should (preferably) be set with the set_bit and clear_bit = alike bit-operations. The status bits that are defined are: =20 -* WDOG_ACTIVE: this status bit indicates whether or not a watchdog timer d= evice +* WDOG_ACTIVE: this status bit indicates whether a watchdog timer device is active or not from user perspective. User space is expected to send heartbeat requests to the driver while this flag is set. * WDOG_NO_WAY_OUT: this bit stores the nowayout setting for the watchdog. @@ -254,6 +257,9 @@ bit-operations. The status bits that are then opening /dev/watchdog will skip the start operation but send a keep= alive request instead. =20 +Helper Functions +~~~~~~~~~~~~~~~~ + To set the WDOG_NO_WAY_OUT status bit (before registering your watchdog timer device) you can either: =20 @@ -331,7 +337,7 @@ To raise a pretimeout notification, the void watchdog_notify_pretimeout(struct watchdog_device *wdd) =20 The function can be called in the interrupt context. If watchdog pretimeout -governor framework (kbuild CONFIG_WATCHDOG_PRETIMEOUT_GOV symbol) is enabl= ed, +governor framework (kconfig CONFIG_WATCHDOG_PRETIMEOUT_GOV symbol) is enab= led, an action is taken by a preconfigured pretimeout governor preassigned to the watchdog device. If watchdog pretimeout governor framework is not enabled, watchdog_notify_pretimeout() prints a notification message to From nobody Sat Apr 18 10:46:40 2026 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 418472DF6F4; Sat, 28 Feb 2026 01:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240653; cv=none; b=cL43ZNzP13hCAmwX0gGo2wQXBqhh7QEhKkTl2ktaYWDnl3DFka2bCkQ5vNv/8MKVTs2DKtOEC6KGyTAe2HXpw3nM+MqCaqa1btV2m9iicGGRcoVVgPk5w1yXLBN+wPTekQkl57BtZ7J8USGVpyiaQfOgMqQkSK1mbEDoV7HU/b0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772240653; c=relaxed/simple; bh=eDJSFA0hcMxJDX7BZ2hwPfrQ+U99gfCycDQhSxbLEdc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FZx+yzVYc8xIveN4fkoOw5N+0lPbSX6Htp6DioDIyq0ducNK1tQ1lQleSIOXKP5LUZwsaGYs9azWKlTXrmkV09IB38RbT4jHdKW9lctJ+fMNGArlDiCza/k9ltaWTHLz4qs77y/Y2EEwg50vxponUsAoeeiGhlq1GUZc/vnD1lI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=2rqbyNQC; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="2rqbyNQC" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=4FAnV/x+3yyuJGotzK/5VswQVoGcg5nLdlWFltCHFrU=; b=2rqbyNQCF39YR/9R/1ZbFYUshK TzTv6vgmKGicNLplUWSa/3OdfGm1LQqAF3zh/5WDzqbQuOyJqL7WN/u9gkYyghE7sVDrbp27Gh6FH USz+T4uvJrVNg72uLtKu3qGJbAh3dmXjR7ZYkgDywSivEBpuwDCOC1JsL4loQ4OHv48MohHOAhZoL vg/GzzXSQydjiiMCs1UAcrdNeG5mqIun9BdVRdmZmz0iAwD1e1zB+zM2tyKPH20i/nGk/2SGrBll0 NY1NPNy3JxtF9N0ixqvXKoGDRn5D7z0iV6hLrEtoU37mTHvMDuzNzPNfM+DluCnTtMonwv/jZ5a1M 8h5O/50w==; Received: from [50.53.43.113] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw8kY-00000009Mfc-25uG; Sat, 28 Feb 2026 01:04:08 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Jonathan Corbet , Shuah Khan , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH 5/5] docs: watchdog-parameters: add missing watchdog_core parameters Date: Fri, 27 Feb 2026 17:04:02 -0800 Message-ID: <20260228010402.2389343-6-rdunlap@infradead.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228010402.2389343-1-rdunlap@infradead.org> References: <20260228010402.2389343-1-rdunlap@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add missing watchdog_core parameters (handle_boot_enabled and stop_on_reboot). Add default values for handle_boot_enabled and open_timeout. Signed-off-by: Randy Dunlap Reviewed-by: Guenter Roeck --- Cc: Jonathan Corbet Cc: Shuah Khan Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Cc: linux-doc@vger.kernel.org Documentation/watchdog/watchdog-parameters.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- linux-next-20260227.orig/Documentation/watchdog/watchdog-parameters.rst +++ linux-next-20260227/Documentation/watchdog/watchdog-parameters.rst @@ -14,13 +14,22 @@ modules. ------------------------------------------------- =20 watchdog core: + handle_boot_enabled: + Watchdog core auto-updates boot-enabled watchdogs before userspace + takes over. Default is set by the kconfig option + CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED. + open_timeout: Maximum time, in seconds, for which the watchdog framework will take care of pinging a running hardware watchdog until userspace opens the corresponding /dev/watchdogN device. A value of 0 means an infinite timeout. Setting this to a non-zero value can be useful to ensure that either userspace comes up properly, or the board gets reset and allows - fallback logic in the bootloader to try something else. + fallback logic in the bootloader to try something else. Default is set + by the kconfig option CONFIG_WATCHDOG_OPEN_TIMEOUT. + + stop_on_reboot: + Stops watchdogs on reboot (0 =3D keep watching, 1 =3D stop). =20 -------------------------------------------------