Lines Matching refs:__smem
349 static struct qcom_smem *__smem; variable
453 if (!__smem) in qcom_smem_alloc()
457 dev_err(__smem->dev, in qcom_smem_alloc()
462 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_alloc()
465 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_alloc()
471 if (host < SMEM_HOST_COUNT && __smem->partitions[host]) { in qcom_smem_alloc()
472 phdr = __smem->partitions[host]; in qcom_smem_alloc()
473 ret = qcom_smem_alloc_private(__smem, phdr, item, size); in qcom_smem_alloc()
474 } else if (__smem->global_partition) { in qcom_smem_alloc()
475 phdr = __smem->global_partition; in qcom_smem_alloc()
476 ret = qcom_smem_alloc_private(__smem, phdr, item, size); in qcom_smem_alloc()
478 ret = qcom_smem_alloc_global(__smem, item, size); in qcom_smem_alloc()
481 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_alloc()
589 if (!__smem) in qcom_smem_get()
592 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_get()
595 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_get()
601 if (host < SMEM_HOST_COUNT && __smem->partitions[host]) { in qcom_smem_get()
602 phdr = __smem->partitions[host]; in qcom_smem_get()
603 cacheln = __smem->cacheline[host]; in qcom_smem_get()
604 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size); in qcom_smem_get()
605 } else if (__smem->global_partition) { in qcom_smem_get()
606 phdr = __smem->global_partition; in qcom_smem_get()
607 cacheln = __smem->global_cacheline; in qcom_smem_get()
608 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size); in qcom_smem_get()
610 ptr = qcom_smem_get_global(__smem, item, size); in qcom_smem_get()
613 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_get()
633 if (!__smem) in qcom_smem_get_free_space()
636 if (host < SMEM_HOST_COUNT && __smem->partitions[host]) { in qcom_smem_get_free_space()
637 phdr = __smem->partitions[host]; in qcom_smem_get_free_space()
640 } else if (__smem->global_partition) { in qcom_smem_get_free_space()
641 phdr = __smem->global_partition; in qcom_smem_get_free_space()
645 header = __smem->regions[0].virt_base; in qcom_smem_get_free_space()
664 for (i = 0; i < __smem->num_regions; i++) { in qcom_smem_virt_to_phys()
665 struct smem_region *region = &__smem->regions[i]; in qcom_smem_virt_to_phys()
980 __smem = smem; in qcom_smem_probe()
987 hwspin_lock_free(__smem->hwlock); in qcom_smem_remove()
988 __smem = NULL; in qcom_smem_remove()