summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJay Buddhabhatti <jay.buddhabhatti@amd.com>2026-07-29 05:25:22 -0700
committerMichal Simek <michal.simek@amd.com>2026-08-10 09:30:44 +0200
commit0e8860367da261116cd290bcd6a54d2e597a0c5c (patch)
treef3ecf5e54a9877d433b7b0e7eaa6dbe8ed10ff4a /include/linux
parent84dbfa5519cf6583d09ee0123ac580542b144553 (diff)
firmware: xilinx: Clear firmware notifiers across kexec transitions
During a kexec restart, only the kernel is reloaded but notifier callbacks in firmware persist, causing state mismatches between kernel and firmware. To address this, introduce PM_ALL_NOTIFIERS node ID to unregister all notifier callbacks during kexec. On a graceful kexec restart, this occurs in zynqmp_firmware_shutdown(). On a crash kernel restart, it happens in zynqmp_firmware_probe() in the reloaded kernel. Unregistering all notifiers depends on firmware support for the PM_ALL_NOTIFIERS node ID. On firmware that does not implement it (the feature check reports a version below PM_API_VERSION_3) the step is skipped and a warning such as "Firmware doesn't support unregister all notifiers at once" is logged, e.g. on Versal NET firmware that predates this API. Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Reviewed-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com> Link: https://patch.msgid.link/20260729122522.3732875-4-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/firmware/xlnx-zynqmp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index ac39e5492961..69a2f74269f3 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -149,6 +149,9 @@
/* Node ID for all peripheral devices */
#define PM_DEV_ALL_PERIPH 0x18224FFFU
+/* Node ID for all notifier callbacks */
+#define PM_ALL_NOTIFIERS 0xFFFFFFFFU
+
enum pm_module_id {
PM_MODULE_ID = 0x0,
XPM_MODULE_ID = 0x2,