Lines Matching defs:bcp
1243 kmem_bufctl_t *bcp = NULL;
1277 for (bcp = *KMEM_HASH(cp, buf); bcp; bcp = bcp->bc_next)
1278 if (bcp->bc_addr == buf)
1281 if (bcp == NULL && btp != NULL)
1282 bcp = btp->bt_bufctl;
1283 if (kmem_findslab(cp->cache_bufctl_cache, bcp) ==
1284 NULL || P2PHASE((uintptr_t)bcp, KMEM_ALIGN) ||
1285 bcp->bc_addr != buf) {
1287 bcp = NULL;
1298 kmem_panic_info.kmp_bufctl = bcp;
1329 printf("bcp ^ bxstat = %lx, should be %lx\n",
1357 bufarg, (void *)bcp, cparg->cache_name);
1359 if (bcp != NULL && (cp->cache_flags & KMF_AUDIT) &&
1363 kmem_bufctl_audit_t *bcap = (kmem_bufctl_audit_t *)bcp;
1459 #define KMEM_AUDIT(lp, cp, bcp) \
1461 kmem_bufctl_audit_t *_bcp = (kmem_bufctl_audit_t *)(bcp); \
1493 kmem_bufctl_t *bcp;
1541 bcp = kmem_cache_alloc(cp->cache_bufctl_cache, kmflag);
1542 if (bcp == NULL)
1546 (kmem_bufctl_audit_t *)bcp;
1550 bcp->bc_addr = buf;
1551 bcp->bc_slab = sp;
1553 bcp = KMEM_BUFCTL(cp, buf);
1558 btp->bt_bufctl = bcp;
1559 btp->bt_bxstat = (intptr_t)bcp ^ KMEM_BUFTAG_FREE;
1565 bcp->bc_next = sp->slab_head;
1566 sp->slab_head = bcp;
1576 while ((bcp = sp->slab_head) != NULL) {
1577 sp->slab_head = bcp->bc_next;
1578 kmem_cache_free(cp->cache_bufctl_cache, bcp);
1607 kmem_bufctl_t *bcp;
1608 while ((bcp = sp->slab_head) != NULL) {
1609 sp->slab_head = bcp->bc_next;
1610 kmem_cache_free(cp->cache_bufctl_cache, bcp);
1620 kmem_bufctl_t *bcp, **hash_bucket;
1638 bcp = sp->slab_head;
1639 sp->slab_head = bcp->bc_next;
1645 buf = bcp->bc_addr;
1647 bcp->bc_next = *hash_bucket;
1648 *hash_bucket = bcp;
1650 KMEM_AUDIT(kmem_transaction_log, cp, bcp);
1653 buf = KMEM_BUF(cp, bcp);
1766 kmem_bufctl_t *bcp, **prev_bcpp;
1778 while ((bcp = *prev_bcpp) != NULL) {
1779 if (bcp->bc_addr == buf) {
1780 *prev_bcpp = bcp->bc_next;
1781 sp = bcp->bc_slab;
1785 prev_bcpp = &bcp->bc_next;
1788 bcp = KMEM_BUFCTL(cp, buf);
1792 if (bcp == NULL || sp->slab_cache != cp || !KMEM_SLAB_MEMBER(sp, buf)) {
1811 ((kmem_bufctl_audit_t *)bcp)->bc_contents =
1814 KMEM_AUDIT(kmem_transaction_log, cp, bcp);
1817 bcp->bc_next = sp->slab_head;
1818 sp->slab_head = bcp;
1875 if (bcp->bc_next == NULL) {
1901 kmem_bufctl_audit_t *bcp = (kmem_bufctl_audit_t *)btp->bt_bufctl;
1904 if (btp->bt_bxstat != ((intptr_t)bcp ^ KMEM_BUFTAG_FREE)) {
1909 btp->bt_bxstat = (intptr_t)bcp ^ KMEM_BUFTAG_ALLOC;
1911 if ((cp->cache_flags & KMF_HASH) && bcp->bc_addr != buf) {
1951 btp->bt_bxstat = (intptr_t)bcp ^ KMEM_BUFTAG_FREE;
1959 KMEM_AUDIT(kmem_transaction_log, cp, bcp);
1974 kmem_bufctl_audit_t *bcp = (kmem_bufctl_audit_t *)btp->bt_bufctl;
1977 if (btp->bt_bxstat != ((intptr_t)bcp ^ KMEM_BUFTAG_ALLOC)) {
1978 if (btp->bt_bxstat == ((intptr_t)bcp ^ KMEM_BUFTAG_FREE)) {
1990 btp->bt_bxstat = (intptr_t)bcp ^ KMEM_BUFTAG_FREE;
1992 if ((cp->cache_flags & KMF_HASH) && bcp->bc_addr != buf) {
2004 bcp->bc_contents = kmem_log_enter(kmem_content_log,
2006 KMEM_AUDIT(kmem_transaction_log, cp, bcp);
3244 kmem_bufctl_t **old_table, **new_table, *bcp;
3272 bcp = old_table[h];
3273 while (bcp != NULL) {
3274 void *addr = bcp->bc_addr;
3275 kmem_bufctl_t *next_bcp = bcp->bc_next;
3277 bcp->bc_next = *hash_bucket;
3278 *hash_bucket = bcp;
3279 bcp = next_bcp;
4513 kmem_bufctl_t *bcp, *bufbcp;
4519 for (bcp = *KMEM_HASH(cp, buf);
4520 (bcp != NULL) && (bcp->bc_addr != buf);
4521 bcp = bcp->bc_next) {
4524 ASSERT(sp != NULL && bcp != NULL ? sp == bcp->bc_slab : 1);
4525 return (bcp == NULL ? NULL : bcp->bc_slab);
4532 for (bcp = sp->slab_head;
4533 (bcp != NULL) && (bcp != bufbcp);
4534 bcp = bcp->bc_next) {
4537 return (bcp == NULL ? sp : NULL);