[PATCH 5/6] firmware: xilinx: Change debugfs pm_api_ret size to PAYLOAD_ARG_CNT

Michal Simek michal.simek at amd.com
Thu Nov 19 05:17:29 PST 2026


From: Jay Buddhabhatti <jay.buddhabhatti at amd.com>

The debugfs PM API handler declared u32 pm_api_ret[4] but passes it as
the ret_payload buffer to zynqmp_pm_invoke_fn() and zynqmp_pm_query_data(),
which unconditionally write PAYLOAD_ARG_CNT (7) u32 values via the SMC/HVC
transport. Size the array to match the firmware call contract.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti at amd.com>
Signed-off-by: Michal Simek <michal.simek at amd.com>
---

 drivers/firmware/xilinx/zynqmp-debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c
index 36efb827f3da..f7751912d80a 100644
--- a/drivers/firmware/xilinx/zynqmp-debug.c
+++ b/drivers/firmware/xilinx/zynqmp-debug.c
@@ -325,7 +325,7 @@ static ssize_t zynqmp_pm_debugfs_api_write(struct file *file,
 	u32 pm_id = 0;
 	u64 pm_api_arg[5] = {0, 0, 0, 0, 0};
 	/* Return values from PM APIs calls */
-	u32 pm_api_ret[4] = {0, 0, 0, 0};
+	u32 pm_api_ret[PAYLOAD_ARG_CNT] = {0};
 
 	int ret;
 	int i = 0;
-- 
2.43.0




More information about the linux-arm-kernel mailing list