Lines Matching refs:__smem
343 static struct qcom_smem *__smem; variable
447 if (!__smem) in qcom_smem_alloc()
451 dev_err(__smem->dev, in qcom_smem_alloc()
456 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_alloc()
459 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_alloc()
465 if (host < SMEM_HOST_COUNT && __smem->partitions[host]) { in qcom_smem_alloc()
466 phdr = __smem->partitions[host]; in qcom_smem_alloc()
467 ret = qcom_smem_alloc_private(__smem, phdr, item, size); in qcom_smem_alloc()
468 } else if (__smem->global_partition) { in qcom_smem_alloc()
469 phdr = __smem->global_partition; in qcom_smem_alloc()
470 ret = qcom_smem_alloc_private(__smem, phdr, item, size); in qcom_smem_alloc()
472 ret = qcom_smem_alloc_global(__smem, item, size); in qcom_smem_alloc()
475 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_alloc()
583 if (!__smem) in qcom_smem_get()
586 if (WARN_ON(item >= __smem->item_count)) in qcom_smem_get()
589 ret = hwspin_lock_timeout_irqsave(__smem->hwlock, in qcom_smem_get()
595 if (host < SMEM_HOST_COUNT && __smem->partitions[host]) { in qcom_smem_get()
596 phdr = __smem->partitions[host]; in qcom_smem_get()
597 cacheln = __smem->cacheline[host]; in qcom_smem_get()
598 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size); in qcom_smem_get()
599 } else if (__smem->global_partition) { in qcom_smem_get()
600 phdr = __smem->global_partition; in qcom_smem_get()
601 cacheln = __smem->global_cacheline; in qcom_smem_get()
602 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size); in qcom_smem_get()
604 ptr = qcom_smem_get_global(__smem, item, size); in qcom_smem_get()
607 hwspin_unlock_irqrestore(__smem->hwlock, &flags); in qcom_smem_get()
627 if (!__smem) in qcom_smem_get_free_space()
630 if (host < SMEM_HOST_COUNT && __smem->partitions[host]) { in qcom_smem_get_free_space()
631 phdr = __smem->partitions[host]; in qcom_smem_get_free_space()
634 } else if (__smem->global_partition) { in qcom_smem_get_free_space()
635 phdr = __smem->global_partition; in qcom_smem_get_free_space()
639 header = __smem->regions[0].virt_base; in qcom_smem_get_free_space()
658 for (i = 0; i < __smem->num_regions; i++) { in qcom_smem_virt_to_phys()
659 struct smem_region *region = &__smem->regions[i]; in qcom_smem_virt_to_phys()
965 __smem = smem; in qcom_smem_probe()
978 platform_device_unregister(__smem->socinfo); in qcom_smem_remove()
980 hwspin_lock_free(__smem->hwlock); in qcom_smem_remove()
981 __smem = NULL; in qcom_smem_remove()