some related dma changes to make sure noncoherent platform works
well.
Sherry Sun (4):
misc: vop: change the way of allocating vring
misc: vop: do not allocate and reassign the used ring
misc: vop: simply return the saved dma address instead of virt_to_phys
misc: vop: mapping kernel memo
Mapping kernel space memory to user space as noncached, since user space
need check the updates of avail_idx and device page flags timely.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/vop/vop_vringh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
to sync the
changes of vring between EP and RC, which will cause memory
synchronization problem for those devices which don't support hardware
dma coherent.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/vop/vop_vringh.c | 39 +++
1
mic_vqconfig.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/bus/vop_bus.h| 2 ++
drivers/misc/mic/host/mic_boot.c | 8
drivers/misc/mic/vop/vop_vringh.c | 11 +--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/mic
will encounter a
problem. When host finished with descriptor, it will update the used
ring with putused_kern api, if reassign used ring at EP side, used
ring will be io device memory for RC, use memcpy in putused_kern will
cause kernel panic.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim
Set VIRTIO_F_ACCESS_PLATFORM feature for vop driver, as the DMA mapping
details shouldn't decide on the virtio implementation, but the host PCIe
implementation.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_main.c | 1 +
1 file changed, 1 insertion(+)
Build module or builtin VOP based on CONFIG_VOP macro.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/vop/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mic/vop/Makefile b/drivers/misc/mic/vop/Makefile
index 579da3868c8e
, __LINE__);
^~~~
mpssd.c:361:1: note: expected ???struct mic_copy_desc *??? but argument is of
type ???struct mic_copy_desc???
disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy,
^~
Signed-off-by: Sherry Sun
---
samples/mic/mpssd/mpssd.c | 20
c in struct _mic_vring_info.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_main.c | 2 +-
drivers/misc/mic/vop/vop_vringh.c | 4 ++--
samples/mic/mpssd/mpssd.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/mic/vop
Changes in V2:
1. Change the way of copy data from ubuf to dbuf in patch4. Reuse the allocated
vvr->buf as the temp buffer and add a loop for multiple copies if there are too
much data.
This patchset fix some bugs about the vop driver and Intel MIC user space tool.
Sherry Sun (4):
samp
Read and write io memory should address align on ARCH ARM. Change to use
memcpy_toio to avoid kernel panic caused by the address un-align issue.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_vringh.c | 20 ++--
1 file changed, 14 insertions
Hi Christoph,
>
> > + vr->va = dma_alloc_coherent(vop_dev(vdev), vr_size,
> &vr_addr,
> > +GFP_KERNEL);
>
> Please stick to 80 character lines unless you have a really good reason not
> to.
Okay, will change it in V3.
Regards
Sherry
Hi Christoph,
> > diff --git a/include/uapi/linux/mic_common.h
> > b/include/uapi/linux/mic_common.h index 504e523f702c..e680fe27af69
> > 100644
> > --- a/include/uapi/linux/mic_common.h
> > +++ b/include/uapi/linux/mic_common.h
> > @@ -56,8 +56,6 @@ struct mic_device_desc {
> > * @vdev_reset: S
Hi Christoph,
> On Tue, Sep 29, 2020 at 04:44:24PM +0800, Sherry Sun wrote:
> > The device page and vring should use consistent memory which are
> > allocated by dma_alloc_coherent api, when user space wants to get its
> > physical address, virt_to_phys cannot be used,
Hi Christoph,
> On Tue, Sep 29, 2020 at 04:44:25PM +0800, Sherry Sun wrote:
> > Mapping kernel space memory to user space as noncached, since user
> > space need check the updates of avail_idx and device page flags timely.
> >
> > Signed-off-by: Joakim Zhang
&g
Hi Christoph,
> On Tue, Sep 29, 2020 at 01:10:12PM +0000, Sherry Sun wrote:
> > > > if (!offset) {
> > > > - *pa = virt_to_phys(vpdev->hw_ops->get_dp(vpdev));
> > > > + if (vpdev->hw_ops->get_dp_dma)
Hi David, thanks for your information.
Hi Christoph, please see my comments below.
> Subject: RE: [PATCH V2 4/4] misc: vop: mapping kernel memory to user space
> as noncached
>
> From: Christoph Hellwig
> > Sent: 29 September 2020 11:29
> ...
> > You can't call remap_pfn_range on memory returned
for vop and cosm driver, when the
> vop/cosm device appears, the driver will be autoloaded.
>
> Sherry Sun (2):
> mic: vop: module autoprobing support for vop drivers
> mic: cosm: module autoprobing support for cosm driver
>
> drivers/misc/mic/bus/cosm_bus.c | 8 +
Hi Greg,
> Subject: Re: [PATCH V2 0/2] Add module autoloading support for vop and
> cosm driver
>
> On Tue, Oct 13, 2020 at 08:52:01AM +0000, Sherry Sun wrote:
> > Gentle ping
>
> It's the merge window, sorry, this fell through the cracks before that
> hap
Hi Arnd,
> Subject: Re: [PATCH 0/5] Add noncoherent platform support for vop driver
>
> On Fri, Sep 25, 2020 at 9:27 AM Sherry Sun wrote:
> >
> > Change the way of allocating vring to support noncoherent platform for
> > vop driver, and add some related dma chang
Hi Greg,
> -Original Message-
> On Fri, Sep 25, 2020 at 03:26:26PM +0800, Sherry Sun wrote:
> > For noncoherent platform, we should allocate vring through
> > dma_alloc_coherent api to ensure timely synchronization of vring.
> > The orginal way which u
Hi Greg,
> -Original Message-
> From: Greg KH
> Sent: 2020年9月25日 20:17
> To: Sherry Sun
> Cc: sudeep.d...@intel.com; ashutosh.di...@intel.com; a...@arndb.de;
> wang.y...@zte.com.cn; huang.ziji...@zte.com.cn;
> rikard.falkeb...@gmail.com; lee.jo...@linaro.org; m
Hi Greg,
> -Original Message-
> On Fri, Sep 25, 2020 at 03:26:28PM +0800, Sherry Sun wrote:
> > For noncoherent platform, the device page and vring should allocated
> > by dma_alloc_coherent, when user space wants to get its physical
> > address, virt_to_phys canno
Hi Christoph,
> > +#include
>
> This header must not be included in drivers.
>
> >
> > + if (dev_is_dma_coherent(vop_dev(vdev)))
>
> And this API must not be used in drivers either.
Thanks for your reply.
Can you explain why we cannot use the API and header above in drivers?
And do
Hi Christoph,
> On Fri, Sep 25, 2020 at 03:26:29PM +0800, Sherry Sun wrote:
> > Set VIRTIO_F_ACCESS_PLATFORM feature for nocoherent platform, since it
> > needs the DMA API for virtio.
>
> Given that VOP is a plug-in PCIe card VIRTIO_F_ACCESS_PLATFORM must
> always be
Hi Greg,
> -Original Message-
> From: Greg KH
> Sent: 2020年9月27日 18:29
> To: Sherry Sun
> Cc: sudeep.d...@intel.com; ashutosh.di...@intel.com; a...@arndb.de;
> masahi...@kernel.org; michal.l...@markovi.net; lee.jo...@linaro.org;
> rikard.falkeb...@gmail.com; m...@re
Hi Greg,
> On Sun, Sep 27, 2020 at 12:19:50PM +0000, Sherry Sun wrote:
> > Hi Greg,
> >
> > > -Original Message-
> > > From: Greg KH
> > > Sent: 2020年9月27日 18:29
> > > To: Sherry Sun
> > > Cc: sudeep.d...@intel.com; ashutos
Hi Greg,
>
> On Fri, Sep 25, 2020 at 03:31:58PM +0800, Sherry Sun wrote:
> > Add uevent callback for cosm_bus and add cosm_device_id for cosm
> > driver which is needed for MODULE_DEVICE_TABLE. Also adding struct
> > cosm_device_id in devicetable-offsets.c and
Hi Christoph,
> On Sun, Sep 27, 2020 at 08:05:07AM +0000, Sherry Sun wrote:
> > Hi Christoph,
> >
> > > On Fri, Sep 25, 2020 at 03:26:29PM +0800, Sherry Sun wrote:
> > > > Set VIRTIO_F_ACCESS_PLATFORM feature for nocoherent platform,
> >
Hi Christoph,
> On Sun, Sep 27, 2020 at 07:58:29AM +0000, Sherry Sun wrote:
> > Thanks for your reply.
> > Can you explain why we cannot use the API and header above in drivers?
> > And do you know if there are any APIs that could replace this to check the
> device hardw
Add vop autoprobing support to MODULE_DEVICE_TABLE() by adding info
about struct vop_device_id in devicetable-offsets.c and add a vop entry
point in file2alias.c.
The type argument for MODULE_DEVICE_TABLE(type, name) is vop.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers
Add uevent callback for cosm_bus and add cosm_device_id for cosm driver
which is needed for MODULE_DEVICE_TABLE. Also adding struct
cosm_device_id in devicetable-offsets.c and the cosm entry point in
file2alias.c.
Cosm driver will be autoloaded when cosm device appears.
Signed-off-by: Sherry Sun
Changes in V2:
1. Combine patch1 and patch2 in V1 together, as patch1 is a part of autoloading
support for vop driver in patch2.
Add module autoloading support for vop and cosm driver, when the vop/cosm device
appears, the driver will be autoloaded.
Sherry Sun (2):
mic: vop: module autoprobing
; ring
>
> On Mon, Oct 26, 2020 at 03:04:45AM +, Sherry Sun wrote:
> > Hi Greg & Christoph,
> >
> > > Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign
> > > the used ring
> > >
> > > On Thu, Oct 22, 2020 at 01:06:36PM
962d746d482c5bdd593 Mon Sep 17 00:00:00
> 2001
> From: Sherry Sun
> Date: Mon, 26 Oct 2020 16:53:34 +0800
> Subject: misc: vop: change the way of allocating vring and device page
>
> Allocate vrings use dma_alloc_coherent is a common way in kernel. As the
> memory interacted
Hi Christoph,
Gentle ping
Can you give some suggestions on the limitations of dma_mmap_coherent api?
Best regards
Sherry
> Subject: RE: [PATCH V2 4/4] misc: vop: mapping kernel memory to user space
> as noncached
>
> Hi David, thanks for your information.
> Hi Christoph, please see my comm
> Subject: Re: [PATCH V5 0/2] Change vring space from nomal memory to dma
> coherent memory
>
> On Wed, Oct 28, 2020 at 06:05:28AM +0000, Sherry Sun wrote:
> > Hi Greg,
> >
> > > Subject: Re: [PATCH V5 0/2] Change vring space from nomal memory to
> > &
will encounter a
problem. When host finished with descriptor, it will update the used
ring with putused_kern api, if reassign used ring at EP side, used
ring will be io device memory for RC, use memcpy in putused_kern will
cause kernel panic.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim
space.
Signed-off-by: Christoph Hellwig
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/bus/vop_bus.h| 2 +
drivers/misc/mic/host/mic_boot.c | 9 ++
drivers/misc/mic/host/mic_main.c | 43 +++---
drivers/misc/mic/vop/vop_vringh.c
Hi Sudeep,
> Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign the used
> ring
>
> On Wed, 2020-10-28 at 01:47 +0000, Sherry Sun wrote:
> > Hi Vincent,
> >
> > > Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign
> > >
l, as the
memory interacted between two systems should use consistent memory to avoid
caching effects. So here add noncoherent platform support for vop driver.
Also add some related dma changes to make sure noncoherent platform works
well.
Sherry Sun (2):
misc: vop: change the way of allocating v
Hi Vincent,
> Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign the used
> ring
>
> On Tue, Oct 27, 2020 at 08:05:43AM +0100, Sherry Sun wrote:
> > Can you help test the patch about removing the codes of reassign used
> > ring, and comment on the impac
20 at 10:17:39AM +, Andy Duan wrote:
> > > > From: Greg KH Sent: Wednesday,
> > > > October 28, 2020 3:07 PM
> > > > > On Wed, Oct 28, 2020 at 06:05:28AM +, Sherry Sun wrote:
> > > > > > Hi Greg,
> > > > > >
> &g
Hi Greg,
> Subject: Re: [PATCH V5 0/2] Change vring space from nomal memory to dma
> coherent memory
>
> On Wed, Oct 28, 2020 at 10:03:03AM +0800, Sherry Sun wrote:
> > Changes in V5:
> > 1. Reorganize the vop_mmap function code in patch 1, which is done by
> Christop
Hi Arnd,
> Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign the used
> ring
>
> (resending from the kernel.org address after getting bounces again)
>
> On Wed, Oct 28, 2020 at 7:29 AM Sherry Sun wrote:
> > > Subject: Re: [PATCH V3 2/4] misc: vop: d
mic_vqconfig.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/bus/vop_bus.h| 2 ++
drivers/misc/mic/host/mic_boot.c | 8
drivers/misc/mic/vop/vop_vringh.c | 8 +++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/mic/bus
Mapping kernel space memory to user space as noncached, since user space
need check the updates of avail_idx and device page flags timely.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/vop/vop_vringh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
t platform works
well.
Sherry Sun (4):
misc: vop: change the way of allocating vring and device page
misc: vop: do not allocate and reassign the used ring
misc: vop: simply return the saved dma address instead of virt_to_phys
misc: vop: mapping kernel memory to user space as noncached
dr
will encounter a
problem. When host finished with descriptor, it will update the used
ring with putused_kern api, if reassign used ring at EP side, used
ring will be io device memory for RC, use memcpy in putused_kern will
cause kernel panic.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim
dma_sync_single_for_cpu/device api to sync the
changes of vring between EP and RC, which will cause memory
synchronization problem for those devices which don't support hardware
dma coherent.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/host/mic_main.c
Hi Christoph,
>
> > static int mic_dp_init(struct mic_device *mdev) {
> > - mdev->dp = kzalloc(MIC_DP_SIZE, GFP_KERNEL);
> > + mdev->dp = dma_alloc_coherent(&mdev->pdev->dev, MIC_DP_SIZE,
> > + &mdev->dp_dma_addr, GFP_KERNEL);
> > if (!mdev->dp)
> >
Hi Greg & Christoph,
> Subject: Re: [PATCH V3 2/4] misc: vop: do not allocate and reassign the used
> ring
>
> On Thu, Oct 22, 2020 at 01:06:36PM +0800, Sherry Sun wrote:
> > We don't need to allocate and reassign the used ring here and remove
> > the used_
avoid
caching effects. So here add noncoherent platform support for vop driver.
Also add some related dma changes to make sure noncoherent platform works
well.
Sherry Sun (2):
misc: vop: change the way of allocating vring and device page
misc: vop: do not allocate and reassign the used ring
dr
will encounter a
problem. When host finished with descriptor, it will update the used
ring with putused_kern api, if reassign used ring at EP side, used
ring will be io device memory for RC, use memcpy in putused_kern will
cause kernel panic.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim
space.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/bus/vop_bus.h| 2 +
drivers/misc/mic/host/mic_boot.c | 9
drivers/misc/mic/host/mic_main.c | 43 +
drivers/misc/mic/vop/vop_vringh.c | 79 +--
4 files change
Hi Kishon,
> Subject: Re: [PATCH v7 15/18] NTB: Add support for EPF PCI-Express Non-
> Transparent Bridge
>
> Hi Sherry, Arnd,
>
> On 10/11/20 8:29 pm, Arnd Bergmann wrote:
> > On Tue, Nov 10, 2020 at 3:20 PM Kishon Vijay Abraham I
> wrote:
> >> O
Hi Kishon,
> Subject: Re: [PATCH v7 15/18] NTB: Add support for EPF PCI-Express Non-
> Transparent Bridge
>
> Hi Sherry,
>
> On 11/11/20 8:19 am, Sherry Sun wrote:
> > Hi Kishon,
> >
> >> Subject: Re: [PATCH v7 15/18] NTB: Add support for EPF P
Hi Kishon,
> Subject: [PATCH v7 15/18] NTB: Add support for EPF PCI-Express Non-
> Transparent Bridge
>
> From: Kishon Vijay Abraham I
>
> Add support for EPF PCI-Express Non-Transparent Bridge (NTB) device.
> This driver is platform independent and could be used by any platform which
> have mu
Hi Kishon,
> Subject: Re: [PATCH v7 15/18] NTB: Add support for EPF PCI-Express Non-
> Transparent Bridge
>
> Hi Sherry,
>
> On 09/11/20 3:07 pm, Sherry Sun wrote:
> > Hi Kishon,
> >
> >> Subject: [PATCH v7 15/18] NTB: Add support for EPF PCI-Express Non-
This patchset fix some bugs about the vop driver and Intel MIC user space tool
-- mpssd.
Sherry Sun (4):
samples: mpssd: fix the build errors when enable DEBUG in mpssd.c
misc: vop: build VOP based on CONFIG_VOP
misc: vop: add round_up(x,4) for vring_size to avoid kernel panic
mic: vop
);
^~~~
mpssd.c:361:1: note: expected ‘struct mic_copy_desc *’ but argument is of type
‘struct mic_copy_desc’
disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy,
^~
Signed-off-by: Sherry Sun
---
samples/mic/mpssd/mpssd.c | 20 ++--
1 file
c in struct _mic_vring_info.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_main.c | 2 +-
drivers/misc/mic/vop/vop_vringh.c | 4 ++--
samples/mic/mpssd/mpssd.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/mic/vop
Read and write io memory should address align on ARCH ARM. Change to use
memcpy_toio to avoid kernel panic caused by the address un-align issue.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_vringh.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion
Build module or builtin VOP based on CONFIG_VOP macro.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/vop/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mic/vop/Makefile b/drivers/misc/mic/vop/Makefile
index 579da3868c8e
Change the way of allocating vring to support noncoherent platform for vop
driver, and add some related dma changes to make sure noncoherent platform works
well.
Sherry Sun (5):
misc: vop: change the way of allocating vring for noncoherent platform
misc: vop: change the way of allocating
Mapping kernel space memory to user space as noncached for noncoherent
platform, since user space need check avail_idx and device page flags
timely.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc/mic/vop/vop_vringh.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
Set VIRTIO_F_ACCESS_PLATFORM feature for nocoherent platform, since
it needs the DMA API for virtio.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc
For noncoherent platform, we should allocate vring through
dma_alloc_coherent api to ensure timely synchronization of vring.
The orginal way which used __get_free_pages and dma_map_single only
apply to coherent platforms.
Signed-off-by: Joakim Zhang
Signed-off-by: Sherry Sun
---
drivers/misc
host finished with descriptor, it will update the used
ring with putused_kern function, if reassign used ring at EP side, used
ring will be io device memory for RC, use memcpy in putused_kern will
cause kernel panic.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mi
.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/bus/vop_bus.h| 2 ++
drivers/misc/mic/host/mic_boot.c | 8
drivers/misc/mic/vop/vop_vringh.c | 12 ++--
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/mic/bus
Add module autoprobing support for vop and cosm driver, when the vop/cosm device
appears, the driver will be autoloaded.
Sherry Sun (3):
mic: vop: fix a written error in MODULE_DEVICE_TABLE
mic: vop: module autoprobing support for vop drivers
mic: cosm: module autoprobing support for cosm
Add uevent callback for cosm_bus and add cosm_device_id for cosm driver
which is needed for MODULE_DEVICE_TABLE. Also adding struct
cosm_device_id in devicetable-offsets.c and the cosm entry point in
file2alias.c.
Cosm driver will be autoloaded when cosm device appears.
Signed-off-by: Sherry Sun
For vop bus, the first parameter should be vop in MODULE_DEVICE_TABLE.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers/misc/mic/vop/vop_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
Add vop autoprobing support to MODULE_DEVICE_TABLE() by adding info
about struct vop_device_id in devicetable-offsets.c and add a vop entry
point in file2alias.c.
The type argument for MODULE_DEVICE_TABLE(type, name) is vop.
Signed-off-by: Sherry Sun
Signed-off-by: Joakim Zhang
---
drivers
Hi Arnd,
> Subject: Re: [PATCH 4/4] mic: vop: copy data to kernel space then write to io
> memory
>
> On Fri, Sep 25, 2020 at 9:22 AM Sherry Sun wrote:
> >
>
> > @@ -655,12 +656,15 @@ static int vop_virtio_copy_from_user(struct
> vop_vdev *vdev, void __user *ubuf,
75 matches
Mail list logo