Lines Matching refs:pslot

272 	struct sram_piece *pslot, *plast, *pavail;  in _sram_alloc()  local
280 pslot = pfree_head->next; in _sram_alloc()
284 while (pslot != NULL && size > pslot->size) { in _sram_alloc()
285 plast = pslot; in _sram_alloc()
286 pslot = pslot->next; in _sram_alloc()
289 if (!pslot) in _sram_alloc()
292 if (pslot->size == size) { in _sram_alloc()
293 plast->next = pslot->next; in _sram_alloc()
294 pavail = pslot; in _sram_alloc()
302 pavail->paddr = pslot->paddr; in _sram_alloc()
304 pslot->paddr += size; in _sram_alloc()
305 pslot->size -= size; in _sram_alloc()
310 pslot = pused_head->next; in _sram_alloc()
314 while (pslot != NULL && pavail->paddr < pslot->paddr) { in _sram_alloc()
315 plast = pslot; in _sram_alloc()
316 pslot = pslot->next; in _sram_alloc()
319 pavail->next = pslot; in _sram_alloc()
330 struct sram_piece *pslot, *pmax; in _sram_alloc_max() local
335 pmax = pslot = pfree_head->next; in _sram_alloc_max()
338 while (pslot != NULL) { in _sram_alloc_max()
339 if (pslot->size > pmax->size) in _sram_alloc_max()
340 pmax = pslot; in _sram_alloc_max()
341 pslot = pslot->next; in _sram_alloc_max()
357 struct sram_piece *pslot, *plast, *pavail; in _sram_free() local
363 pslot = pused_head->next; in _sram_free()
367 while (pslot != NULL && pslot->paddr != addr) { in _sram_free()
368 plast = pslot; in _sram_free()
369 pslot = pslot->next; in _sram_free()
372 if (!pslot) in _sram_free()
375 plast->next = pslot->next; in _sram_free()
376 pavail = pslot; in _sram_free()
380 pslot = pfree_head->next; in _sram_free()
383 while (pslot != NULL && addr > pslot->paddr) { in _sram_free()
384 plast = pslot; in _sram_free()
385 pslot = pslot->next; in _sram_free()
397 if (pslot && plast->paddr + plast->size == pslot->paddr) { in _sram_free()
398 plast->size += pslot->size; in _sram_free()
399 plast->next = pslot->next; in _sram_free()
400 kmem_cache_free(sram_piece_cache, pslot); in _sram_free()
808 struct sram_piece *pslot; in _sram_proc_show() local
816 pslot = pused_head->next; in _sram_proc_show()
818 while (pslot != NULL) { in _sram_proc_show()
820 pslot->paddr, pslot->paddr + pslot->size, in _sram_proc_show()
821 pslot->size, pslot->pid, "ALLOCATED"); in _sram_proc_show()
823 pslot = pslot->next; in _sram_proc_show()
826 pslot = pfree_head->next; in _sram_proc_show()
828 while (pslot != NULL) { in _sram_proc_show()
830 pslot->paddr, pslot->paddr + pslot->size, in _sram_proc_show()
831 pslot->size, pslot->pid, "FREE"); in _sram_proc_show()
833 pslot = pslot->next; in _sram_proc_show()