Lines Matching refs:block
55 static int sram_add_pool(struct sram_dev *sram, struct sram_reserve *block, in sram_add_pool() argument
61 NUMA_NO_NODE, block->label); in sram_add_pool()
66 block->size, NUMA_NO_NODE); in sram_add_pool()
75 static int sram_add_export(struct sram_dev *sram, struct sram_reserve *block, in sram_add_export() argument
88 part->battr.size = block->size; in sram_add_export()
93 static int sram_add_partition(struct sram_dev *sram, struct sram_reserve *block, in sram_add_partition() argument
100 part->base = sram->virt_base + block->start; in sram_add_partition()
102 if (block->pool) { in sram_add_partition()
103 ret = sram_add_pool(sram, block, start, part); in sram_add_partition()
107 if (block->export) { in sram_add_partition()
108 ret = sram_add_export(sram, block, start, part); in sram_add_partition()
112 if (block->protect_exec) { in sram_add_partition()
113 ret = sram_check_protect_exec(sram, block, part); in sram_add_partition()
117 ret = sram_add_pool(sram, block, start, part); in sram_add_partition()
160 struct sram_reserve *rblocks, *block; in sram_reserve_regions() local
179 block = &rblocks[0]; in sram_reserve_regions()
199 block->start = child_res.start - res->start; in sram_reserve_regions()
200 block->size = resource_size(&child_res); in sram_reserve_regions()
201 list_add_tail(&block->list, &reserve_list); in sram_reserve_regions()
204 block->export = true; in sram_reserve_regions()
207 block->pool = true; in sram_reserve_regions()
210 block->protect_exec = true; in sram_reserve_regions()
212 if ((block->export || block->pool || block->protect_exec) && in sram_reserve_regions()
213 block->size) { in sram_reserve_regions()
227 block->label = devm_kstrdup(sram->dev, in sram_reserve_regions()
229 if (!block->label) { in sram_reserve_regions()
235 block->export ? "exported " : "", block->label, in sram_reserve_regions()
236 block->start, block->start + block->size); in sram_reserve_regions()
239 block->start, block->start + block->size); in sram_reserve_regions()
242 block++; in sram_reserve_regions()
264 list_for_each_entry(block, &reserve_list, list) { in sram_reserve_regions()
266 if (block->start < cur_start) { in sram_reserve_regions()
269 block->start, cur_start); in sram_reserve_regions()
275 if ((block->export || block->pool || block->protect_exec) && in sram_reserve_regions()
276 block->size) { in sram_reserve_regions()
277 ret = sram_add_partition(sram, block, in sram_reserve_regions()
278 res->start + block->start); in sram_reserve_regions()
286 if (block->start == cur_start) { in sram_reserve_regions()
287 cur_start = block->start + block->size; in sram_reserve_regions()
296 cur_size = block->start - cur_start; in sram_reserve_regions()
310 cur_start = block->start + block->size; in sram_reserve_regions()