Lines Matching refs:block
89 static int sram_add_pool(struct sram_dev *sram, struct sram_reserve *block, in sram_add_pool() argument
95 NUMA_NO_NODE, block->label); in sram_add_pool()
100 block->size, NUMA_NO_NODE); in sram_add_pool()
109 static int sram_add_export(struct sram_dev *sram, struct sram_reserve *block, in sram_add_export() argument
122 part->battr.size = block->size; in sram_add_export()
127 static int sram_add_partition(struct sram_dev *sram, struct sram_reserve *block, in sram_add_partition() argument
134 part->base = sram->virt_base + block->start; in sram_add_partition()
136 if (block->pool) { in sram_add_partition()
137 ret = sram_add_pool(sram, block, start, part); in sram_add_partition()
141 if (block->export) { in sram_add_partition()
142 ret = sram_add_export(sram, block, start, part); in sram_add_partition()
182 struct sram_reserve *rblocks, *block; in sram_reserve_regions() local
201 block = &rblocks[0]; in sram_reserve_regions()
221 block->start = child_res.start - res->start; in sram_reserve_regions()
222 block->size = resource_size(&child_res); in sram_reserve_regions()
223 list_add_tail(&block->list, &reserve_list); in sram_reserve_regions()
226 block->export = true; in sram_reserve_regions()
229 block->pool = true; in sram_reserve_regions()
231 if ((block->export || block->pool) && block->size) { in sram_reserve_regions()
245 block->label = devm_kstrdup(sram->dev, in sram_reserve_regions()
247 if (!block->label) in sram_reserve_regions()
251 block->export ? "exported " : "", block->label, in sram_reserve_regions()
252 block->start, block->start + block->size); in sram_reserve_regions()
255 block->start, block->start + block->size); in sram_reserve_regions()
258 block++; in sram_reserve_regions()
280 list_for_each_entry(block, &reserve_list, list) { in sram_reserve_regions()
282 if (block->start < cur_start) { in sram_reserve_regions()
285 block->start, cur_start); in sram_reserve_regions()
291 if ((block->export || block->pool) && block->size) { in sram_reserve_regions()
292 ret = sram_add_partition(sram, block, in sram_reserve_regions()
293 res->start + block->start); in sram_reserve_regions()
301 if (block->start == cur_start) { in sram_reserve_regions()
302 cur_start = block->start + block->size; in sram_reserve_regions()
311 cur_size = block->start - cur_start; in sram_reserve_regions()
325 cur_start = block->start + block->size; in sram_reserve_regions()