2023-11-03 23:36:38

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 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 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 <[email protected]>
---

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-03 23:36:40

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 5/9] arm64: dts: qcom: sm8250: 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: 46a4359f9156 ("arm64: dts: qcom: sm8250: Add watchdog bark interrupt")
Signed-off-by: Douglas Anderson <[email protected]>
---

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

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index be970472f6c4..72db75ca7731 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -6018,7 +6018,7 @@ watchdog@17c10000 {
compatible = "qcom,apss-wdt-sm8250", "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-03 23:37:18

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 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")
Signed-off-by: Douglas Anderson <[email protected]>
---

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-03 23:37:41

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 4/9] arm64: dts: qcom: sm8150: 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: b094c8f8dd2a ("arm64: dts: qcom: sm8150: Add watchdog bark interrupt")
Signed-off-by: Douglas Anderson <[email protected]>
---

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

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 97623af13464..ad4fab61222b 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -4170,7 +4170,7 @@ watchdog@17c10000 {
compatible = "qcom,apss-wdt-sm8150", "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-03 23:38:31

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 3/9] arm64: dts: qcom: sdm845: 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: 36c436b03c58 ("arm64: dts: qcom: sdm845: Add watchdog bark interrupt")
Signed-off-by: Douglas Anderson <[email protected]>
---

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

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index bf5e6eb9d313..9648505644ff 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -5088,7 +5088,7 @@ watchdog@17980000 {
compatible = "qcom,apss-wdt-sdm845", "qcom,kpss-wdt";
reg = <0 0x17980000 0 0x1000>;
clocks = <&sleep_clk>;
- interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
};

apss_shared: mailbox@17990000 {
--
2.42.0.869.gea05f2083d-goog

2023-11-03 23:38:32

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 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")
Signed-off-by: Douglas Anderson <[email protected]>
---

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-03 23:38:32

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 6/9] arm64: dts: qcom: sa8775p: 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: 09b701b89a76 ("arm64: dts: qcom: sa8775p: add the watchdog node")
Signed-off-by: Douglas Anderson <[email protected]>
---

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

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

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

2023-11-03 23:38:33

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 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")
Signed-off-by: Douglas Anderson <[email protected]>
---

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-03 23:38:33

by Doug Anderson

[permalink] [raw]
Subject: [PATCH 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")
Signed-off-by: Douglas Anderson <[email protected]>
---

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-04 00:42:29

by Guenter Roeck

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

On Fri, Nov 03, 2023 at 04:34:27PM -0700, 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
>
> 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 <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> 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-04 00:42:38

by Guenter Roeck

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

On Fri, Nov 03, 2023 at 04:34:28PM -0700, 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.
>
> Fixes: 0e51f883daa9 ("arm64: dts: qcom: sc7280: Add APSS watchdog node")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> 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-04 00:42:48

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 3/9] arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered

On Fri, Nov 03, 2023 at 04:34:29PM -0700, 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.
>
> Fixes: 36c436b03c58 ("arm64: dts: qcom: sdm845: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index bf5e6eb9d313..9648505644ff 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -5088,7 +5088,7 @@ watchdog@17980000 {
> compatible = "qcom,apss-wdt-sdm845", "qcom,kpss-wdt";
> reg = <0 0x17980000 0 0x1000>;
> clocks = <&sleep_clk>;
> - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
> + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
> };
>
> apss_shared: mailbox@17990000 {
> --
> 2.42.0.869.gea05f2083d-goog
>

2023-11-04 00:42:58

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 4/9] arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered

On Fri, Nov 03, 2023 at 04:34:30PM -0700, 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.
>
> Fixes: b094c8f8dd2a ("arm64: dts: qcom: sm8150: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> index 97623af13464..ad4fab61222b 100644
> --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
> @@ -4170,7 +4170,7 @@ watchdog@17c10000 {
> compatible = "qcom,apss-wdt-sm8150", "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-04 00:43:12

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 5/9] arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered

On Fri, Nov 03, 2023 at 04:34:31PM -0700, 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.
>
> Fixes: 46a4359f9156 ("arm64: dts: qcom: sm8250: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index be970472f6c4..72db75ca7731 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -6018,7 +6018,7 @@ watchdog@17c10000 {
> compatible = "qcom,apss-wdt-sm8250", "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-04 00:43:32

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 6/9] arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered

On Fri, Nov 03, 2023 at 04:34:32PM -0700, 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.
>
> Fixes: 09b701b89a76 ("arm64: dts: qcom: sa8775p: add the watchdog node")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> index 13dd44dd9ed1..6b92f9083104 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
> @@ -2235,7 +2235,7 @@ watchdog@17c10000 {
> compatible = "qcom,apss-wdt-sa8775p", "qcom,kpss-wdt";
> reg = <0x0 0x17c10000 0x0 0x1000>;
> clocks = <&sleep_clk>;
> - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
> + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
> };
>
> memtimer: timer@17c20000 {
> --
> 2.42.0.869.gea05f2083d-goog
>

2023-11-04 00:43:41

by Guenter Roeck

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

On Fri, Nov 03, 2023 at 04:34:33PM -0700, 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.
>
> Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> 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-04 00:43:46

by Guenter Roeck

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

On Fri, Nov 03, 2023 at 04:34:34PM -0700, 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.
>
> Fixes: 5f82b9cda61e ("arm64: dts: qcom: Add SM6350 device tree")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> 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-04 00:44:01

by Guenter Roeck

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

On Fri, Nov 03, 2023 at 04:34:35PM -0700, 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.
>
> Update the example in the bindings.
>
> Fixes: 7c631cdff391 ("dt-bindings: watchdog: qcom-wdt: allow interrupts")
> Signed-off-by: Douglas Anderson <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
>
> 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-05 13:34:22

by Krzysztof Kozlowski

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

On 04/11/2023 00:34, 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.
>
> Update the example in the bindings.
>
> Fixes: 7c631cdff391 ("dt-bindings: watchdog: qcom-wdt: allow interrupts")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---
Acked-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof

2023-11-06 21:49:41

by Stephen Boyd

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

Quoting Douglas Anderson (2023-11-03 16:34:27)
> 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

"We'll get one" twice?

> 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 <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:50:01

by Stephen Boyd

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

Quoting Douglas Anderson (2023-11-03 16:34:28)
> 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")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:50:23

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 3/9] arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered

Quoting Douglas Anderson (2023-11-03 16:34:29)
> 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: 36c436b03c58 ("arm64: dts: qcom: sdm845: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:50:49

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 4/9] arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered

Quoting Douglas Anderson (2023-11-03 16:34:30)
> 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: b094c8f8dd2a ("arm64: dts: qcom: sm8150: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:51:32

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 5/9] arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered

Quoting Douglas Anderson (2023-11-03 16:34:31)
> 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: 46a4359f9156 ("arm64: dts: qcom: sm8250: Add watchdog bark interrupt")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:51:56

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 6/9] arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered

Quoting Douglas Anderson (2023-11-03 16:34:32)
> 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: 09b701b89a76 ("arm64: dts: qcom: sa8775p: add the watchdog node")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:52:23

by Stephen Boyd

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

Quoting Douglas Anderson (2023-11-03 16:34:33)
> 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")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:52:39

by Stephen Boyd

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

Quoting Douglas Anderson (2023-11-03 16:34:34)
> 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")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 21:53:25

by Stephen Boyd

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

Quoting Douglas Anderson (2023-11-03 16:34:35)
> 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")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-11-06 22:00:07

by Doug Anderson

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

Hi,

On Mon, Nov 6, 2023 at 1:49 PM Stephen Boyd <[email protected]> wrote:
>
> Quoting Douglas Anderson (2023-11-03 16:34:27)
> > 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
>
> "We'll get one" twice?

I like to make like to make typos. If you hadn't hadn't noticed.

I'll wait another few days and send a version with the typo fixed
unless Bjorn tells me not to (because he didn't care and applied it
anyway or because he fixed it himself while applying).


> > 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 <[email protected]>
> > ---
>
> Reviewed-by: Stephen Boyd <[email protected]>

Thanks!

-Doug

2023-11-06 22:38:23

by Bjorn Andersson

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

On Mon, Nov 06, 2023 at 01:52:58PM -0800, Doug Anderson wrote:
> Hi,
>
> On Mon, Nov 6, 2023 at 1:49 PM Stephen Boyd <[email protected]> wrote:
> >
> > Quoting Douglas Anderson (2023-11-03 16:34:27)
> > > 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
> >
> > "We'll get one" twice?
>
> I like to make like to make typos. If you hadn't hadn't noticed.
>
> I'll wait another few days and send a version with the typo fixed
> unless Bjorn tells me not to (because he didn't care and applied it
> anyway or because he fixed it himself while applying).
>

I'd be happy to pick your resubmitted series. Thanks for cleaning this
up across the platforms.

Regards,
Bjorn

>
> > > 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 <[email protected]>
> > > ---
> >
> > Reviewed-by: Stephen Boyd <[email protected]>
>
> Thanks!
>
> -Doug