Lines Matching refs:__smem

356 static struct qcom_smem *__smem;  variable
471 if (!__smem) in qcom_smem_alloc()
475 dev_err(__smem->dev, in qcom_smem_alloc()
480 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_alloc()
483 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_alloc()
489 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) { in qcom_smem_alloc()
490 part = &__smem->partitions[host]; in qcom_smem_alloc()
491 ret = qcom_smem_alloc_private(__smem, part, item, size); in qcom_smem_alloc()
492 } else if (__smem->global_partition.virt_base) { in qcom_smem_alloc()
493 part = &__smem->global_partition; in qcom_smem_alloc()
494 ret = qcom_smem_alloc_private(__smem, part, item, size); in qcom_smem_alloc()
496 ret = qcom_smem_alloc_global(__smem, item, size); in qcom_smem_alloc()
499 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_alloc()
650 if (!__smem) in qcom_smem_get()
653 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_get()
656 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_get()
662 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) { in qcom_smem_get()
663 part = &__smem->partitions[host]; in qcom_smem_get()
664 ptr = qcom_smem_get_private(__smem, part, item, size); in qcom_smem_get()
665 } else if (__smem->global_partition.virt_base) { in qcom_smem_get()
666 part = &__smem->global_partition; in qcom_smem_get()
667 ptr = qcom_smem_get_private(__smem, part, item, size); in qcom_smem_get()
669 ptr = qcom_smem_get_global(__smem, item, size); in qcom_smem_get()
672 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_get()
693 if (!__smem) in qcom_smem_get_free_space()
696 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) { in qcom_smem_get_free_space()
697 part = &__smem->partitions[host]; in qcom_smem_get_free_space()
704 } else if (__smem->global_partition.virt_base) { in qcom_smem_get_free_space()
705 part = &__smem->global_partition; in qcom_smem_get_free_space()
713 header = __smem->regions[0].virt_base; in qcom_smem_get_free_space()
716 if (ret > __smem->regions[0].size) in qcom_smem_get_free_space()
744 part = &__smem->partitions[i]; in qcom_smem_virt_to_phys()
753 part = &__smem->global_partition; in qcom_smem_virt_to_phys()
761 for (i = 0; i < __smem->num_regions; i++) { in qcom_smem_virt_to_phys()
762 area = &__smem->regions[i]; in qcom_smem_virt_to_phys()
1146 __smem = smem; in qcom_smem_probe()
1159 platform_device_unregister(__smem->socinfo); in qcom_smem_remove()
1161 hwspin_lock_free(__smem->hwlock); in qcom_smem_remove()
1162 __smem = NULL; in qcom_smem_remove()