Lines Matching refs:hp

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