• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/ahci/

Lines Matching defs:region

55     // the index of the backing region of memory
198 if (first_free == NULL) { // first region
247 // we were the first free in our backing region, and there is
248 // another free chunk in the same region: make that chunk first_free
249 // in our backing region
253 // no other free chunks in our backing region, clear first_free
261 * by f ensuring that the resulting address for the return region is aligned to
276 // set the backing region in the new ahci_dma_region
278 AHCI_DEBUG("backing region = %zd\n", f->backing_region);
321 // calculate the offset into the backing region
343 * Allocate a dma region aligned to a multiple of alignment_requirement.
344 * \param size the minimum size of the requested region
380 // the address of the free region. Search more.
391 AHCI_DEBUG("did not find sufficiently large free region, trying to grow pool.\n");
410 * Allocate a new dma region with alignment requirement 512
411 * \param size the minimum size of the requested region
423 * Insert dma region region into free list.
424 * \param region region to insert into free list
427 return_region(struct ahci_dma_region *region)
429 AHCI_TRACE_ENTER("region = %p; region->vaddr = %p", region, region->vaddr);
431 // no free chunks. init free list with current region
432 AHCI_DEBUG("no free chunks. init free list with current region\n");
433 first_free = last_free = region->vaddr;
434 first_free->size = region->size;
435 first_free->backing_region = region->backing_region;
441 struct free *n = pool.first_free[region->backing_region];
443 f = region->vaddr;
444 f->size = region->size;
445 f->backing_region = region->backing_region;
450 // current region only free in backing block
451 AHCI_DEBUG("current region only free in backing block\n");
452 pool.first_free[region->backing_region] = f;
453 if (region->backing_region >= pool.addr_count) {
454 // we are in the last backing block && only free region in block
463 // find next backing region with free chunks
465 size_t br = region->backing_region + 1;
479 // we didn't find any backing region after ours with free
496 } // end current region only free in backing block
502 while (n && (void *)n < region->vaddr) {
524 // first_free of our backing region
529 // we are first free in our region
530 AHCI_DEBUG("first free in region\n");
591 * Free ahci_dma_region region
592 * \param region the dma region to free
595 ahci_dma_region_free(struct ahci_dma_region *region)
597 AHCI_TRACE_ENTER("region = %p", region);
599 errval_t err = return_region(region);
604 free(region);