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

From: Michal Simek

Date: Thu Nov 19 2026 - 08:19:29 EST


From: Jay Buddhabhatti <jay.buddhabhatti@xxxxxxx>

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@xxxxxxx>
Signed-off-by: Michal Simek <michal.simek@xxxxxxx>
---

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