Lines Matching refs:size
21 const char * __init xbc_get_embedded_bootconfig(size_t *size)
23 *size = embedded_bootconfig_data_end - embedded_bootconfig_data;
24 return (*size) ? embedded_bootconfig_data : NULL;
59 static inline void * __init xbc_alloc_mem(size_t size)
61 return memblock_alloc(size, SMP_CACHE_BYTES);
64 static inline void __init xbc_free_mem(void *addr, size_t size)
66 memblock_free(addr, size);
71 static inline void *xbc_alloc_mem(size_t size)
73 return malloc(size);
76 static inline void xbc_free_mem(void *addr, size_t size)
84 * @data_size: A pointer to store the size of bootconfig data.
87 * and the size of bootconfig data in @data_size if it is not NULL.
279 * @size: The size of the @buf.
292 char *buf, size_t size)
314 ret = snprintf(buf, size, "%s%s", xbc_node_get_data(node),
318 if (ret > size) {
319 size = 0;
321 size -= ret;
921 * @size: The size of @data
925 * This parses the boot config text in @data. @size must be smaller
933 int __init xbc_init(const char *data, size_t size, const char **emsg, int *epos)
945 if (size > XBC_DATA_MAX || size == 0) {
947 *emsg = size ? "Config data is too big" :
952 xbc_data = xbc_alloc_mem(size + 1);
958 memcpy(xbc_data, data, size);
959 xbc_data[size] = '\0';
960 xbc_data_size = size + 1;