2023-11-06 22:45:07

by Doug Anderson

[permalink] [raw]
Subject: [PATCH v2 1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered

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 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")
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
---

Changes in v2:
- Fixed typo in commit message.

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 = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};

timer@17c20000 {
--
2.42.0.869.gea05f2083d-goog


2023-11-06 22:45:41

by Doug Anderson

[permalink] [raw]
Subject: [PATCH v2 7/9] arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered

As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
interrupt should be configured as edge triggered. Make the change.

Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
---

(no changes since v1)

arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index cad59af7ccef..b8081513176a 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -4225,7 +4225,7 @@ watchdog@17c10000 {
compatible = "qcom,apss-wdt-sc8280xp", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};

timer@17c20000 {
--
2.42.0.869.gea05f2083d-goog

2023-11-06 22:45:43

by Doug Anderson

[permalink] [raw]
Subject: [PATCH v2 8/9] arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered

As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
interrupt should be configured as edge triggered. Make the change.

Fixes: 5f82b9cda61e ("arm64: dts: qcom: Add SM6350 device tree")
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
---

(no changes since v1)

arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 8fd6f4d03490..6464e144c228 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -2524,7 +2524,7 @@ watchdog@17c10000 {
compatible = "qcom,apss-wdt-sm6350", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};

timer@17c20000 {
--
2.42.0.869.gea05f2083d-goog

2023-11-06 22:46:04

by Doug Anderson

[permalink] [raw]
Subject: [PATCH v2 2/9] arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered

As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
interrupt should be configured as edge triggered. Make the change.

Fixes: 0e51f883daa9 ("arm64: dts: qcom: sc7280: Add APSS watchdog node")
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
---

(no changes since v1)

arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 04bf85b0399a..1964ef66492f 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -5389,7 +5389,7 @@ watchdog: watchdog@17c10000 {
compatible = "qcom,apss-wdt-sc7280", "qcom,kpss-wdt";
reg = <0 0x17c10000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
status = "reserved"; /* Owned by Gunyah hyp */
};

--
2.42.0.869.gea05f2083d-goog

2023-11-06 22:46:13

by Doug Anderson

[permalink] [raw]
Subject: [PATCH v2 9/9] dt-bindings: watchdog: qcom-wdt: Make the interrupt example edge triggered

As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
interrupt should be configured as edge triggered.

Update the example in the bindings.

Fixes: 7c631cdff391 ("dt-bindings: watchdog: qcom-wdt: allow interrupts")
Reviewed-by: Guenter Roeck <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
---

(no changes since v1)

Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
index 5046dfa55f13..681d1efbaf2f 100644
--- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
@@ -121,7 +121,7 @@ examples:
compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt";
reg = <0x17c10000 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
timeout-sec = <10>;
};

--
2.42.0.869.gea05f2083d-goog

2023-11-16 08:23:22

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH v2 7/9] arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered

On Mon, Nov 06, 2023 at 02:43:34PM -0800, Douglas Anderson wrote:
> As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
> bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
> interrupt should be configured as edge triggered. Make the change.

Please always make sure that the commit message is self-contained, and
especially when you're referring to patch which has not yet been applied
(e.g. consider someone doing git blame on this line some time down the
road).

Johan

2023-12-08 02:53:57

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered


On Mon, 06 Nov 2023 14:43:28 -0800, Douglas Anderson wrote:
> On sc7180 when the watchdog timer fires your logs get filled with:
> watchdog0: pretimeout event
> watchdog0: pretimeout event
> watchdog0: pretimeout event
> ...
> watchdog0: pretimeout event
>
> [...]

Applied, thanks!

[1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered
commit: 7ac90b4cf107a3999b30844d7899e0331686b33b
[2/9] arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered
commit: 6897fac411db7b43243f67d4fd4d3f95abf7f656
[3/9] arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered
commit: 263b348499454f38d36b9442c3cf9279c571bb54
[4/9] arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered
commit: 9204e9a4099212c850e1703c374ef4538080825b
[5/9] arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered
commit: 735d80e2e8e5d073ae8b1fff8b1589ea284aa5af
[6/9] arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered
commit: 48d5cf4772ec6268853158d9ffc54612e988ebe6
[7/9] arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered
commit: 6c4a9c7ea486da490400c84ba2768c90d228c283
[8/9] arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered
commit: 5b84bb2b8d86595544fc8272364b0f1a34b68a4f

Best regards,
--
Bjorn Andersson <[email protected]>

2023-12-08 15:42:37

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH v2 9/9] dt-bindings: watchdog: qcom-wdt: Make the interrupt example edge triggered

Hi,

On Mon, Nov 6, 2023 at 2:44 PM Douglas Anderson <[email protected]> wrote:
>
> As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
> bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
> interrupt should be configured as edge triggered.
>
> Update the example in the bindings.
>
> Fixes: 7c631cdff391 ("dt-bindings: watchdog: qcom-wdt: allow interrupts")
> Reviewed-by: Guenter Roeck <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>
> Reviewed-by: Stephen Boyd <[email protected]>
> Signed-off-by: Douglas Anderson <[email protected]>
> ---
>
> (no changes since v1)
>
> Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

I saw Bjorn landed all of the dts patches from this series but it
looks like the bindings patch got left behind. Anyone want to claim it
for their tree, or Ack it saying that you'd prefer for it to go
through someone else's tree? I assume Krzysztof's Ack means he's not
intending for it to go through the DT tree and Bjorn doesn't seem to
intend for it to go through the Qualcomm tree. Guenter/Wim: it feels
like this could go in the watchdog tree?

Thanks!

-Doug

2023-12-17 15:51:11

by Wim Van Sebroeck

[permalink] [raw]
Subject: Re: [PATCH v2 9/9] dt-bindings: watchdog: qcom-wdt: Make the interrupt example edge triggered

Hi Doug,

> Hi,
>
> On Mon, Nov 6, 2023 at 2:44 PM Douglas Anderson <[email protected]> wrote:
> >
> > As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog
> > bark interrupt edge triggered"), the Qualcomm watchdog timer's bark
> > interrupt should be configured as edge triggered.
> >
> > Update the example in the bindings.
> >
> > Fixes: 7c631cdff391 ("dt-bindings: watchdog: qcom-wdt: allow interrupts")
> > Reviewed-by: Guenter Roeck <[email protected]>
> > Acked-by: Krzysztof Kozlowski <[email protected]>
> > Reviewed-by: Stephen Boyd <[email protected]>
> > Signed-off-by: Douglas Anderson <[email protected]>
> > ---
> >
> > (no changes since v1)
> >
> > Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> I saw Bjorn landed all of the dts patches from this series but it
> looks like the bindings patch got left behind. Anyone want to claim it
> for their tree, or Ack it saying that you'd prefer for it to go
> through someone else's tree? I assume Krzysztof's Ack means he's not
> intending for it to go through the DT tree and Bjorn doesn't seem to
> intend for it to go through the Qualcomm tree. Guenter/Wim: it feels
> like this could go in the watchdog tree?

I picked it up in the watchdog tree.

Kind regards,
Wim.