Lines Matching full:cmn

303 		if (!(osh->cmn = kmalloc(sizeof(osl_cmn_t), flags))) {  in osl_attach()
307 bzero(osh->cmn, sizeof(osl_cmn_t)); in osl_attach()
309 *osl_cmn = osh->cmn; in osl_attach()
310 atomic_set(&osh->cmn->malloced, 0); in osl_attach()
311 osh->cmn->dbgmem_list = NULL; in osl_attach()
312 spin_lock_init(&(osh->cmn->dbgmem_lock)); in osl_attach()
315 spin_lock_init(&(osh->cmn->pktlist_lock)); in osl_attach()
317 spin_lock_init(&(osh->cmn->pktalloc_lock)); in osl_attach()
320 osh->cmn = *osl_cmn; in osl_attach()
322 atomic_add(1, &osh->cmn->refcount); in osl_attach()
425 atomic_sub(1, &osh->cmn->refcount); in osl_detach()
426 if (atomic_read(&osh->cmn->refcount) == 0) { in osl_detach()
427 kfree(osh->cmn); in osl_detach()
629 atomic_add(size, &osh->cmn->malloced); in osl_malloc()
643 if (osh && osh->cmn) in osl_malloc()
644 atomic_add(size, &osh->cmn->malloced); in osl_malloc()
697 if (osh && osh->cmn) { in osl_mfree()
699 atomic_sub(size, &osh->cmn->malloced); in osl_mfree()
705 if (osh && osh->cmn) { in osl_mfree()
710 atomic_sub(size, &osh->cmn->malloced); in osl_mfree()
737 if (osh && osh->cmn) in osl_vmalloc()
738 atomic_add(size, &osh->cmn->malloced); in osl_vmalloc()
771 if (osh && osh->cmn) { in osl_vmfree()
776 atomic_sub(size, &osh->cmn->malloced); in osl_vmfree()
785 if (atomic_read(&osh->cmn->refcount) == 1) in osl_check_memleak()
786 return (atomic_read(&osh->cmn->malloced)); in osl_check_memleak()
795 return (atomic_read(&osh->cmn->malloced)); in osl_malloced()
822 OSL_MEMLIST_LOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_malloc()
842 p->next = osh->cmn->dbgmem_list; in osl_debug_malloc()
845 osh->cmn->dbgmem_list = p; in osl_debug_malloc()
846 OSL_MEMLIST_UNLOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_malloc()
896 if (osh && ((osl_t*)p->osh)->cmn != osh->cmn) { in osl_debug_mfree()
898 ((osl_t*)p->osh)->cmn, osh->cmn); in osl_debug_mfree()
902 ASSERT(((osl_t*)p->osh)->cmn == osh->cmn); in osl_debug_mfree()
907 if (osh && osh->cmn) { in osl_debug_mfree()
908 OSL_MEMLIST_LOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_mfree()
913 if (osh->cmn->dbgmem_list == p) in osl_debug_mfree()
914 osh->cmn->dbgmem_list = p->next; in osl_debug_mfree()
919 if (osh && osh->cmn) { in osl_debug_mfree()
920 OSL_MEMLIST_UNLOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_mfree()
941 OSL_MEMLIST_LOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_vmalloc()
961 p->next = osh->cmn->dbgvmem_list; in osl_debug_vmalloc()
964 osh->cmn->dbgvmem_list = p; in osl_debug_vmalloc()
965 OSL_MEMLIST_UNLOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_vmalloc()
1008 if (osh && ((osl_t*)p->osh)->cmn != osh->cmn) { in osl_debug_vmfree()
1010 ((osl_t*)p->osh)->cmn, osh->cmn); in osl_debug_vmfree()
1013 ASSERT(((osl_t*)p->osh)->cmn == osh->cmn); in osl_debug_vmfree()
1018 if (osh && osh->cmn) { in osl_debug_vmfree()
1019 OSL_MEMLIST_LOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_vmfree()
1024 if (osh->cmn->dbgvmem_list == p) in osl_debug_vmfree()
1025 osh->cmn->dbgvmem_list = p->next; in osl_debug_vmfree()
1030 if (osh && osh->cmn) { in osl_debug_vmfree()
1031 OSL_MEMLIST_UNLOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_vmfree()
1044 OSL_MEMLIST_LOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_memdump()
1046 if (osl_check_memleak(osh) && osh->cmn->dbgmem_list) { in osl_debug_memdump()
1052 for (p = osh->cmn->dbgmem_list; p; p = p->next) { in osl_debug_memdump()
1073 if (osl_check_memleak(osh) && osh->cmn->dbgvmem_list) { in osl_debug_memdump()
1079 for (p = osh->cmn->dbgvmem_list; p; p = p->next) { in osl_debug_memdump()
1101 OSL_MEMLIST_UNLOCK(&osh->cmn->dbgmem_lock, flags); in osl_debug_memdump()