All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 00/16]  vme DMA and user space driver improvements
@ 2015-05-28 12:06 Dmitry Kalinkin
  2015-05-28 12:06 ` [PATCHv3 01/16] Documentation: mention vme_master_mmap() in VME API Dmitry Kalinkin
                   ` (16 more replies)
  0 siblings, 17 replies; 49+ messages in thread
From: Dmitry Kalinkin @ 2015-05-28 12:06 UTC (permalink / raw)
  To: linux-kernel, devel
  Cc: Martyn Welch, Manohar Vanga, Greg Kroah-Hartman, Igor Alekseev,
	Dmitry Kalinkin

The first item in this submission documents previously introduced
vme_master_mmap() call. Following, there are three fixes for the tsi148
driver's DMA.  There was one bug that rendered it imposible to use DMA
lists with more than one item. The other was related to the place where
dma_map_single was called on the first DMA descriptor in the DMA list. The     
last bug was about DMA transfer not stopping at interruption by signal,        
which is a possible DoS attack vector. I also made an attempt to fix the
same issue in the ca91cx42 driver. I don't have access to this hardware to
test, so this is based only on my understanding of the datasheet (checked      
ca91c042's errata as well).

A new /sys/bus/vme/dma0 device with a new ioctl for making DMA transfers
was introduced in vme_user driver. The logic of the function is similar to     
the one found in existing drivers.

One question that I had while implementing this feature was whether we         
should keep vme_dma_attr objects until vme_dma_list_exec() call. API
doesn't specify this, the existing vme bridge drivers copy all information
from attributes during vme_dma_list_add(). So for simplicity this              
implementation frees vme_dma_attr's before vme_dma_list_exec() is done.        

A simple test against AVM16 board displays speeds around 45 MiB/s for
A32/D32 reads for both BLT and MBLT (with MBLT being slightly faster).         
 
Changes in v2 [patches 1-6, now 1-5 and 8]:
 * vme_addr check for vme_user DMA                                             
 * limit on DMA operation length in vme_user
 * reorder dma_op ioctl struct to omit __packed attribute                     
 * change dma_op->write into dma_op->dir                                       
 * use vme_check_window assure DMA operation correctness                       

New changes include vme_user code cleanup, a couple of ca91cx42 fixes
(again, tested for compilation only).

I also propose a change to export some of VME subsytem related constants
to the user space. These can be useful if vme_user is to go into the kernel.
Also, email
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2012-July/029084.html
mentions that we probably can now get rid of this comment:
> /* XXX  We do not want to push aspace, cycle and width
>  *      to userspace as they are
>  */

v3 adresses code style problems

Dmitry Kalinkin (16):
  Documentation: mention vme_master_mmap() in VME API
  vme: tsi148: fix DMA lists longer that one item
  vme: tsi148: fix first DMA item mapping
  vme: stop DMA transfer on interruption
  staging: vme_user: refactor llseek to switch(){}
  vme: check for A64 overflow in vme_check_window()
  vme: export vme_check_window()
  staging: vme_user: provide DMA functionality
  vme: ca91cx42: return error code on DMA error
  vme: ca91cx42: fix LM_CTL address mask
  staging: vme_user: remove unused counters
  staging: vme_user: remove forward declarations
  staging: vme_user: remove open/release
  staging: vme_user: remove buf_unalloc helper
  vme: tsi148: depend on HAS_DMA for Kconfig
  vme: provide uapi header

 Documentation/vme_api.txt              |   6 +
 drivers/staging/vme/devices/vme_user.c | 454 +++++++++++++++++++--------------
 drivers/staging/vme/devices/vme_user.h |  11 +
 drivers/vme/bridges/Kconfig            |   2 +-
 drivers/vme/bridges/vme_ca91cx42.c     |  18 +-
 drivers/vme/bridges/vme_ca91cx42.h     |   2 +-
 drivers/vme/bridges/vme_tsi148.c       |  42 +--
 drivers/vme/vme.c                      |  11 +-
 include/linux/vme.h                    |  56 +---
 include/uapi/linux/Kbuild              |   1 +
 include/uapi/linux/vme.h               |  56 ++++
 11 files changed, 394 insertions(+), 265 deletions(-)
 create mode 100644 include/uapi/linux/vme.h

-- 
1.8.3.1


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

end of thread, other threads:[~2015-07-20  8:09 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-28 12:06 [PATCHv3 00/16] vme DMA and user space driver improvements Dmitry Kalinkin
2015-05-28 12:06 ` [PATCHv3 01/16] Documentation: mention vme_master_mmap() in VME API Dmitry Kalinkin
2015-05-28 12:06 ` [PATCHv3 02/16] vme: tsi148: fix DMA lists longer that one item Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 03/16] vme: tsi148: fix first DMA item mapping Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 04/16] vme: stop DMA transfer on interruption Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 05/16] staging: vme_user: refactor llseek to switch(){} Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 06/16] vme: check for A64 overflow in vme_check_window() Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 07/16] vme: export vme_check_window() Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 08/16] staging: vme_user: provide DMA functionality Dmitry Kalinkin
2015-06-13  0:28   ` Greg Kroah-Hartman
2015-07-06 13:22     ` Martyn Welch
2015-07-06 13:50       ` Dmitry Kalinkin
2015-07-06 14:48         ` Martyn Welch
2015-07-06 17:24           ` Dmitry Kalinkin
2015-07-07  7:13             ` Alessio Igor Bogani
     [not found]             ` <CAPk1OjEX7YX5J=yMPOGyGg7ZT6P-iKtaGRDDv2oARPFUcdnKnQ@mail.gmail.com>
2015-07-07 10:52               ` Dmitry Kalinkin
2015-07-08 13:57                 ` Martyn Welch
2015-07-08 14:47                   ` Dmitry Kalinkin
     [not found]               ` <78FC1849-FFE4-49E5-8421-25D27324F790@gmail.com>
2015-07-07 12:51                 ` Alessio Igor Bogani
2015-07-07 13:04                   ` Dmitry Kalinkin
2015-07-08 13:41                   ` Martyn Welch
2015-07-08 14:39                     ` Dmitry Kalinkin
2015-07-08 14:42                     ` [PATCH] vme: lower alignment requirement in pci bridge drivers Dmitry Kalinkin
2015-07-08 13:28               ` [PATCHv3 08/16] staging: vme_user: provide DMA functionality Martyn Welch
2015-07-08 13:22             ` Martyn Welch
2015-07-08 15:02               ` Generic VME UIO driver Dmitry Kalinkin
2015-07-20  8:09                 ` Martyn Welch
2015-05-28 12:07 ` [PATCHv3 09/16] vme: ca91cx42: return error code on DMA error Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 10/16] vme: ca91cx42: fix LM_CTL address mask Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 11/16] staging: vme_user: remove unused counters Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 12/16] staging: vme_user: remove forward declarations Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 13/16] staging: vme_user: remove open/release Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 14/16] staging: vme_user: remove buf_unalloc helper Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 15/16] vme: tsi148: depend on HAS_DMA for Kconfig Dmitry Kalinkin
2015-05-28 12:07 ` [PATCHv3 16/16] vme: provide uapi header Dmitry Kalinkin
2015-06-13  0:30   ` Greg Kroah-Hartman
2015-05-31  3:06 ` [PATCHv3 00/16] vme DMA and user space driver improvements Greg Kroah-Hartman
2015-06-10 13:09   ` Dmitry Kalinkin
2015-06-13  0:31     ` Greg Kroah-Hartman
2015-06-13  2:04       ` Dmitry Kalinkin
2015-06-13  2:24         ` Greg Kroah-Hartman
2015-06-13  2:30           ` Dmitry Kalinkin
2015-06-13  4:40             ` Greg Kroah-Hartman
2015-06-13 13:34               ` [PATCHv4 0/4] " Dmitry Kalinkin
2015-06-13 13:34                 ` [PATCHv4 1/4] staging: vme_user: remove forward declarations Dmitry Kalinkin
2015-06-13 13:34                 ` [PATCHv4 2/4] staging: vme_user: remove open/release Dmitry Kalinkin
2015-06-13 13:34                 ` [PATCHv4 3/4] staging: vme_user: remove buf_unalloc helper Dmitry Kalinkin
2015-06-13 13:34                 ` [PATCHv4 4/4] staging: vme_user: provide DMA functionality Dmitry Kalinkin
2015-06-13 21:47                 ` [PATCHv4 0/4] vme DMA and user space driver improvements Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.