GenWQE: Fix multithreading problems
authorFrank Haverkamp <haver@linux.vnet.ibm.com>
Thu, 20 Mar 2014 14:11:05 +0000 (15:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Apr 2014 19:12:39 +0000 (12:12 -0700)
commit718f762efc454796d02f172a929d051f2d6ec01a
tree13d8f9558b39963356082460de3ee6855454d972
parentebb2c96bb9214ba38c7fe35d5d725f6e7cb3bbc8
GenWQE: Fix multithreading problems

When being used in a multithreaded application there were problems
with memory pages/cachelines accessed by multiple threads/cpus at the
same time, while doing DMA transfers to/from those. To avoid such
situations this fix is creating a copy of the first and the last page
if it is not fully used. The data is copied from user-space into those
pages and results are copied back when the DDCB-request is
successfully finished.

Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/genwqe/card_base.h
drivers/misc/genwqe/card_dev.c
drivers/misc/genwqe/card_utils.c