From: Yidong Zhang <yidong.zhang@amd.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
<ogabbay@kernel.org>, <quic_jhugo@quicinc.com>,
<maciej.falkowski@linux.intel.com>,
<dri-devel@lists.freedesktop.org>
Cc: <linux-kernel@vger.kernel.org>, <sonal.santan@amd.com>,
<mario.limonciello@amd.com>, <lizhi.hou@amd.com>,
DMG Karthik <Karthik.DMG@amd.com>, Nishad Saraf <nishads@amd.com>
Subject: Re: [PATCH V1 2/5] accel/amd_vpci: Add new driver for AMD Versal PCI accelerator
Date: Sat, 27 Dec 2025 11:17:09 -0800 [thread overview]
Message-ID: <83a72692-327a-4061-93b8-b9d0d5e8ecbf@amd.com> (raw)
In-Reply-To: <91aad9d6-f408-4716-a45f-7ad3199ee36f@wanadoo.fr>
Hi Chris,
On 11/11/25 01:38, Christophe JAILLET wrote:
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Le 11/11/2025 à 02:15, David Zhang a écrit :
>> This patch introduces a new PCI driver for AMD Versal-based accelerator
>> cards.
>>
>> The driver provides basic module and PCI device initialization, based on
>> BAR resources used to establish a hardware queue-based ring buffer
>> between
>> the PCIe host and the Versal Management Runtime (VMR) service running on
>> the embedded SoC. This interface enables firmware management and board
>> health monitoring.
>>
>> Key features:
>> - PCI probe and BAR resource initialization.
>> - Integration with configfs for firmware management
>> - Compatibility check using firmware-reported UUIDs
>>
>> The base firmware image is expected under /lib/firmware/xilinx/<fw_name>
>> and can be programmed to the device through the configfs interface.
>> Firmware transfer is handled via a remote queue service (added in a later
>> patch).
>>
>> Co-developed-by: DMG Karthik <Karthik.DMG@amd.com>
>> Signed-off-by: DMG Karthik <Karthik.DMG@amd.com>
>> Co-developed-by: Nishad Saraf <nishads@amd.com>
>> Signed-off-by: Nishad Saraf <nishads@amd.com>
>> Signed-off-by: David Zhang <yidong.zhang@amd.com>
>> ---
>
> ...
>
>> +static int versal_pci_device_setup(struct versal_pci_device *vdev)
>> +{
>> + int ret;
>> +
>> + ret = versal_pci_fw_init(vdev);
>> + if (ret) {
>> + vdev_err(vdev, "Failed to init fw, err %d", ret);
>> + goto comm_chan_fini;
>> + }
>> +
>> + ret = versal_pci_cfs_init(vdev);
>> + if (ret) {
>
> Do we need to call versal_pci_fw_fini()?
> (here or in the error handling path to be future proof)
>
>> + vdev_err(vdev, "Failed to init configfs subsys, err %d",
>> ret);
>> + goto comm_chan_fini;
>> + }
>> +
>> + return 0;
>> +
>> +comm_chan_fini:
>> +
>> + return ret;
>> +}
>
> ...
>
>> diff --git a/drivers/accel/amd_vpci/versal-pci.h
>> b/drivers/accel/amd_vpci/versal-pci.h
>> new file mode 100644
>> index 000000000000..ca309aee87ad
>> --- /dev/null
>> +++ b/drivers/accel/amd_vpci/versal-pci.h
>> @@ -0,0 +1,62 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Driver for Versal PCIe device
>> + *
>> + * Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
>> + */
>> +
>> +#ifndef __VERSAL_PCI_H
>> +#define __VERSAL_PCI_H
>> +
>> +#include <linux/configfs.h>
>> +#include <linux/firmware.h>
>> +
>> +#define MGMT_BAR 0
>> +
>> +#define vdev_info(vdev, fmt,
>> args...) \
>> + dev_info(&(vdev)->pdev->dev, "%s: "fmt, __func__, ##args)
>
> \n could be added after fmt, as it is not included in the messages
> themselves, when used.
I tested this with "\n" on latest linux kernel, it will give us one
extra line. I think latest linux has no need to add this extra "\n" anymore.
Meanwhile, I will address all your other comments and also update the
copyright to 2026.
Happy new year to everyone!
Thanks,
David
>
> Same for the other macro below.
>
>> +
>> +#define vdev_warn(vdev, fmt,
>> args...) \
>> + dev_warn(&(vdev)->pdev->dev, "%s: "fmt, __func__, ##args)
>> +
>> +#define vdev_err(vdev, fmt, args...) \
>> + dev_err(&(vdev)->pdev->dev, "%s: "fmt, __func__, ##args)
>> +
>> +#define vdev_dbg(vdev, fmt, args...) \
>> + dev_dbg(&(vdev)->pdev->dev, fmt, ##args)
>
> ...
>
> CJ
next prev parent reply other threads:[~2025-12-27 19:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 1:15 [PATCH V1 0/5] accel/amd_vpci: Add new driver for AMD Versal PCI David Zhang
2025-11-11 1:15 ` [PATCH V1 1/5] accel/amd_vpci: Add documentation for AMD Versal PCI accelerator management David Zhang
2025-11-11 1:15 ` [PATCH V1 2/5] accel/amd_vpci: Add new driver for AMD Versal PCI accelerator David Zhang
2025-11-11 9:38 ` Christophe JAILLET
2025-12-27 19:17 ` Yidong Zhang [this message]
2025-11-11 1:15 ` [PATCH V1 3/5] accel/amd_vpci: Add Remote Management(RM) queue infrastructure David Zhang
2025-11-11 9:44 ` Christophe JAILLET
2025-11-13 4:50 ` Yidong Zhang
2025-11-11 1:15 ` [PATCH V1 4/5] accel/amd_vpci: Add Remote Management (RM) queue service APIs David Zhang
2025-11-11 9:51 ` Christophe JAILLET
2025-11-13 4:52 ` Yidong Zhang
2025-11-11 1:15 ` [PATCH V1 5/5] accel/amd_vpci: Add communication channel service David Zhang
2025-11-11 9:59 ` Christophe JAILLET
2025-11-13 4:53 ` Yidong Zhang
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=83a72692-327a-4061-93b8-b9d0d5e8ecbf@amd.com \
--to=yidong.zhang@amd.com \
--cc=Karthik.DMG@amd.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=maciej.falkowski@linux.intel.com \
--cc=mario.limonciello@amd.com \
--cc=nishads@amd.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
--cc=sonal.santan@amd.com \
/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®