Lines Matching refs:block
68 static int sram_add_pool(struct sram_dev *sram, struct sram_reserve *block, in sram_add_pool() argument
74 NUMA_NO_NODE, block->label); in sram_add_pool()
79 block->size, NUMA_NO_NODE); in sram_add_pool()
88 static int sram_add_export(struct sram_dev *sram, struct sram_reserve *block, in sram_add_export() argument
101 part->battr.size = block->size; in sram_add_export()
106 static int sram_add_partition(struct sram_dev *sram, struct sram_reserve *block, in sram_add_partition() argument
113 part->base = sram->virt_base + block->start; in sram_add_partition()
115 if (block->pool) { in sram_add_partition()
116 ret = sram_add_pool(sram, block, start, part); in sram_add_partition()
120 if (block->export) { in sram_add_partition()
121 ret = sram_add_export(sram, block, start, part); in sram_add_partition()
125 if (block->protect_exec) { in sram_add_partition()
126 ret = sram_check_protect_exec(sram, block, part); in sram_add_partition()
130 ret = sram_add_pool(sram, block, start, part); in sram_add_partition()
173 struct sram_reserve *rblocks, *block; in sram_reserve_regions() local
192 block = &rblocks[0]; in sram_reserve_regions()
212 block->start = child_res.start - res->start; in sram_reserve_regions()
213 block->size = resource_size(&child_res); in sram_reserve_regions()
214 list_add_tail(&block->list, &reserve_list); in sram_reserve_regions()
217 block->export = true; in sram_reserve_regions()
220 block->pool = true; in sram_reserve_regions()
223 block->protect_exec = true; in sram_reserve_regions()
225 if ((block->export || block->pool || block->protect_exec) && in sram_reserve_regions()
226 block->size) { in sram_reserve_regions()
240 block->label = devm_kstrdup(sram->dev, in sram_reserve_regions()
242 if (!block->label) { in sram_reserve_regions()
248 block->export ? "exported " : "", block->label, in sram_reserve_regions()
249 block->start, block->start + block->size); in sram_reserve_regions()
252 block->start, block->start + block->size); in sram_reserve_regions()
255 block++; in sram_reserve_regions()
277 list_for_each_entry(block, &reserve_list, list) { in sram_reserve_regions()
279 if (block->start < cur_start) { in sram_reserve_regions()
282 block->start, cur_start); in sram_reserve_regions()
288 if ((block->export || block->pool || block->protect_exec) && in sram_reserve_regions()
289 block->size) { in sram_reserve_regions()
290 ret = sram_add_partition(sram, block, in sram_reserve_regions()
291 res->start + block->start); in sram_reserve_regions()
299 if (block->start == cur_start) { in sram_reserve_regions()
300 cur_start = block->start + block->size; in sram_reserve_regions()
309 cur_size = block->start - cur_start; in sram_reserve_regions()
323 cur_start = block->start + block->size; in sram_reserve_regions()