Lines Matching refs:cmb_area

378 struct cmb_area {  struct
385 static struct cmb_area cmb_area = { argument
386 .lock = __SPIN_LOCK_UNLOCKED(cmb_area.lock),
387 .list = LIST_HEAD_INIT(cmb_area.list),
403 module_param_named(maxchannels, cmb_area.num_channels, uint, 0444);
456 cmb = cmb_area.mem; in alloc_cmb_single()
457 list_for_each_entry(node, &cmb_area.list, cmb_list) { in alloc_cmb_single()
464 if (cmb - cmb_area.mem >= cmb_area.num_channels) { in alloc_cmb_single()
497 spin_lock(&cmb_area.lock); in alloc_cmb()
499 if (!cmb_area.mem) { in alloc_cmb()
501 size = sizeof(struct cmb) * cmb_area.num_channels; in alloc_cmb()
502 WARN_ON(!list_empty(&cmb_area.list)); in alloc_cmb()
504 spin_unlock(&cmb_area.lock); in alloc_cmb()
506 spin_lock(&cmb_area.lock); in alloc_cmb()
508 if (cmb_area.mem) { in alloc_cmb()
518 cmb_area.mem = mem; in alloc_cmb()
519 cmf_activate(cmb_area.mem, CMF_ON); in alloc_cmb()
526 spin_unlock(&cmb_area.lock); in alloc_cmb()
539 spin_lock(&cmb_area.lock); in free_cmb()
550 if (list_empty(&cmb_area.list)) { in free_cmb()
552 size = sizeof(struct cmb) * cmb_area.num_channels; in free_cmb()
554 free_pages((unsigned long)cmb_area.mem, get_order(size)); in free_cmb()
555 cmb_area.mem = NULL; in free_cmb()
558 spin_unlock(&cmb_area.lock); in free_cmb()
573 offset = mme ? (struct cmb *)cmb_data->hw_block - cmb_area.mem : 0; in set_cmb()
781 spin_lock(&cmb_area.lock); in alloc_cmbe()
789 if (list_empty(&cmb_area.list)) in alloc_cmbe()
791 list_add_tail(&cdev->private->cmb_list, &cmb_area.list); in alloc_cmbe()
794 spin_unlock(&cmb_area.lock); in alloc_cmbe()
799 spin_unlock(&cmb_area.lock); in alloc_cmbe()
814 spin_lock(&cmb_area.lock); in free_cmbe()
826 if (list_empty(&cmb_area.list)) in free_cmbe()
829 spin_unlock(&cmb_area.lock); in free_cmbe()
1244 spin_lock(&cmb_area.lock); in cmf_reactivate()
1245 if (!list_empty(&cmb_area.list)) in cmf_reactivate()
1246 cmf_activate(cmb_area.mem, CMF_ON); in cmf_reactivate()
1247 spin_unlock(&cmb_area.lock); in cmf_reactivate()