Lines Matching full:mp
47 static void *___sym_malloc(m_pool_p mp, int size) in ___sym_malloc() argument
53 m_link_p h = mp->h; in ___sym_malloc()
93 static void ___sym_mfree(m_pool_p mp, void *ptr, int size) in ___sym_mfree() argument
99 m_link_p h = mp->h; in ___sym_mfree()
145 static void *__sym_calloc2(m_pool_p mp, int size, char *name, int uflags) in __sym_calloc2() argument
149 p = ___sym_malloc(mp, size); in __sym_calloc2()
161 #define __sym_calloc(mp, s, n) __sym_calloc2(mp, s, n, SYM_MEM_WARN) argument
166 static void __sym_mfree(m_pool_p mp, void *ptr, int size, char *name) in __sym_mfree() argument
171 ___sym_mfree(mp, ptr, size); in __sym_mfree()
180 static void *___mp0_get_mem_cluster(m_pool_p mp) in ___mp0_get_mem_cluster() argument
184 ++mp->nump; in ___mp0_get_mem_cluster()
189 static void ___mp0_free_mem_cluster(m_pool_p mp, void *m) in ___mp0_free_mem_cluster() argument
192 --mp->nump; in ___mp0_free_mem_cluster()
210 static void * ___get_dma_mem_cluster(m_pool_p mp) in ___get_dma_mem_cluster() argument
219 vaddr = sym_m_get_dma_mem_cluster(mp, vbp); in ___get_dma_mem_cluster()
222 vbp->next = mp->vtob[hc]; in ___get_dma_mem_cluster()
223 mp->vtob[hc] = vbp; in ___get_dma_mem_cluster()
224 ++mp->nump; in ___get_dma_mem_cluster()
233 static void ___free_dma_mem_cluster(m_pool_p mp, void *m) in ___free_dma_mem_cluster() argument
238 vbpp = &mp->vtob[hc]; in ___free_dma_mem_cluster()
244 sym_m_free_dma_mem_cluster(mp, vbp); in ___free_dma_mem_cluster()
246 --mp->nump; in ___free_dma_mem_cluster()
254 m_pool_p mp; in ___get_dma_pool() local
255 for (mp = mp0.next; in ___get_dma_pool()
256 mp && !sym_m_pool_match(mp->dev_dmat, dev_dmat); in ___get_dma_pool()
257 mp = mp->next); in ___get_dma_pool()
258 return mp; in ___get_dma_pool()
264 m_pool_p mp = __sym_calloc(&mp0, sizeof(*mp), "MPOOL"); in ___cre_dma_pool() local
265 if (mp) { in ___cre_dma_pool()
266 mp->dev_dmat = dev_dmat; in ___cre_dma_pool()
267 mp->get_mem_cluster = ___get_dma_mem_cluster; in ___cre_dma_pool()
269 mp->free_mem_cluster = ___free_dma_mem_cluster; in ___cre_dma_pool()
271 mp->next = mp0.next; in ___cre_dma_pool()
272 mp0.next = mp; in ___cre_dma_pool()
273 return mp; in ___cre_dma_pool()
302 m_pool_p mp; in __sym_calloc_dma() local
306 mp = ___get_dma_pool(dev_dmat); in __sym_calloc_dma()
307 if (!mp) in __sym_calloc_dma()
308 mp = ___cre_dma_pool(dev_dmat); in __sym_calloc_dma()
309 if (!mp) in __sym_calloc_dma()
311 m = __sym_calloc(mp, size, name); in __sym_calloc_dma()
313 if (!mp->nump) in __sym_calloc_dma()
314 ___del_dma_pool(mp); in __sym_calloc_dma()
325 m_pool_p mp; in __sym_mfree_dma() local
328 mp = ___get_dma_pool(dev_dmat); in __sym_mfree_dma()
329 if (!mp) in __sym_mfree_dma()
331 __sym_mfree(mp, m, size, name); in __sym_mfree_dma()
333 if (!mp->nump) in __sym_mfree_dma()
334 ___del_dma_pool(mp); in __sym_mfree_dma()
347 m_pool_p mp; in __vtobus() local
354 mp = ___get_dma_pool(dev_dmat); in __vtobus()
355 if (mp) { in __vtobus()
356 vp = mp->vtob[hc]; in __vtobus()