Lines Matching refs:pp

111 #define	MLIST_MUTEX(pp) \  argument
112 &mlist_lock[((pp)->p_pagenum + ((pp)->p_pagenum >> 9)) & \
282 x86_hm_held(page_t *pp) in x86_hm_held() argument
284 ASSERT(pp != NULL); in x86_hm_held()
287 return (MUTEX_HELD(MLIST_MUTEX(pp))); in x86_hm_held()
291 x86_hm_enter(page_t *pp) in x86_hm_enter() argument
293 ASSERT(pp != NULL); in x86_hm_enter()
295 mutex_enter(MLIST_MUTEX(pp)); in x86_hm_enter()
299 x86_hm_exit(page_t *pp) in x86_hm_exit() argument
301 ASSERT(pp != NULL); in x86_hm_exit()
303 mutex_exit(MLIST_MUTEX(pp)); in x86_hm_exit()
310 hment_insert(hment_t *hm, page_t *pp) in hment_insert() argument
314 ASSERT(x86_hm_held(pp)); in hment_insert()
315 ASSERT(!pp->p_embed); in hment_insert()
320 ++pp->p_share; in hment_insert()
321 hm->hm_next = pp->p_mapping; in hment_insert()
322 if (pp->p_mapping != NULL) in hment_insert()
323 ((hment_t *)pp->p_mapping)->hm_prev = hm; in hment_insert()
324 pp->p_mapping = hm; in hment_insert()
353 hment_prepare(htable_t *htable, uint_t entry, page_t *pp) in hment_prepare() argument
357 ASSERT(x86_hm_held(pp)); in hment_prepare()
366 if (pp->p_mapping == NULL) { in hment_prepare()
367 ASSERT(!pp->p_embed); in hment_prepare()
368 ASSERT(pp->p_share == 0); in hment_prepare()
382 if (pp->p_embed) { in hment_prepare()
385 ASSERT(pp->p_mapping != NULL); in hment_prepare()
392 if (pp->p_mapping == htable && pp->p_mlentry == entry) { in hment_prepare()
403 hm->hm_htable = pp->p_mapping; in hment_prepare()
404 hm->hm_entry = pp->p_mlentry; in hment_prepare()
405 hm->hm_pfn = pp->p_pagenum; in hment_prepare()
406 pp->p_mapping = NULL; in hment_prepare()
407 pp->p_share = 0; in hment_prepare()
408 pp->p_embed = 0; in hment_prepare()
409 hment_insert(hm, pp); in hment_prepare()
427 x86_hm_exit(pp); in hment_prepare()
429 x86_hm_enter(pp); in hment_prepare()
436 x86_hm_exit(pp); in hment_prepare()
439 x86_hm_enter(pp); in hment_prepare()
441 ASSERT(x86_hm_held(pp)); in hment_prepare()
451 hment_assign(htable_t *htable, uint_t entry, page_t *pp, hment_t *hm) in hment_assign() argument
453 ASSERT(x86_hm_held(pp)); in hment_assign()
460 if (pp->p_mapping == NULL) { in hment_assign()
462 ASSERT(!pp->p_embed); in hment_assign()
463 ASSERT(pp->p_share == 0); in hment_assign()
464 pp->p_embed = 1; in hment_assign()
465 pp->p_mapping = htable; in hment_assign()
466 pp->p_mlentry = entry; in hment_assign()
473 ASSERT(!pp->p_embed); in hment_assign()
481 hm->hm_pfn = pp->p_pagenum; in hment_assign()
482 hment_insert(hm, pp); in hment_assign()
491 hment_walk(page_t *pp, htable_t **ht, uint_t *entry, hment_t *prev) in hment_walk() argument
495 ASSERT(x86_hm_held(pp)); in hment_walk()
497 if (pp->p_embed) { in hment_walk()
499 *ht = (htable_t *)pp->p_mapping; in hment_walk()
500 *entry = pp->p_mlentry; in hment_walk()
509 hm = (hment_t *)pp->p_mapping; in hment_walk()
529 hment_remove(page_t *pp, htable_t *ht, uint_t entry) in hment_remove() argument
536 ASSERT(x86_hm_held(pp)); in hment_remove()
541 if (pp->p_embed) { in hment_remove()
542 ASSERT(ht == (htable_t *)pp->p_mapping); in hment_remove()
543 ASSERT(entry == pp->p_mlentry); in hment_remove()
544 ASSERT(pp->p_share == 0); in hment_remove()
545 pp->p_mapping = NULL; in hment_remove()
546 pp->p_mlentry = 0; in hment_remove()
547 pp->p_embed = 0; in hment_remove()
555 ASSERT(pp->p_share != 0); in hment_remove()
558 dummy.hm_pfn = pp->p_pagenum; in hment_remove()
564 "entry=0x%x hash index=0x%x", (uintptr_t)pp, (uintptr_t)ht, in hment_remove()
577 pp->p_mapping = hm->hm_next; in hment_remove()
579 --pp->p_share; in hment_remove()
670 hment_mapcnt(page_t *pp) in hment_mapcnt() argument
677 x86_hm_enter(pp); in hment_mapcnt()
678 if (pp->p_mapping == NULL) in hment_mapcnt()
680 else if (pp->p_embed) in hment_mapcnt()
683 cnt = pp->p_share; in hment_mapcnt()
684 x86_hm_exit(pp); in hment_mapcnt()
689 for (szc = 1; szc <= pp->p_szc; ++szc) { in hment_mapcnt()
690 larger = PP_GROUPLEADER(pp, szc); in hment_mapcnt()
691 if (larger == pp) /* don't double count large mappings */ in hment_mapcnt()
724 page_t *pp = last; in hment_steal() local
731 if (pp == NULL) in hment_steal()
732 last = pp = page_first(); in hment_steal()
736 pp = page_next(pp); in hment_steal()
737 if (pp == NULL) in hment_steal()
738 pp = page_first(); in hment_steal()
743 if (pp == last) in hment_steal()
749 if (pp->p_mapping == NULL || pp->p_embed) in hment_steal()
755 x86_hm_enter(pp); in hment_steal()
756 if (!pp->p_embed) { in hment_steal()
757 for (hm = pp->p_mapping; hm; hm = hm->hm_next) { in hment_steal()
768 x86_hm_exit(pp); in hment_steal()
775 hm2 = hati_page_unmap(pp, ht, hm->hm_entry); in hment_steal()
777 last_page = pp; in hment_steal()