mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: <linux-kernel@vger.kernel.org>, <monstr@monstr.eu>,
	<michal.simek@amd.com>, <git@amd.com>
Cc: Jay Buddhabhatti <jay.buddhabhatti@amd.com>,
	"moderated list:ARM/ZYNQ ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH 5/6] firmware: xilinx: Change debugfs pm_api_ret size to PAYLOAD_ARG_CNT
Date: Thu, 19 Nov 2026 14:17:29 +0100	[thread overview]
Message-ID: <9096ca10ea87d3d56e9be40894a8545eb8b497f1.1795094242.git.michal.simek@amd.com> (raw)
In-Reply-To: <cover.1795094242.git.michal.simek@amd.com>

From: Jay Buddhabhatti <jay.buddhabhatti@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@amd.com>
Signed-off-by: Michal Simek <michal.simek@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


  parent reply	other threads:[~2026-11-19 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 13:17 [PATCH 0/6] firmware: xilinx: cleanups and debugfs fixes Michal Simek
2026-11-19 13:17 ` [PATCH 1/6] firmware: xilinx: Use late_initcall for pm_init_finalize Michal Simek
2026-11-19 13:17 ` [PATCH 2/6] firmware: xilinx: Call va_start after pm feature check Michal Simek
2026-11-19 13:17 ` [PATCH 3/6] firmware: xilinx: Add comments about number of arguments Michal Simek
2026-11-19 13:17 ` [PATCH 4/6] firmware: xilinx: Call pm sysfs out of dev_groups Michal Simek
2026-11-19 13:17 ` Michal Simek [this message]
2026-11-19 13:17 ` [PATCH 6/6] firmware: xilinx: Bound debugfs clock name formatting Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9096ca10ea87d3d56e9be40894a8545eb8b497f1.1795094242.git.michal.simek@amd.com \
    --to=michal.simek@amd.com \
    --cc=git@amd.com \
    --cc=jay.buddhabhatti@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®