Project

General

Profile

Feature #12183

Want new IPD 13 DMA Cookie APIs

Added by Robert Mustacchi 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

In IPD 13 a series of new APIs are suggested for DMA cookies to make the APIs easier and safer to use. This change implements the described APIs. This includes:

  • Introduc four new functions: ddi_dma_cookie_iter(), ddi_dma_cookie_get(), ddi_dma_cookie_one(), and ddi_dma_ncookies().
  • Allowing ddi_dma_addr_bind_handle(), ddi_dma_buf_bind_handle(), and ddi_dma_getwin(), to receive NULL arguments for the cookie-related pointers.
  • Adding additional checking around the correctness of ddi_dma_nextcookie().

History

#1

Updated by Robert Mustacchi 2 months ago

This has been tested mostly by others. Alex and Paul both tested it on systems where they were using the work in progress mlxcx driver. As a result this saw a bunch of exercise on various drivers. It also found an illegal read being performed by the nvme driver (see 12209). It was built on SPARC by Peter Tribble. I think this gives us a reasonable amount of confidence in this so far and at the least, it's utility has been proven. The new entry points were explicitly all used by the mlxcx driver.

#2

Updated by Electric Monk 2 months ago

  • Status changed from New to Closed

git commit 9a63ec2733c93e3ee31e95779a4f2f45a57eda59

commit  9a63ec2733c93e3ee31e95779a4f2f45a57eda59
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-01-31T19:47:17.000Z

    12183 Want new IPD 13 DMA Cookie APIs
    Reviewed by: Alex Wilson <alex@uq.edu.au>
    Reviewed by: Paul Winder <paul@winders.demon.co.uk>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF