> In order to make the sparc64 iommu code "mpsafe", I need to make sure > the extent manager can be used in an mpsafe manner. The current code > isn't really safe since the extent manager needs to allocate region > descriptors whenever we do a bus_dmamap_load(). The diff below adds a > function to provide the extent manager with a region descriptor such > that the next extent_alloc_xxx() call can use that one instead of > allocating a new one. > > I deliberately chose to add a seperate API, since > extent_alloc_subregion() already has too many arguments. > > The 2nd diff shows how I use this in the sparc64 iommu code. > > opinions?
This is ugly. Better introduce an extent_alloc_with_descr() or extent_alloc_static() interface which is similar to extent_alloc(), but receives the extent descriptor as an added argument.
