Lines Matching defs:size

105  * @size:	size of the allocated space, 8 byte aligned
112 __le32 size;
140 * @size: size of the partition
149 __le32 size;
180 * @size: size of the partition
191 __le32 size;
203 * @size: size of the data, including padding bytes
211 __le32 size; /* includes padding bytes */
221 * @size: size of the smem region
228 __le32 size;
240 * @size: size of the memory region
245 size_t size;
253 * @global_cacheline: cacheline size for global partition
292 return p + le32_to_cpu(phdr->size) - ALIGN(sizeof(*e), cacheline);
317 le32_to_cpu(e->size);
325 return p - le32_to_cpu(e->size) - ALIGN(sizeof(*e), cacheline);
339 return p - le32_to_cpu(e->size);
351 size_t size)
371 alloc_size = sizeof(*hdr) + ALIGN(size, 8);
379 hdr->size = cpu_to_le32(ALIGN(size, 8));
380 hdr->padding_data = cpu_to_le16(le32_to_cpu(hdr->size) - size);
401 size_t size)
411 size = ALIGN(size, 8);
412 if (WARN_ON(size > le32_to_cpu(header->available)))
416 entry->size = cpu_to_le32(size);
426 le32_add_cpu(&header->free_offset, size);
427 le32_add_cpu(&header->available, -size);
436 * @size: number of bytes to be allocated
438 * Allocate space for a given smem item of size @size, given that the item is
441 int qcom_smem_alloc(unsigned host, unsigned item, size_t size)
467 ret = qcom_smem_alloc_private(__smem, phdr, item, size);
470 ret = qcom_smem_alloc_private(__smem, phdr, item, size);
472 ret = qcom_smem_alloc_global(__smem, item, size);
483 size_t *size)
502 if (size != NULL)
503 *size = le32_to_cpu(entry->size);
515 size_t *size)
527 if (size != NULL)
528 *size = le32_to_cpu(e->size) -
547 if (size != NULL)
548 *size = le32_to_cpu(e->size) -
567 * qcom_smem_get() - resolve ptr of size of a smem item
570 * @size: pointer to be filled out with size of the item
573 * item is returned in @size.
575 void *qcom_smem_get(unsigned host, unsigned item, size_t *size)
598 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size);
602 ptr = qcom_smem_get_private(__smem, phdr, cacheln, item, size);
604 ptr = qcom_smem_get_global(__smem, item, size);
663 if (p < region->virt_base + region->size) {
690 ptable = smem->regions[0].virt_base + smem->regions[0].size - SZ_4K;
729 u32 size;
751 size = le32_to_cpu(header->size);
752 if (size != le32_to_cpu(entry->size)) {
753 dev_err(smem->dev, "bad partition size (%u != %u)\n",
754 size, le32_to_cpu(entry->size));
758 if (le32_to_cpu(header->offset_free_uncached) > size) {
760 le32_to_cpu(header->offset_free_uncached), size);
788 if (!le32_to_cpu(entry->size))
834 if (!le32_to_cpu(entry->size))
872 resource_size_t size;
885 size = resource_size(&r);
887 smem->regions[i].virt_base = devm_ioremap_wc(dev, r.start, size);
891 smem->regions[i].size = size;