Lines Matching refs:phdr

280 phdr_to_last_uncached_entry(struct smem_partition_header *phdr)  in phdr_to_last_uncached_entry()  argument
282 void *p = phdr; in phdr_to_last_uncached_entry()
284 return p + le32_to_cpu(phdr->offset_free_uncached); in phdr_to_last_uncached_entry()
288 phdr_to_first_cached_entry(struct smem_partition_header *phdr, in phdr_to_first_cached_entry() argument
291 void *p = phdr; in phdr_to_first_cached_entry()
294 return p + le32_to_cpu(phdr->size) - ALIGN(sizeof(*e), cacheline); in phdr_to_first_cached_entry()
298 phdr_to_last_cached_entry(struct smem_partition_header *phdr) in phdr_to_last_cached_entry() argument
300 void *p = phdr; in phdr_to_last_cached_entry()
302 return p + le32_to_cpu(phdr->offset_free_cached); in phdr_to_last_cached_entry()
306 phdr_to_first_uncached_entry(struct smem_partition_header *phdr) in phdr_to_first_uncached_entry() argument
308 void *p = phdr; in phdr_to_first_uncached_entry()
310 return p + sizeof(*phdr); in phdr_to_first_uncached_entry()
351 struct smem_partition_header *phdr, in qcom_smem_alloc_private() argument
359 hdr = phdr_to_first_uncached_entry(phdr); in qcom_smem_alloc_private()
360 end = phdr_to_last_uncached_entry(phdr); in qcom_smem_alloc_private()
361 cached = phdr_to_last_cached_entry(phdr); in qcom_smem_alloc_private()
391 le32_add_cpu(&phdr->offset_free_uncached, alloc_size); in qcom_smem_alloc_private()
396 le16_to_cpu(phdr->host0), le16_to_cpu(phdr->host1)); in qcom_smem_alloc_private()
445 struct smem_partition_header *phdr; in qcom_smem_alloc() local
468 phdr = __smem->partitions[host]; in qcom_smem_alloc()
469 ret = qcom_smem_alloc_private(__smem, phdr, item, size); in qcom_smem_alloc()
471 phdr = __smem->global_partition; in qcom_smem_alloc()
472 ret = qcom_smem_alloc_private(__smem, phdr, item, size); in qcom_smem_alloc()
514 struct smem_partition_header *phdr, in qcom_smem_get_private() argument
521 e = phdr_to_first_uncached_entry(phdr); in qcom_smem_get_private()
522 end = phdr_to_last_uncached_entry(phdr); in qcom_smem_get_private()
541 e = phdr_to_first_cached_entry(phdr, cacheline); in qcom_smem_get_private()
542 end = phdr_to_last_cached_entry(phdr); in qcom_smem_get_private()
563 le16_to_cpu(phdr->host0), le16_to_cpu(phdr->host1)); in qcom_smem_get_private()
579 struct smem_partition_header *phdr; in qcom_smem_get() local
598 phdr = __smem->partitions[host]; in qcom_smem_get()
600 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size); in qcom_smem_get()
602 phdr = __smem->global_partition; in qcom_smem_get()
604 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size); in qcom_smem_get()
625 struct smem_partition_header *phdr; in qcom_smem_get_free_space() local
633 phdr = __smem->partitions[host]; in qcom_smem_get_free_space()
634 ret = le32_to_cpu(phdr->offset_free_cached) - in qcom_smem_get_free_space()
635 le32_to_cpu(phdr->offset_free_uncached); in qcom_smem_get_free_space()
637 phdr = __smem->global_partition; in qcom_smem_get_free_space()
638 ret = le32_to_cpu(phdr->offset_free_cached) - in qcom_smem_get_free_space()
639 le32_to_cpu(phdr->offset_free_uncached); in qcom_smem_get_free_space()