mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] firmware: xilinx: Dont send linux address to get fpga config get status
@ 2025-02-07  5:49 Nava kishore Manne
  2025-02-17 14:45 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Nava kishore Manne @ 2025-02-07  5:49 UTC (permalink / raw)
  To: michal.simek, ronak.jain, gregkh, jay.buddhabhatti,
	srinivas.kandagatla, u.kleine-koenig, praveen.teja.kundanala,
	siva.durga.prasad.paladugu, linux-arm-kernel, linux-kernel

From: Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>

Fpga get config status just returns status through ret_payload and there
is no need to allocate local buf and send its address through SMC args.
Moreover, the address that is being passed till now is linux virtual
address and is incorrect.
Corresponding modification has been done in the firmware to avoid using the
address sent by linux.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>
Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com>
---
Changes for v2:
 - Drop the specified patch:
   https://lore.kernel.org/lkml/DS7PR12MB6070A83267558A7D545E3383CDF72@DS7PR12MB6070.namprd12.prod.outlook.com/
 - Rebase the patch on v6.14-rc1 without any changes.

 drivers/firmware/xilinx/zynqmp.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
index 720fa8b5d8e9..7356e860e65c 100644
--- a/drivers/firmware/xilinx/zynqmp.c
+++ b/drivers/firmware/xilinx/zynqmp.c
@@ -1139,17 +1139,13 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_get_status);
 int zynqmp_pm_fpga_get_config_status(u32 *value)
 {
 	u32 ret_payload[PAYLOAD_ARG_CNT];
-	u32 buf, lower_addr, upper_addr;
 	int ret;
 
 	if (!value)
 		return -EINVAL;
 
-	lower_addr = lower_32_bits((u64)&buf);
-	upper_addr = upper_32_bits((u64)&buf);
-
 	ret = zynqmp_pm_invoke_fn(PM_FPGA_READ, ret_payload, 4,
-				  XILINX_ZYNQMP_PM_FPGA_CONFIG_STAT_OFFSET, lower_addr, upper_addr,
+				  XILINX_ZYNQMP_PM_FPGA_CONFIG_STAT_OFFSET, 0, 0,
 				  XILINX_ZYNQMP_PM_FPGA_READ_CONFIG_REG);
 
 	*value = ret_payload[1];
-- 
2.43.0


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

* Re: [PATCH v2] firmware: xilinx: Dont send linux address to get fpga config get status
  2025-02-07  5:49 [PATCH v2] firmware: xilinx: Dont send linux address to get fpga config get status Nava kishore Manne
@ 2025-02-17 14:45 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2025-02-17 14:45 UTC (permalink / raw)
  To: Nava kishore Manne, ronak.jain, gregkh, jay.buddhabhatti,
	srinivas.kandagatla, u.kleine-koenig, praveen.teja.kundanala,
	siva.durga.prasad.paladugu, linux-arm-kernel, linux-kernel



On 2/7/25 06:49, Nava kishore Manne wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>
> 
> Fpga get config status just returns status through ret_payload and there
> is no need to allocate local buf and send its address through SMC args.
> Moreover, the address that is being passed till now is linux virtual
> address and is incorrect.
> Corresponding modification has been done in the firmware to avoid using the
> address sent by linux.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu@amd.com>
> Signed-off-by: Nava kishore Manne <nava.kishore.manne@amd.com>
> ---
> Changes for v2:
>   - Drop the specified patch:
>     https://lore.kernel.org/lkml/DS7PR12MB6070A83267558A7D545E3383CDF72@DS7PR12MB6070.namprd12.prod.outlook.com/
>   - Rebase the patch on v6.14-rc1 without any changes.
> 
>   drivers/firmware/xilinx/zynqmp.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 720fa8b5d8e9..7356e860e65c 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -1139,17 +1139,13 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_get_status);
>   int zynqmp_pm_fpga_get_config_status(u32 *value)
>   {
>   	u32 ret_payload[PAYLOAD_ARG_CNT];
> -	u32 buf, lower_addr, upper_addr;
>   	int ret;
>   
>   	if (!value)
>   		return -EINVAL;
>   
> -	lower_addr = lower_32_bits((u64)&buf);
> -	upper_addr = upper_32_bits((u64)&buf);
> -
>   	ret = zynqmp_pm_invoke_fn(PM_FPGA_READ, ret_payload, 4,
> -				  XILINX_ZYNQMP_PM_FPGA_CONFIG_STAT_OFFSET, lower_addr, upper_addr,
> +				  XILINX_ZYNQMP_PM_FPGA_CONFIG_STAT_OFFSET, 0, 0,
>   				  XILINX_ZYNQMP_PM_FPGA_READ_CONFIG_REG);
>   
>   	*value = ret_payload[1];

Applied.
M

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

end of thread, other threads:[~2025-02-17 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-07  5:49 [PATCH v2] firmware: xilinx: Dont send linux address to get fpga config get status Nava kishore Manne
2025-02-17 14:45 ` Michal Simek

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®