[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZA3cYPoWQCjYoB3g@corigine.com>
Date: Sun, 12 Mar 2023 15:06:24 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Shannon Nelson <shannon.nelson@....com>
Cc: jasowang@...hat.com, mst@...hat.com,
virtualization@...ts.linux-foundation.org, brett.creeley@....com,
davem@...emloft.net, netdev@...r.kernel.org, kuba@...nel.org,
drivers@...sando.io
Subject: Re: [PATCH RFC v2 virtio 1/7] pds_vdpa: Add new vDPA driver for
AMD/Pensando DSC
On Wed, Mar 08, 2023 at 05:30:40PM -0800, Shannon Nelson wrote:
> This is the initial auxiliary driver framework for a new vDPA
> device driver, an auxiliary_bus client of the pds_core driver.
> The pds_core driver supplies the PCI services for the VF device
> and for accessing the adminq in the PF device.
>
> This patch adds the very basics of registering for the auxiliary
> device, setting up debugfs entries, and registering with devlink.
>
> Signed-off-by: Shannon Nelson <shannon.nelson@....com>
...
> diff --git a/drivers/vdpa/pds/Makefile b/drivers/vdpa/pds/Makefile
> new file mode 100644
> index 000000000000..a9cd2f450ae1
> --- /dev/null
> +++ b/drivers/vdpa/pds/Makefile
> @@ -0,0 +1,8 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +# Copyright(c) 2023 Advanced Micro Devices, Inc
> +
> +obj-$(CONFIG_PDS_VDPA) := pds_vdpa.o
> +
> +pds_vdpa-y := aux_drv.o
> +
> +pds_vdpa-$(CONFIG_DEBUG_FS) += debugfs.o
> diff --git a/drivers/vdpa/pds/aux_drv.c b/drivers/vdpa/pds/aux_drv.c
> new file mode 100644
> index 000000000000..b3f36170253c
> --- /dev/null
> +++ b/drivers/vdpa/pds/aux_drv.c
> @@ -0,0 +1,99 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/* Copyright(c) 2023 Advanced Micro Devices, Inc */
> +
> +#include <linux/auxiliary_bus.h>
> +
> +#include <linux/pds/pds_core.h>
Perhaps I'm missing something obvious, but
pds_core.h doesn't exist (yet).
> +#include <linux/pds/pds_auxbus.h>
> +#include <linux/pds/pds_vdpa.h>
...
> diff --git a/drivers/vdpa/pds/debugfs.c b/drivers/vdpa/pds/debugfs.c
> new file mode 100644
> index 000000000000..3c163dc7b66f
> --- /dev/null
> +++ b/drivers/vdpa/pds/debugfs.c
> @@ -0,0 +1,25 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/* Copyright(c) 2023 Advanced Micro Devices, Inc */
> +
> +#include <linux/pds/pds_core.h>
> +#include <linux/pds/pds_auxbus.h>
> +
> +#include "aux_drv.h"
> +#include "debugfs.h"
> +
> +#ifdef CONFIG_DEBUG_FS
Again, perhaps I'm missing something obvious, but
compilation of this file is guarded by CONFIG_DEBUG_FS (in ./Makefile).
So I don't think this guard is needed here.
> +
> +static struct dentry *dbfs_dir;
> +
> +void pds_vdpa_debugfs_create(void)
> +{
> + dbfs_dir = debugfs_create_dir(PDS_VDPA_DRV_NAME, NULL);
> +}
> +
> +void pds_vdpa_debugfs_destroy(void)
> +{
> + debugfs_remove_recursive(dbfs_dir);
> + dbfs_dir = NULL;
> +}
> +
> +#endif /* CONFIG_DEBUG_FS */
Powered by blists - more mailing lists