Searched hist:a4c6040472ba638f2719f371fad92c83365f7332 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/s390/cio/ |
H A D | vfio_ccw_cp.c | diff a4c6040472ba638f2719f371fad92c83365f7332 Fri Oct 21 08:32:30 CDT 2022 Eric Farman <farman@linux.ibm.com> vfio/ccw: simplify CCW chain fetch routines
The act of processing a fetched CCW has two components:
1) Process a Transfer-in-channel (TIC) CCW 2) Process any other CCW
The former needs to look at whether the TIC jumps backwards into the current channel program or forwards into a new segment, while the latter just processes the CCW data address itself.
Rather than passing the chain segment and index within it to the handlers for the above, and requiring each to calculate the elements it needs, simply pass the needed pointers directly.
For the TIC, that means the CCW being processed and the location of the entire channel program which holds all segments. For the other CCWs, the page_array pointer is also needed to perform the page pinning, etc.
While at it, rename ccwchain_fetch_direct to _ccw, to indicate what it is. The name "_direct" is historical, when it used to process a direct-addressed CCW, but IDAs are processed here too.
Signed-off-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
|