aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDong Jia Shi <bjsdjshi@linux.ibm.com>2018-05-23 04:56:43 +0200
committerCornelia Huck <cohuck@redhat.com>2018-05-29 09:27:42 +0200
commit5c1cfb1c3948fe93a32dfcd75223dda0f1558bb7 (patch)
tree0bdfe7d0f47217483eba702bdada9a2e9d860ae8 /tools/perf/scripts/python
parent80c57f7a075b0c53944113e42ce114d8bf0977e4 (diff)
vfio: ccw: refactor and improve pfn_array_alloc_pin()
This refactors pfn_array_alloc_pin() and also improves it by adding defensive code in error handling so that calling pfn_array_unpin_free() after error return won't lead to problem. This mainly does: 1. Merge pfn_array_pin() into pfn_array_alloc_pin(), since there is no other user of pfn_array_pin(). As a result, also remove kernel-doc for pfn_array_pin() and add/update kernel-doc for pfn_array_alloc_pin() and struct pfn_array. 2. For a vfio_pin_pages() failure, set pa->pa_nr to zero to indicate zero pages were pinned. 3. Set pa->pa_iova_pfn to NULL right after it was freed. Suggested-by: Pierre Morel <pmorel@linux.ibm.com> Signed-off-by: Dong Jia Shi <bjsdjshi@linux.ibm.com> Message-Id: <20180523025645.8978-3-bjsdjshi@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions