All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] watchdog: qcom: Support NMI pretimeout warnings
@ 2026-07-30 21:32 ` Mayank Rungta
  0 siblings, 0 replies; 14+ messages in thread
From: Mayank Rungta via B4 Relay @ 2026-07-30 21:32 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Thomas Gleixner
  Cc: linux-watchdog, linux-kernel, linux-arm-msm, Kirill A. Shutemov,
	Douglas Anderson, Mayank Rungta

On ARM64 Qualcomm SoCs, when a system freezes completely due to hard
locked CPUs with standard interrupts disabled, a standard watchdog
pretimeout warning interrupt (bark) fails to fire. To diagnose total
system lockups, we need to transition the Qualcomm hardware watchdog
pretimeout bark interrupt into an NMI (or pseudo-NMI).

Enabling NMI pretimeout handlers within loadable driver module requires
making watchdog pretimeout NMI-safe and unlocking GPL module access to
NMI registration functions.

This 3-patch series achieves NMI pretimeout enablement for qcom-wdt:
 1) Replaces spinlocks in watchdog_notify_pretimeout() with RCU to
    guarantee safe execution from NMI context.
 2) Exports request_nmi(), free_nmi(), enable_nmi(), and
    disable_nmi_nosync() to GPL loadable kernel modules.
 3) Updates qcom-wdt to request its pretimeout bark interrupt as a
    NMI (or pseudo-NMI).

Testing & Verification:
 - Built and tested on ARM64 Qualcomm Snapdragon SoC (Google CoachZ)
   loadable module configurations (CONFIG_QCOM_WDT=m).
 - With GICv3 pseudo-NMI enabled, simulated hard CPU lockups and
   IRQ-disabled hang conditions via lkdtm. Confirmed that qcom-wdt traps
   the watchdog pretimeout bark interrupt as a pseudo-NMI, safely
   executes watchdog_notify_pretimeout() without deadlocks.
 - Verified that runtime transitions between pretimeout governors in
   sysfs execute safely.
 - Booted with pseudo-NMIs disabled and confirmed that qcom-wdt detects
   unsupported NMI and falls back to standard IRQ.

Signed-off-by: Mayank Rungta <mrungta@google.com>
---
Mayank Rungta (3):
      watchdog: pretimeout: Protect governor access with RCU for NMI safety
      genirq: Export NMI APIs
      watchdog: qcom: Register pretimeout interrupt as NMI

 drivers/watchdog/qcom-wdt.c            | 55 +++++++++++++++++++++++++++++++---
 drivers/watchdog/watchdog_pretimeout.c | 47 ++++++++++++++++-------------
 include/linux/watchdog.h               |  2 +-
 kernel/irq/manage.c                    |  4 +++
 4 files changed, 82 insertions(+), 26 deletions(-)
---
base-commit: 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603
change-id: 20260724-qcom-wdt-nmi-series-06a48da7b415

Best regards,
-- 
Mayank Rungta <mrungta@google.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-07-30 22:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 21:32 [PATCH 0/3] watchdog: qcom: Support NMI pretimeout warnings Mayank Rungta via B4 Relay
2026-07-30 21:32 ` Mayank Rungta
2026-07-30 21:32 ` [PATCH 1/3] watchdog: pretimeout: Protect governor access with RCU for NMI safety Mayank Rungta via B4 Relay
2026-07-30 21:32   ` Mayank Rungta
2026-07-30 21:46   ` Doug Anderson
2026-07-30 21:32 ` [PATCH 2/3] genirq: Export NMI APIs Mayank Rungta via B4 Relay
2026-07-30 21:32   ` Mayank Rungta
2026-07-30 21:47   ` sashiko-bot
2026-07-30 21:49   ` Doug Anderson
2026-07-30 22:55     ` Guenter Roeck
2026-07-30 21:32 ` [PATCH 3/3] watchdog: qcom: Register pretimeout interrupt as NMI Mayank Rungta via B4 Relay
2026-07-30 21:32   ` Mayank Rungta
2026-07-30 21:44   ` sashiko-bot
2026-07-30 21:52   ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.