Lines Matching refs:__smem

357 static struct qcom_smem *__smem;  variable
369 return !!__smem; in qcom_smem_is_available()
483 if (!__smem) in qcom_smem_alloc()
487 dev_err(__smem->dev, in qcom_smem_alloc()
492 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_alloc()
495 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_alloc()
501 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) { in qcom_smem_alloc()
502 part = &__smem->partitions[host]; in qcom_smem_alloc()
503 ret = qcom_smem_alloc_private(__smem, part, item, size); in qcom_smem_alloc()
504 } else if (__smem->global_partition.virt_base) { in qcom_smem_alloc()
505 part = &__smem->global_partition; in qcom_smem_alloc()
506 ret = qcom_smem_alloc_private(__smem, part, item, size); in qcom_smem_alloc()
508 ret = qcom_smem_alloc_global(__smem, item, size); in qcom_smem_alloc()
511 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_alloc()
662 if (!__smem) in qcom_smem_get()
665 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_get()
668 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_get()
674 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) { in qcom_smem_get()
675 part = &__smem->partitions[host]; in qcom_smem_get()
676 ptr = qcom_smem_get_private(__smem, part, item, size); in qcom_smem_get()
677 } else if (__smem->global_partition.virt_base) { in qcom_smem_get()
678 part = &__smem->global_partition; in qcom_smem_get()
679 ptr = qcom_smem_get_private(__smem, part, item, size); in qcom_smem_get()
681 ptr = qcom_smem_get_global(__smem, item, size); in qcom_smem_get()
684 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_get()
705 if (!__smem) in qcom_smem_get_free_space()
708 if (host < SMEM_HOST_COUNT && __smem->partitions[host].virt_base) { in qcom_smem_get_free_space()
709 part = &__smem->partitions[host]; in qcom_smem_get_free_space()
716 } else if (__smem->global_partition.virt_base) { in qcom_smem_get_free_space()
717 part = &__smem->global_partition; in qcom_smem_get_free_space()
725 header = __smem->regions[0].virt_base; in qcom_smem_get_free_space()
728 if (ret > __smem->regions[0].size) in qcom_smem_get_free_space()
756 part = &__smem->partitions[i]; in qcom_smem_virt_to_phys()
765 part = &__smem->global_partition; in qcom_smem_virt_to_phys()
773 for (i = 0; i < __smem->num_regions; i++) { in qcom_smem_virt_to_phys()
774 area = &__smem->regions[i]; in qcom_smem_virt_to_phys()
1179 __smem = smem; in qcom_smem_probe()
1192 platform_device_unregister(__smem->socinfo); in qcom_smem_remove()
1194 hwspin_lock_free(__smem->hwlock); in qcom_smem_remove()
1195 __smem = NULL; in qcom_smem_remove()