Lines Matching refs:hp

285 seg_padd_abuck(struct seg_phash *hp)  in seg_padd_abuck()  argument
289 ASSERT(MUTEX_HELD(&hp->p_hmutex)); in seg_padd_abuck()
290 ASSERT((struct seg_phash *)hp->p_hnext != hp); in seg_padd_abuck()
291 ASSERT((struct seg_phash *)hp->p_hprev != hp); in seg_padd_abuck()
292 ASSERT(hp->p_hnext == hp->p_hprev); in seg_padd_abuck()
293 ASSERT(!IS_PCP_WIRED(hp->p_hnext)); in seg_padd_abuck()
294 ASSERT(hp->p_hnext->p_hnext == (struct seg_pcache *)hp); in seg_padd_abuck()
295 ASSERT(hp->p_hprev->p_hprev == (struct seg_pcache *)hp); in seg_padd_abuck()
296 ASSERT(hp >= seg_phashtab_win && in seg_padd_abuck()
297 hp < &seg_phashtab_win[seg_phashsize_win]); in seg_padd_abuck()
307 if (hp->p_halink[lix].p_lnext != NULL) { in seg_padd_abuck()
308 ASSERT(hp->p_halink[lix].p_lprev != NULL); in seg_padd_abuck()
309 ASSERT(hp->p_halink[!lix].p_lnext == NULL); in seg_padd_abuck()
310 ASSERT(hp->p_halink[!lix].p_lprev == NULL); in seg_padd_abuck()
314 ASSERT(hp->p_halink[lix].p_lprev == NULL); in seg_padd_abuck()
321 if (hp->p_halink[!lix].p_lnext != NULL) { in seg_padd_abuck()
322 ASSERT(hp->p_halink[!lix].p_lprev != NULL); in seg_padd_abuck()
326 ASSERT(hp->p_halink[!lix].p_lprev == NULL); in seg_padd_abuck()
331 hp->p_halink[lix].p_lnext = &seg_pahhead[lix]; in seg_padd_abuck()
332 hp->p_halink[lix].p_lprev = seg_pahhead[lix].p_lprev; in seg_padd_abuck()
333 seg_pahhead[lix].p_lprev->p_lnext = &hp->p_halink[lix]; in seg_padd_abuck()
334 seg_pahhead[lix].p_lprev = &hp->p_halink[lix]; in seg_padd_abuck()
339 seg_premove_abuck(struct seg_phash *hp, int athr) in seg_premove_abuck() argument
343 ASSERT(MUTEX_HELD(&hp->p_hmutex)); in seg_premove_abuck()
344 ASSERT((struct seg_phash *)hp->p_hnext == hp); in seg_premove_abuck()
345 ASSERT((struct seg_phash *)hp->p_hprev == hp); in seg_premove_abuck()
346 ASSERT(hp >= seg_phashtab_win && in seg_premove_abuck()
347 hp < &seg_phashtab_win[seg_phashsize_win]); in seg_premove_abuck()
360 ASSERT(hp->p_halink[lix].p_lnext != NULL); in seg_premove_abuck()
361 ASSERT(hp->p_halink[lix].p_lprev != NULL); in seg_premove_abuck()
362 ASSERT(hp->p_halink[!lix].p_lnext == NULL); in seg_premove_abuck()
363 ASSERT(hp->p_halink[!lix].p_lprev == NULL); in seg_premove_abuck()
364 hp->p_halink[lix].p_lnext->p_lprev = hp->p_halink[lix].p_lprev; in seg_premove_abuck()
365 hp->p_halink[lix].p_lprev->p_lnext = hp->p_halink[lix].p_lnext; in seg_premove_abuck()
366 hp->p_halink[lix].p_lnext = NULL; in seg_premove_abuck()
367 hp->p_halink[lix].p_lprev = NULL; in seg_premove_abuck()
379 if (hp->p_halink[lix].p_lnext != NULL) { in seg_premove_abuck()
380 ASSERT(hp->p_halink[lix].p_lprev != NULL); in seg_premove_abuck()
381 ASSERT(hp->p_halink[!lix].p_lnext == NULL); in seg_premove_abuck()
382 ASSERT(hp->p_halink[!lix].p_lprev == NULL); in seg_premove_abuck()
383 hp->p_halink[lix].p_lnext->p_lprev = hp->p_halink[lix].p_lprev; in seg_premove_abuck()
384 hp->p_halink[lix].p_lprev->p_lnext = hp->p_halink[lix].p_lnext; in seg_premove_abuck()
385 hp->p_halink[lix].p_lnext = NULL; in seg_premove_abuck()
386 hp->p_halink[lix].p_lprev = NULL; in seg_premove_abuck()
390 ASSERT(hp->p_halink[lix].p_lprev == NULL); in seg_premove_abuck()
400 ASSERT(hp->p_halink[lix].p_lnext != NULL); in seg_premove_abuck()
401 ASSERT(hp->p_halink[lix].p_lprev != NULL); in seg_premove_abuck()
404 hp->p_halink[lix].p_lnext->p_lprev = hp->p_halink[lix].p_lprev; in seg_premove_abuck()
405 hp->p_halink[lix].p_lprev->p_lnext = hp->p_halink[lix].p_lnext; in seg_premove_abuck()
406 hp->p_halink[lix].p_lnext = NULL; in seg_premove_abuck()
407 hp->p_halink[lix].p_lprev = NULL; in seg_premove_abuck()
422 seg_plookup_checkdup(struct seg_phash *hp, void *htag0, in seg_plookup_checkdup() argument
428 ASSERT(MUTEX_HELD(&hp->p_hmutex)); in seg_plookup_checkdup()
431 for (pcp = hp->p_hnext; pcp != (struct seg_pcache *)hp; in seg_plookup_checkdup()
433 ASSERT(pcp->p_hashp == hp); in seg_plookup_checkdup()
467 struct seg_phash *hp; in seg_plookup() local
483 hp = P_HASHBP(seg, htag0, addr, flags); in seg_plookup()
484 mutex_enter(&hp->p_hmutex); in seg_plookup()
485 for (pcp = hp->p_hnext; pcp != (struct seg_pcache *)hp; in seg_plookup()
487 ASSERT(pcp->p_hashp == hp); in seg_plookup()
508 mutex_exit(&hp->p_hmutex); in seg_plookup()
512 mutex_exit(&hp->p_hmutex); in seg_plookup()
529 struct seg_phash *hp; in seg_pinactive() local
563 hp = P_HASHBP(seg, htag0, addr, flags); in seg_pinactive()
564 mutex_enter(&hp->p_hmutex); in seg_pinactive()
566 for (pcp = hp->p_hnext; pcp != (struct seg_pcache *)hp; in seg_pinactive()
568 ASSERT(pcp->p_hashp == hp); in seg_pinactive()
612 hp->p_hnext == (struct seg_pcache *)hp) { in seg_pinactive()
618 seg_premove_abuck(hp, 0); in seg_pinactive()
620 mutex_exit(&hp->p_hmutex); in seg_pinactive()
648 mutex_exit(&hp->p_hmutex); in seg_pinactive()
696 mutex_exit(&hp->p_hmutex); in seg_pinactive()
698 mutex_enter(&hp->p_hmutex); in seg_pinactive()
710 mutex_exit(&hp->p_hmutex); in seg_pinactive()
805 struct seg_phash *hp; in seg_pinsert() local
860 hp = P_HASHBP(seg, pcp->p_htag0, addr, flags); in seg_pinsert()
874 mutex_enter(&hp->p_hmutex); in seg_pinsert()
875 delcallb_list = seg_plookup_checkdup(hp, htag0, addr, in seg_pinsert()
878 mutex_exit(&hp->p_hmutex); in seg_pinsert()
892 mutex_enter(&hp->p_hmutex); in seg_pinsert()
894 pcp->p_hashp = hp; in seg_pinsert()
895 pcp->p_hnext = hp->p_hnext; in seg_pinsert()
896 pcp->p_hprev = (struct seg_pcache *)hp; in seg_pinsert()
897 hp->p_hnext->p_hprev = pcp; in seg_pinsert()
898 hp->p_hnext = pcp; in seg_pinsert()
900 hp->p_hprev == pcp) { in seg_pinsert()
901 seg_padd_abuck(hp); in seg_pinsert()
903 mutex_exit(&hp->p_hmutex); in seg_pinsert()
941 struct seg_phash *hp; in seg_ppurge_async() local
1050 hp = hlink2phash(hlinkp, hlix); in seg_ppurge_async()
1051 if (hp->p_hnext == (struct seg_pcache *)hp) { in seg_ppurge_async()
1056 mutex_enter(&hp->p_hmutex); in seg_ppurge_async()
1058 for (pcp = hp->p_hnext; pcp != (struct seg_pcache *)hp; in seg_ppurge_async()
1066 ASSERT(pcp->p_hashp == hp); in seg_ppurge_async()
1101 if (hp->p_hnext == (struct seg_pcache *)hp) { in seg_ppurge_async()
1102 seg_premove_abuck(hp, 1); in seg_ppurge_async()
1104 mutex_exit(&hp->p_hmutex); in seg_ppurge_async()
1198 struct seg_phash_wired *hp; in seg_ppurge_wiredpp() local
1210 for (hp = seg_phashtab_wired; in seg_ppurge_wiredpp()
1211 hp < &seg_phashtab_wired[seg_phashsize_wired]; hp++) { in seg_ppurge_wiredpp()
1212 if (hp->p_hnext == (struct seg_pcache *)hp) { in seg_ppurge_wiredpp()
1215 mutex_enter(&hp->p_hmutex); in seg_ppurge_wiredpp()
1216 pcp = hp->p_hnext; in seg_ppurge_wiredpp()
1217 while (pcp != (struct seg_pcache *)hp) { in seg_ppurge_wiredpp()
1218 ASSERT(pcp->p_hashp == (struct seg_phash *)hp); in seg_ppurge_wiredpp()
1232 mutex_exit(&hp->p_hmutex); in seg_ppurge_wiredpp()
1273 struct seg_phash *hp; in seg_ppurge() local
1289 hp = P_HASHBP(seg, htag0, 0, flags); in seg_ppurge()
1290 mutex_enter(&hp->p_hmutex); in seg_ppurge()
1291 pcp = hp->p_hnext; in seg_ppurge()
1292 while (pcp != (struct seg_pcache *)hp) { in seg_ppurge()
1293 ASSERT(pcp->p_hashp == hp); in seg_ppurge()
1306 mutex_exit(&hp->p_hmutex); in seg_ppurge()
1325 hp = pcp->p_hashp; in seg_ppurge()
1326 mutex_enter(&hp->p_hmutex); in seg_ppurge()
1328 mutex_exit(&hp->p_hmutex); in seg_ppurge()
1338 if (hp->p_hnext == (struct seg_pcache *)hp) { in seg_ppurge()
1339 seg_premove_abuck(hp, 0); in seg_ppurge()
1341 mutex_exit(&hp->p_hmutex); in seg_ppurge()
1372 struct seg_phash *hp; in seg_pinit() local
1430 hp = &seg_phashtab_win[i]; in seg_pinit()
1431 hp->p_hnext = (struct seg_pcache *)hp; in seg_pinit()
1432 hp->p_hprev = (struct seg_pcache *)hp; in seg_pinit()
1433 mutex_init(&hp->p_hmutex, NULL, MUTEX_DEFAULT, NULL); in seg_pinit()
1467 hp = (struct seg_phash *)&seg_phashtab_wired[i]; in seg_pinit()
1468 hp->p_hnext = (struct seg_pcache *)hp; in seg_pinit()
1469 hp->p_hprev = (struct seg_pcache *)hp; in seg_pinit()
1470 mutex_init(&hp->p_hmutex, NULL, MUTEX_DEFAULT, NULL); in seg_pinit()