From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sudeep Dutt <sudeep.dutt@intel.com>
Cc: linux-kernel@vger.kernel.org,
Ashutosh Dixit <ashutosh.dixit@intel.com>,
Nikhil Rao <nikhil.rao@intel.com>
Subject: Re: [PATCH char-misc-next 3/8] misc: mic: MIC VOP Bus
Date: Sun, 7 Feb 2016 22:57:47 -0800 [thread overview]
Message-ID: <20160208065747.GA1056@kroah.com> (raw)
In-Reply-To: <e6e89d06fb7f293d08822eac97959100b375369e.1454348442.git.sudeep.dutt@intel.com>
On Mon, Feb 01, 2016 at 08:23:40PM -0800, Sudeep Dutt wrote:
> The Virtio Over PCIe (VOP) bus abstracts the low level hardware
> details like interrupts and mapping remote memory so that the same VOP
> driver can work without changes with different MIC host or card
> drivers as long as the hardware bus operations are implemented. The
> VOP driver registers itself on the VOP bus. The base PCIe drivers
> implement the bus ops and register VOP devices on the bus, resulting
> in the VOP driver being probed with the VOP devices. This allows the
> VOP functionality to be shared between multiple generations of Intel
> MIC products.
>
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
> ---
> drivers/misc/mic/Kconfig | 17 ++++
> drivers/misc/mic/bus/Makefile | 1 +
> drivers/misc/mic/bus/vop_bus.h | 142 ++++++++++++++++++++++++++++
> drivers/misc/mic/bus/vop_bus.c | 204 +++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 364 insertions(+)
> create mode 100644 drivers/misc/mic/bus/vop_bus.h
> create mode 100644 drivers/misc/mic/bus/vop_bus.c
>
> diff --git a/drivers/misc/mic/Kconfig b/drivers/misc/mic/Kconfig
> index 40677df..840f7ef 100644
> --- a/drivers/misc/mic/Kconfig
> +++ b/drivers/misc/mic/Kconfig
> @@ -32,6 +32,23 @@ config SCIF_BUS
> OS and tools for MIC to use with this driver are available from
> <http://software.intel.com/en-us/mic-developer>.
>
> +comment "VOP Bus Driver"
> +
> +config VOP_BUS
> + tristate "VOP Bus Driver"
> + depends on 64BIT && PCI && X86 && X86_DEV_DMA_OPS
> + help
> + This option is selected by any driver which registers a
> + device or driver on the VOP Bus, such as CONFIG_INTEL_MIC_HOST
> + and CONFIG_INTEL_MIC_CARD.
> +
> + If you are building a host/card kernel with an Intel MIC device
> + then say M (recommended) or Y, else say N. If unsure say N.
> +
> + More information about the Intel MIC family as well as the Linux
> + OS and tools for MIC to use with this driver are available from
> + <http://software.intel.com/en-us/mic-developer>.
> +
> comment "Intel MIC Host Driver"
>
> config INTEL_MIC_HOST
> diff --git a/drivers/misc/mic/bus/Makefile b/drivers/misc/mic/bus/Makefile
> index 761842b..8758a7d 100644
> --- a/drivers/misc/mic/bus/Makefile
> +++ b/drivers/misc/mic/bus/Makefile
> @@ -5,3 +5,4 @@
> obj-$(CONFIG_INTEL_MIC_BUS) += mic_bus.o
> obj-$(CONFIG_SCIF_BUS) += scif_bus.o
> obj-$(CONFIG_MIC_COSM) += cosm_bus.o
> +obj-$(CONFIG_VOP_BUS) += vop_bus.o
> diff --git a/drivers/misc/mic/bus/vop_bus.h b/drivers/misc/mic/bus/vop_bus.h
> new file mode 100644
> index 0000000..97fa5d6
> --- /dev/null
> +++ b/drivers/misc/mic/bus/vop_bus.h
> @@ -0,0 +1,142 @@
> +/*
> + * Intel MIC Platform Software Stack (MPSS)
> + *
> + * Copyright(c) 2016 Intel Corporation.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License, version 2, as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * General Public License for more details.
> + *
> + * The full GNU General Public License is included in this distribution in
> + * the file called "COPYING".
> + *
> + * Intel Virtio over PCIe Bus driver.
> + */
> +#ifndef _VOP_BUS_H_
> +#define _VOP_BUS_H_
> +/*
> + * Everything a vop driver needs to work with any particular vop
> + * implementation.
> + */
> +#include <linux/dmaengine.h>
> +#include <linux/interrupt.h>
> +
> +#include "../common/mic_dev.h"
> +
> +struct vop_device_id {
> + u32 device;
> + u32 vendor;
> +};
> +
> +#define VOP_DEV_TRNSP 1
> +#define VOP_DEV_ANY_ID 0xffffffff
> +/*
> + * Size of the internal buffer used during DMA's as an intermediate buffer
> + * for copy to/from user. Must be an integral number of pages.
> + */
> +#define VOP_INT_DMA_BUF_SIZE PAGE_ALIGN(64 * 1024ULL)
> +
> +/**
> + * vop_device - representation of a device using vop
> + * @priv: private pointer for the driver's use.
> + * @hw_ops: the hardware ops supported by this device.
> + * @id: the device type identification (used to match it with a driver).
> + * @dev: underlying device.
> + * @dnode - The destination node which this device will communicate with.
> + * @aper: Aperture memory window
> + * @dma_ch - DMA channel
> + * @index: unique position on the vop bus
> + */
> +struct vop_device {
> + void *priv;
You don't need this pointer, use the one in struct device instead.
Other than that, looks good, nice job with this bus.
greg k-h
next prev parent reply other threads:[~2016-02-08 6:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 4:23 [PATCH char-misc-next 0/8] Enable Virtio Over PCIe (VOP) driver Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 1/8] misc: mic: Remove MIC X100 host virtio functionality Sudeep Dutt
2016-02-08 6:55 ` Greg Kroah-Hartman
2016-02-02 4:23 ` [PATCH char-misc-next 2/8] misc: mic: Remove MIC X100 card " Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 3/8] misc: mic: MIC VOP Bus Sudeep Dutt
2016-02-08 6:57 ` Greg Kroah-Hartman [this message]
2016-02-08 17:26 ` Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 4/8] misc: mic: Add data structures for the VOP driver Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 5/8] misc: mic: Enable VOP host side functionality Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 6/8] misc: mic: Enable VOP card " Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 7/8] misc: mic: Enable VOP debugfs and driver build Sudeep Dutt
2016-02-02 4:23 ` [PATCH char-misc-next 8/8] misc: mic: MIC host and card driver changes to enable VOP Sudeep Dutt
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=20160208065747.GA1056@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ashutosh.dixit@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nikhil.rao@intel.com \
--cc=sudeep.dutt@intel.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
Powered by JetHome