Lines Matching refs:plp
289 pmem_lpg_t *plp = NULL; in devmap_pmem_alloc() local
344 if (lpp_create(&lpp, i, &lpages, &plp, pcp->dp_vnp, &pmem_off, in devmap_pmem_alloc()
355 lpp_break(&lpp, lpages, lpages - rpages, plp); in devmap_pmem_alloc()
370 pmem_lpg_concat(&pmem_occ_lpgs, &plp); in devmap_pmem_alloc()
392 lpp_free(lpp, lpages / pmem_pgcnt, &plp); in devmap_pmem_alloc()
423 pmem_lpg_t *pl1, *plp; in devmap_pmem_free() local
446 plp = pmem_lpg_get(pmem_occ_lpgs, pp, &last_pl); in devmap_pmem_free()
447 if (plp && !(plp->pl_pfree)) { in devmap_pmem_free()
452 pmem_lpg_sub(&pmem_occ_lpgs, plp); in devmap_pmem_free()
453 pmem_lpg_concat(&pf_lpgs, &plp); in devmap_pmem_free()
454 plp->pl_pfree = 1; in devmap_pmem_free()
459 plp = pmem_lpg_get(pf_lpgs, pp, &plast_pl); in devmap_pmem_free()
461 ASSERT(plp); in devmap_pmem_free()
463 BT_SET(plp->pl_bitmap, PFIND(pp)); in devmap_pmem_free()
473 for (plp = pf_lpgs; npls != 0; npls--) { in devmap_pmem_free()
474 pl1 = plp; in devmap_pmem_free()
475 plp = plp->pl_next; in devmap_pmem_free()
566 lpg_isfree(pmem_lpg_t *plp) in lpg_isfree() argument
571 if (plp->pl_bitmap[i] != BT_ULMAXMASK) in lpg_isfree()
585 pmem_lpg_t *plp; in pmem_lpg_get() local
598 for (plp = splp; root_pfn != page_pptonum(plp->pl_pp); ) { in pmem_lpg_get()
599 plp = plp->pl_next; in pmem_lpg_get()
600 if (plp == splp) { in pmem_lpg_get()
601 plp = NULL; in pmem_lpg_get()
604 ASSERT(plp->pl_pp); in pmem_lpg_get()
607 *last = plp; in pmem_lpg_get()
617 pmem_lpg_sub(pmem_lpg_t **oplpp, pmem_lpg_t *plp) in pmem_lpg_sub() argument
619 if (*oplpp == plp) in pmem_lpg_sub()
620 *oplpp = plp->pl_next; /* go to next pmem_lpg */ in pmem_lpg_sub()
622 if (*oplpp == plp) in pmem_lpg_sub()
625 plp->pl_prev->pl_next = plp->pl_next; in pmem_lpg_sub()
626 plp->pl_next->pl_prev = plp->pl_prev; in pmem_lpg_sub()
628 plp->pl_prev = plp->pl_next = plp; /* make plp a list of one */ in pmem_lpg_sub()
663 pmem_lpg_t *plp; in pmem_lpg_alloc() local
666 plp = kmem_zalloc(sizeof (pmem_lpg_t), kflags); in pmem_lpg_alloc()
667 if (plp == NULL) in pmem_lpg_alloc()
669 plp->pl_bitmap = kmem_zalloc(BT_SIZEOFMAP(pmem_pgcnt), kflags); in pmem_lpg_alloc()
670 if (plp->pl_bitmap == NULL) { in pmem_lpg_alloc()
671 kmem_free(plp, sizeof (*plp)); in pmem_lpg_alloc()
674 plp->pl_next = plp->pl_prev = plp; in pmem_lpg_alloc()
675 return (plp); in pmem_lpg_alloc()
680 pmem_lpg_free(pmem_lpg_t **headp, pmem_lpg_t *plp) in pmem_lpg_free() argument
682 if (*headp == plp) in pmem_lpg_free()
683 *headp = plp->pl_next; /* go to next pmem_lpg_t */ in pmem_lpg_free()
685 if (*headp == plp) in pmem_lpg_free()
688 plp->pl_prev->pl_next = plp->pl_next; in pmem_lpg_free()
689 plp->pl_next->pl_prev = plp->pl_prev; in pmem_lpg_free()
691 kmem_free(plp->pl_bitmap, BT_SIZEOFMAP(pmem_pgcnt)); in pmem_lpg_free()
692 kmem_free(plp, sizeof (*plp)); in pmem_lpg_free()
754 pmem_lpg_t *plp; in lpp_create() local
767 if ((plp = pmem_lpg_alloc(kflags)) == NULL) in lpp_create()
769 plp->pl_pp = pp; in lpp_create()
770 pmem_lpg_concat(plpp, &plp); in lpp_create()
784 pmem_lpg_t *plp; in lpp_break() local
792 plp = oplp->pl_prev; in lpp_break()
798 BT_SET(plp->pl_bitmap, PFIND(pp1)); in lpp_break()
846 pmem_lpg_t *plp, *last_pl = NULL; in tlist_in() local
853 plp = pmem_lpg_get(pmem_occ_lpgs, pp, &last_pl); in tlist_in()
855 BT_CLEAR(plp->pl_bitmap, PFIND(pp)); in tlist_in()
871 pmem_lpg_t *plp, *last_pl = NULL; in tlist_out() local
878 plp = pmem_lpg_get(pmem_occ_lpgs, pp, &last_pl); in tlist_out()
880 BT_SET(plp->pl_bitmap, PFIND(pp)); in tlist_out()