OSDN Git Service

vfio-ccw: Factor out the ccw0-to-ccw1 transition
authorEric Farman <farman@linux.ibm.com>
Tue, 18 Jun 2019 20:23:51 +0000 (22:23 +0200)
committerCornelia Huck <cohuck@redhat.com>
Fri, 21 Jun 2019 12:13:11 +0000 (14:13 +0200)
commit7f8e89a8f2fdb58461b01bb33ed8a5aa8119bf17
tree71f1a034a700358c5e855f8b70ce69f4bfe6075e
parentded563f31d0eb4de0bcb101b755cdf6f4ed805e4
vfio-ccw: Factor out the ccw0-to-ccw1 transition

This is a really useful function, but it's buried in the
copy_ccw_from_iova() routine so that ccwchain_calc_length()
can just work with Format-1 CCWs while doing its counting.
But it means we're translating a full 2K of "CCWs" to Format-1,
when in reality there's probably far fewer in that space.

Let's factor it out, so maybe we can do something with it later.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20190618202352.39702-5-farman@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
drivers/s390/cio/vfio_ccw_cp.c