]> git.baikalelectronics.ru Git - kernel.git/commit
s390/vfio-ap: use new AP bus interface to search for queue devices
authorTony Krowiak <akrowiak@linux.ibm.com>
Thu, 28 Jan 2021 20:53:07 +0000 (15:53 -0500)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 19 Jul 2022 14:18:08 +0000 (16:18 +0200)
commitd14c132edd165011ece7cd7df380a4ba4ab7f27e
tree182b193a15b119ec7eb10044051eb066ea8ed0c2
parent912d7f8012b9bb168b14577885a69722008ca610
s390/vfio-ap: use new AP bus interface to search for queue devices

This patch refactors the vfio_ap device driver to use the AP bus's
ap_get_qdev() function to retrieve the vfio_ap_queue struct containing
information about a queue that is bound to the vfio_ap device driver.
The bus's ap_get_qdev() function retrieves the queue device from a
hashtable keyed by APQN. This is much more efficient than looping over
the list of devices attached to the AP bus by several orders of
magnitude.

Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/crypto/vfio_ap_ops.c