From patchwork Fri Nov 3 23:34:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 161471 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1370654vqu; Fri, 3 Nov 2023 16:37:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwKGjPhjE+umUKkPvfvunAdUtPrFqPwSWos9J1Nk29d0kvuWLoJHKB0EBUQ8akp7zgOYnJ X-Received: by 2002:a17:902:da8d:b0:1cc:548d:423b with SMTP id j13-20020a170902da8d00b001cc548d423bmr16872645plx.60.1699054633903; Fri, 03 Nov 2023 16:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699054633; cv=none; d=google.com; s=arc-20160816; b=0wYENt/Y2RHCYc54HBXGTPdKVghAbYrbV2jWZqbhU9W4ULyrOuLMxkJN/rBkWZL5Jy UqFqVZplwKuo/C6GFMgkmqPkwJRQrdckE5HHZbG6VOfj+5u/9ohKn78euo877gQMRcX3 L0ykjmJZycykntUV9qQdcThczqYrl6fJeIdZI526zv3iF+uS3hWG2s2RcOlnSDTlqCEl IQilRe3q4G2ozujAS016k3grPAcoGpbYvq3ZV0vundHUAJpzld4v4/Z6Rk7JCq183/uL RasKE558ZS/zLYyehIcJ9oPpiLjT1RTgO2egbl0uDwLPQ/6Xty8aVLcPK+zC1o4Yk7gi feYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VSqLYgRbivKKnYF2aYcQthhro+1b5nXgEwvXxzPNrJI=; fh=w1m41M6Oo6R5jm2cwL65tZjZIJtkiwsobqL3AFuDOIs=; b=oO1AICHBrMG1k/XdQHK41Rc3XMBFEeBm4YT3l2rtMcW0S8eBOvi9amsgiutDiANMRA VHIr6KE5thGAdy5ra4T2W0pkCa3Nz7Hwnmav4hbOL+uuurfAJak8D/tdSd/rxoN8T9on GctKRkyVLYYzGsOqVJSt54bATjzgdsKWsVTgAGjHl1D4bbOGZFj1ua5serpB39QaPlp3 KBcVwLxVIv6RPS+nJ7L1NBhzB1Z15MmfBI1QJ0SjagwFKyPev19ZFhoKHy+c58boXCfD s5BKYQeAzCJHWkuLhD1eVZ5i66H88VRPYYoKcePk3Wci3XQdfntOWGkjdXLFSciN9LOt gEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Xpudmcym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id kx5-20020a170902f94500b001bb20380bf9si2362985plb.545.2023.11.03.16.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 16:37:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Xpudmcym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B240180968A0; Fri, 3 Nov 2023 16:36:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbjKCXft (ORCPT + 35 others); Fri, 3 Nov 2023 19:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjKCXfs (ORCPT ); Fri, 3 Nov 2023 19:35:48 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA558E3 for ; Fri, 3 Nov 2023 16:35:45 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso2532615b3a.2 for ; Fri, 03 Nov 2023 16:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699054545; x=1699659345; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VSqLYgRbivKKnYF2aYcQthhro+1b5nXgEwvXxzPNrJI=; b=Xpudmcym95weo5RMydYrt3wBcmheGvdph6nKmkUnU/Ms2To1kqu9g6HiijwWWmWO3r MHjQ5cT0Ea3uTmQb71ASJVsSO+cZKzi+o+rOoZ2ZIE+P9A0qtXsuK2z6HSsPkpdNntl7 NrikQ6u03vqSS2PDSTs0Q3T1b5jmFyajs/1Dc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699054545; x=1699659345; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VSqLYgRbivKKnYF2aYcQthhro+1b5nXgEwvXxzPNrJI=; b=N/Pe4wrGDZL+MoWjJpFG6FLGRjV/Tm8wyn7vstrOYj5v2ZMPTjK+/18lTio7Sb+GSJ p4KDP+CboYrNGZ+zIEJZvR8yN4lsxjBzUmOmHDUc8ltVrPIrvKQ/3XUIRPnbOoEhZwKy FKnePGt7aa1IxoQuf8IwkMtAh3p4AOYYisEONajIOWI8SZq7LhsZRV7gMu/0p5dbIQwO RwB91W0wrWtNi1kbp1MpSmffr1hC/vR1JCZ/UwjKoKdnadQLPZuyYsGDa+LjjZucE+S8 1xEZmCepHIQwugnXh7NhCyeENif+PrDuXDKJef/n6kEnGwXB49ZFj/m0zAiJpwXFVj3q IrXA== X-Gm-Message-State: AOJu0YyMGsMkSbxX4w17WzmS7Pk2CL9Nj+ca4VwyVuZv5H8o56UVapdY r6ELK7u/PO7Uq96PlIaFGJ4ZXA== X-Received: by 2002:a05:6a20:938e:b0:180:7df:76a4 with SMTP id x14-20020a056a20938e00b0018007df76a4mr19623287pzh.45.1699054545136; Fri, 03 Nov 2023 16:35:45 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:5195:5e72:f5bb:e3f0]) by smtp.gmail.com with ESMTPSA id jg5-20020a17090326c500b001b8b2a6c4a4sm1878114plb.172.2023.11.03.16.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 16:35:44 -0700 (PDT) From: Douglas Anderson To: Bjorn Andersson , Konrad Dybcio , Krzysztof Kozlowski , Conor Dooley , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rob Herring , Wim Van Sebroeck , swboyd@chromium.org, Douglas Anderson , Andy Gross , "Guilherme G. Piccoli" , Kees Cook , Sai Prakash Ranjan , Tony Luck , cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered Date: Fri, 3 Nov 2023 16:34:27 -0700 Message-ID: <20231103163434.1.Ic7577567baff921347d423b722de8b857602efb1@changeid> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog MIME-Version: 1.0 X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 16:36:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781587911627612090 X-GMAIL-MSGID: 1781587911627612090 On sc7180 when the watchdog timer fires your logs get filled with: watchdog0: pretimeout event watchdog0: pretimeout event watchdog0: pretimeout event ... watchdog0: pretimeout event If you're using console-ramoops to debug crashes the above gets quite annoying since it blows away any other log messages that might have been there. The issue is that the "bark" interrupt (AKA the "pretimeout" interrupt) remains high until the watchdog is pet. Since we've got things configured as "level" triggered we'll keep getting interrupted over and over. Let's switch to edge triggered. Now we'll get one interrupt when the "bark" interrupt goes off we'll get one interrupt and won't get another one until the "bark" interrupt is cleared and asserts again. This matches how many older Qualcomm SoCs have things configured. Fixes: 28cc13e4060c ("arm64: dts: qcom: sc7180: Add watchdog bark interrupt") Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 11f353d416b4..c0365832c315 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -3576,7 +3576,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sc7180", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = ; + interrupts = ; }; timer@17c20000 {