From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 5834B3F8ED8 for ; Thu, 30 Jul 2026 10:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785407481; cv=none; b=FYjwQXgAghjc2oeD/68BEWwTLeeTEKth1isEfHsr9k3WcIfyj0o9u1tVKkq+Kj2O8snHTEs3iMBtQQWDxsuiCLxUTi+J1CXV7ExFd93kx8/19tKr60T09HvGQw8bqcVncd7BlAG+HPr4xoLQSKIctU2vK6yUykVEuVlKcScCwg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785407481; c=relaxed/simple; bh=MkFho+L+7qIi6ClR+NBgfddbQ9MuhqymAihXj6m77qg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VnQaoSndFggwFQDbss1tiez0NzsWQ3r1gyEOzdqO9O72VgVnV9edsLujMgBhZp8b5Rqyz5yEoL+s5xFV2b1iReazjMV6LtCVyIrpRnSB227+2bRuwAclFZtTK2xruCtZqpwKis8oFRBAoaqEK1ndvqGIlrwsRAtHVxqnDDQvD64= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=XJ7TJymY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GAGYu+hX; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="XJ7TJymY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GAGYu+hX" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66UA2fZD735495 for ; Thu, 30 Jul 2026 10:31:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3FqmpIR1hp9650zedC/Cu7xxjGufkMIKEyfbRtcEbtI=; b=XJ7TJymYZTIxb1yQ APCeZ1Nwf6sfl0B294j1PC3xenfdAGPMzTg1oCbkeo8X6i1cERitfxbuHhUKInr6 SPQ3xYd8a7HvKyDxCBLXNSNW3dTFc2av6rxwjiwIZC0Z+hJhVzIo/mr+MdaH/C7R ncnC41eL2vOoQr1Hnrdf9Yv1gxYCn5Ns3tffBX2EhpWX8P6QKZ9Qsf9ERiYG/zrl xXtDz5bR+9RcpkXQ5o+Hm38UQDvu7jKKbOBfXt1vXlORoEA6mxDOsZZPxXWSG5uD DQpvs65a2uopeEbkjh0ZYWAKfB2sIOMpkx+D0+VDUZFG5C0uyPoZEKPYrIoacX/Q zQyl0g== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fr4a2g60v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Jul 2026 10:31:18 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-ca8aee88725so2815904a12.3 for ; Thu, 30 Jul 2026 03:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785407478; x=1786012278; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=3FqmpIR1hp9650zedC/Cu7xxjGufkMIKEyfbRtcEbtI=; b=GAGYu+hXFdsZyJewHlmUAyF3+vG1HdjhWZAEvUGUdmuA1QLDERdgShhEqmBTaxE/7a iQz8XxDojNGh5MFFoo1IwNebIF6Nv9kx2e4m+ZbldPBg1MrPbiVz4plutx9eB+1fW3SK Ah+igm7w0e8BF82E8LmrhGWldn7eJPyjlYUNzNoAR/AA8mtGUR/N3GSUJjs0F8i0T8sS 43vabm806Lpg9jiol+uU4dTMGKszsi8zDtqaiPVOiOK/YB7mIkXp1EhJLi8bFQCFKin8 DVA0wj98++M+4LTYakNfA9d7JD+2WEp7doXnNxlVw5paCyb7G9vqUCu+u3GnlKOuhiDn i1YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785407478; x=1786012278; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3FqmpIR1hp9650zedC/Cu7xxjGufkMIKEyfbRtcEbtI=; b=mZR2zTLCmBnWOS7xEMrM0ZTWoq1TvEgSZyH8thBqAUbdDJjkSaCEPHzuRdFeOmiD6y CRi5roBu88oD+sKie2pryvfwPIvXcQL35Wsk3A4PtW8g5Ro+Dxz9+KwIc+WP2PIsmLSf /+TYb8HhX8glu1mvBeRVVoauf2YEzUsKPShIiIkatwSZBNd8nEUdyNzKLCvPjsivKiVx RfhR3dgo7fu8614uKq3e2ch/xJ8jZkEO4zaCEklNAyne6RQJt3Yk/W6sl/ov7wJudcWl 6hRBx/bmRaKMwcQw3TayzHg1xGHQAvy32wDfJMr9ko+157YbZvgQXU2yocF6Dl/kifl+ Fiug== X-Forwarded-Encrypted: i=1; AHgh+RptPEhJ0U9Mp3FhtxMTyKxltQZui9fcD8Ist+yS46DLb5G/UyrGQbyJgR1KA4yrdbwT4zVHWqe/ond3eQE=@vger.kernel.org X-Gm-Message-State: AOJu0Ywtw5FDqiqc9/qMMy4tt1d+pFDMcQQHE9N1qpJPA72Qf0W359Kg XbbtPeEjbsRKipCpSi4k++9/jJdH12WIOtN7/74I6HeIvt61Ur4hqBlrl7Tny/hi5UvW+SQ0JhF QBW9yPnE3uPb4cKBCYCMqAGPVdZoJYF0UPitzUxt46okG5ZwKMerjY6IpqXhKqLHKPw== X-Gm-Gg: AR+sD11AAwHwsvxMiVH9Bpn7Aj5B8A1ZIP9r3sfEUY49xqxxBv8leSDHQNQhF2AF571 L86s8CmtUsJ8IvVdN3R3yjOk/5qlr90gLFllH8rdSvsVCC3gAAg9vBtwn1boAiefvboCBf4mnCV KB0QPc5fFA5UWOclt+Y0vcVB9e51j+OsxdedJgAqYesruwCrhxPmDqsUliZ1809d9073OOpB5wc 7+EQP9FzwgOWHlRh3rIQAwfhWK7i60gDSxEG/2Gkv7ASuxILw6sKEV5dYwwTYaxdj3Cg3TQAv3S /aKuFAKxNn6e2yQ/sDiXyuilbf2UtJzi6nAOzxrXoc1ZNSz8AwGFv1PP6dZ9zjRxWlGKKDuEmZq Va7x1kE5vdX9IMZ35PFuW6rJZ7r/MXCQ= X-Received: by 2002:a05:6a20:d49b:b0:3b3:1c7b:ffb with SMTP id adf61e73a8af0-3c90057a0damr1917887637.34.1785407477720; Thu, 30 Jul 2026 03:31:17 -0700 (PDT) X-Received: by 2002:a05:6a20:d49b:b0:3b3:1c7b:ffb with SMTP id adf61e73a8af0-3c90057a0damr1917858637.34.1785407477220; Thu, 30 Jul 2026 03:31:17 -0700 (PDT) Received: from [10.218.33.235] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cbdba3518e1sm2024080a12.16.2026.07.30.03.31.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jul 2026 03:31:16 -0700 (PDT) Message-ID: <1fdb31e8-e6a3-47b8-a021-bf05cd61848e@oss.qualcomm.com> Date: Thu, 30 Jul 2026 16:01:07 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] watchdog: pretimeout: record PSC reason on watchdog pretimeout To: Guenter Roeck , Sebastian Reichel , Wim Van Sebroeck , Benson Leung , Tzung-Bi Shih , Oleksij Rempel , Srinivas Kandagatla , Daniel Lezcano Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-msm@vger.org, kernel@pengutronix.de, Liam Girdwood , Mark Brown , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba , =?UTF-8?Q?S=C3=B8ren_Andersen?= , Guenter Roeck , Matti Vaittinen , Ahmad Fatoum , Andrew Morton , avaneesh.dwivedi@oss.qualcomm.com, Umang Chheda , linux-arm-msm@vger.kernel.org References: <20260722-pscrr-reboot-reason-v2-0-495ba3005953@oss.qualcomm.com> <20260722-pscrr-reboot-reason-v2-3-495ba3005953@oss.qualcomm.com> Content-Language: en-US From: Faruque Ansari In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: V9Z55nApdGSgOR3sBs-KcgJJmD7g1K_C X-Proofpoint-ORIG-GUID: V9Z55nApdGSgOR3sBs-KcgJJmD7g1K_C X-Authority-Analysis: v=2.4 cv=IoIutr/g c=1 sm=1 tr=0 ts=6a6b27f6 cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=hzOxsa2yftWTDtbb7UEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzMwMDA3OCBTYWx0ZWRfX1dyNiEQJ6Dwi RkMOZU8XGS0KoCfBAEtYMWrNRiTdFiC37oIGjJXmAhnqPUHxyK+6NXbLZycGna3nAYDP+MuADxI tKNSYIaOC8z4k6ufTwVdD0q+1Iz/zRQIjzxyJ05VaDyNVTSbL1wBwv2d5z55IORu6o6CApCy98Z Gf10Lh9mmXVfo79xss5H/ccmFh/E6QKoxIzk5Plc+SUBJxGC9vpizVEOmWql5LScB4k0/rpxuaL oMkjPbm4miCgbrbD6ZzAcFEf51SdmtFTsfodK95mc95IdnTDL55c21tqftzVMz4sUQWPiFhEPn+ HYh7rm2opp0mr4vl1S+3MOe2LOwqgonXatrDlGEeQRtSQaJV0SPfLA7V9EvLr+CVPfQY4Wi6l+7 P/97C0m2UqVrYHT5BxY4eacUzEBI2Dfx+AhWMmAc14skwJAwZ3hS7S0CegsrMcvjDyd4eXSa26p MqGk7Jl5IvgLrz1seGQ== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzMwMDA3OCBTYWx0ZWRfX93ms/LSJnQ9L 0sMrk+R582rrKKDulYo7fWweXn9bwU0Tz3w2myxeEoIR1DAsgLu5iQDTunE6yY0Pz2RQ2XIochQ L5uljFgBH47GT0m9u9uSP0Blf40aWeU= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-30_03,2026-07-29_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607300078 Hi Guenter, On 30-Jul-26 10:33 AM, Guenter Roeck wrote: > On 7/22/26 08:13, Faruque Ansari wrote: >> Update the PSC reset reason by invoking >> set_psc_reason(PSCR_WATCHDOG_PRETIMEOUT) >> from watchdog_notify_pretimeout() before either the panic or >> noop governor >> runs, so the reset cause is committed to persistent storage >> before the >> system goes down. >> >> Signed-off-by: Faruque Ansari >> --- >>   drivers/watchdog/watchdog_pretimeout.c | 3 +++ >>   1 file changed, 3 insertions(+) >> >> diff --git a/drivers/watchdog/watchdog_pretimeout.c b/drivers/ >> watchdog/watchdog_pretimeout.c >> index 02e09b9e396d..ea48d4eca4aa 100644 >> --- a/drivers/watchdog/watchdog_pretimeout.c >> +++ b/drivers/watchdog/watchdog_pretimeout.c >> @@ -4,6 +4,7 @@ >>    */ >>   #include >> +#include >>   #include >>   #include >>   #include >> @@ -103,6 +104,8 @@ void watchdog_notify_pretimeout(struct >> watchdog_device *wdd) >>   { >>       unsigned long flags; >> +    set_psc_reason(PSCR_WATCHDOG_PRETIMEOUT); >> + > > A call to watchdog_notify_pretimeout() does not necessarily reset > the system. > It only resets the system if the panic governor is active. Given > that, > I think this is a bit misleading. If the "noop" governor is > active and the > system crashes later due to a completely unrelated panic, the > restart reason > will be wrongly logged as pretimeout. > Thanks for reviewing. I agree. My intention was to handle both governors through the common pretimeout path. However, with the "noop" governor the recorded reason may be misleading since the system can continue running. I'll move the recording to the panic governor path in the next version. Thanks, Faruque Ansari