Lines Matching refs:pp

107 #define	MLIST_MUTEX(pp) \  argument
108 &mlist_lock[((pp)->p_pagenum + ((pp)->p_pagenum >> 9)) & \
278 x86_hm_held(page_t *pp) in x86_hm_held() argument
280 ASSERT(pp != NULL); in x86_hm_held()
283 return (MUTEX_HELD(MLIST_MUTEX(pp))); in x86_hm_held()
287 x86_hm_enter(page_t *pp) in x86_hm_enter() argument
289 ASSERT(pp != NULL); in x86_hm_enter()
291 mutex_enter(MLIST_MUTEX(pp)); in x86_hm_enter()
295 x86_hm_exit(page_t *pp) in x86_hm_exit() argument
297 ASSERT(pp != NULL); in x86_hm_exit()
299 mutex_exit(MLIST_MUTEX(pp)); in x86_hm_exit()
306 hment_insert(hment_t *hm, page_t *pp) in hment_insert() argument
310 ASSERT(x86_hm_held(pp)); in hment_insert()
311 ASSERT(!pp->p_embed); in hment_insert()
316 ++pp->p_share; in hment_insert()
317 hm->hm_next = pp->p_mapping; in hment_insert()
318 if (pp->p_mapping != NULL) in hment_insert()
319 ((hment_t *)pp->p_mapping)->hm_prev = hm; in hment_insert()
320 pp->p_mapping = hm; in hment_insert()
349 hment_prepare(htable_t *htable, uint_t entry, page_t *pp) in hment_prepare() argument
353 ASSERT(x86_hm_held(pp)); in hment_prepare()
362 if (pp->p_mapping == NULL) { in hment_prepare()
363 ASSERT(!pp->p_embed); in hment_prepare()
364 ASSERT(pp->p_share == 0); in hment_prepare()
378 if (pp->p_embed) { in hment_prepare()
381 ASSERT(pp->p_mapping != NULL); in hment_prepare()
388 if (pp->p_mapping == htable && pp->p_mlentry == entry) { in hment_prepare()
399 hm->hm_htable = pp->p_mapping; in hment_prepare()
400 hm->hm_entry = pp->p_mlentry; in hment_prepare()
401 hm->hm_pfn = pp->p_pagenum; in hment_prepare()
402 pp->p_mapping = NULL; in hment_prepare()
403 pp->p_share = 0; in hment_prepare()
404 pp->p_embed = 0; in hment_prepare()
405 hment_insert(hm, pp); in hment_prepare()
423 x86_hm_exit(pp); in hment_prepare()
425 x86_hm_enter(pp); in hment_prepare()
432 x86_hm_exit(pp); in hment_prepare()
435 x86_hm_enter(pp); in hment_prepare()
437 ASSERT(x86_hm_held(pp)); in hment_prepare()
447 hment_assign(htable_t *htable, uint_t entry, page_t *pp, hment_t *hm) in hment_assign() argument
449 ASSERT(x86_hm_held(pp)); in hment_assign()
456 if (pp->p_mapping == NULL) { in hment_assign()
458 ASSERT(!pp->p_embed); in hment_assign()
459 ASSERT(pp->p_share == 0); in hment_assign()
460 pp->p_embed = 1; in hment_assign()
461 pp->p_mapping = htable; in hment_assign()
462 pp->p_mlentry = entry; in hment_assign()
469 ASSERT(!pp->p_embed); in hment_assign()
477 hm->hm_pfn = pp->p_pagenum; in hment_assign()
478 hment_insert(hm, pp); in hment_assign()
487 hment_walk(page_t *pp, htable_t **ht, uint_t *entry, hment_t *prev) in hment_walk() argument
491 ASSERT(x86_hm_held(pp)); in hment_walk()
493 if (pp->p_embed) { in hment_walk()
495 *ht = (htable_t *)pp->p_mapping; in hment_walk()
496 *entry = pp->p_mlentry; in hment_walk()
505 hm = (hment_t *)pp->p_mapping; in hment_walk()
525 hment_remove(page_t *pp, htable_t *ht, uint_t entry) in hment_remove() argument
532 ASSERT(x86_hm_held(pp)); in hment_remove()
537 if (pp->p_embed) { in hment_remove()
538 ASSERT(ht == (htable_t *)pp->p_mapping); in hment_remove()
539 ASSERT(entry == pp->p_mlentry); in hment_remove()
540 ASSERT(pp->p_share == 0); in hment_remove()
541 pp->p_mapping = NULL; in hment_remove()
542 pp->p_mlentry = 0; in hment_remove()
543 pp->p_embed = 0; in hment_remove()
551 ASSERT(pp->p_share != 0); in hment_remove()
554 dummy.hm_pfn = pp->p_pagenum; in hment_remove()
560 "entry=0x%x hash index=0x%x", (uintptr_t)pp, (uintptr_t)ht, in hment_remove()
573 pp->p_mapping = hm->hm_next; in hment_remove()
575 --pp->p_share; in hment_remove()
666 hment_mapcnt(page_t *pp) in hment_mapcnt() argument
673 x86_hm_enter(pp); in hment_mapcnt()
674 if (pp->p_mapping == NULL) in hment_mapcnt()
676 else if (pp->p_embed) in hment_mapcnt()
679 cnt = pp->p_share; in hment_mapcnt()
680 x86_hm_exit(pp); in hment_mapcnt()
685 for (szc = 1; szc <= pp->p_szc; ++szc) { in hment_mapcnt()
686 larger = PP_GROUPLEADER(pp, szc); in hment_mapcnt()
687 if (larger == pp) /* don't double count large mappings */ in hment_mapcnt()
720 page_t *pp = last; in hment_steal() local
727 if (pp == NULL) in hment_steal()
728 last = pp = page_first(); in hment_steal()
732 pp = page_next(pp); in hment_steal()
733 if (pp == NULL) in hment_steal()
734 pp = page_first(); in hment_steal()
739 if (pp == last) in hment_steal()
745 if (pp->p_mapping == NULL || pp->p_embed) in hment_steal()
751 x86_hm_enter(pp); in hment_steal()
752 if (!pp->p_embed) { in hment_steal()
753 for (hm = pp->p_mapping; hm; hm = hm->hm_next) { in hment_steal()
764 x86_hm_exit(pp); in hment_steal()
771 hm2 = hati_page_unmap(pp, ht, hm->hm_entry); in hment_steal()
773 last_page = pp; in hment_steal()