• Home
  • Raw
  • Download

Lines Matching refs:mp

234 static void *___m_alloc(m_pool_s *mp, int size)  in ___m_alloc()  argument
240 m_link_s *h = mp->h; in ___m_alloc()
253 h[j].next = (m_link_s *)mp->getp(mp); in ___m_alloc()
277 static void ___m_free(m_pool_s *mp, void *ptr, int size) in ___m_free() argument
283 m_link_s *h = mp->h; in ___m_free()
302 mp->freep(mp, a); in ___m_free()
325 static void *__m_calloc2(m_pool_s *mp, int size, char *name, int uflags) in __m_calloc2() argument
329 p = ___m_alloc(mp, size); in __m_calloc2()
342 #define __m_calloc(mp, s, n) __m_calloc2(mp, s, n, MEMO_WARN) argument
344 static void __m_free(m_pool_s *mp, void *ptr, int size, char *name) in __m_free() argument
349 ___m_free(mp, ptr, size); in __m_free()
359 static m_addr_t ___mp0_getp(m_pool_s *mp) in ___mp0_getp() argument
363 ++mp->nump; in ___mp0_getp()
367 static void ___mp0_freep(m_pool_s *mp, m_addr_t m) in ___mp0_freep() argument
370 --mp->nump; in ___mp0_freep()
383 static m_addr_t ___dma_getp(m_pool_s *mp) in ___dma_getp() argument
391 vp = (m_addr_t) dma_alloc_coherent(mp->bush, in ___dma_getp()
398 vbp->next = mp->vtob[hc]; in ___dma_getp()
399 mp->vtob[hc] = vbp; in ___dma_getp()
400 ++mp->nump; in ___dma_getp()
409 static void ___dma_freep(m_pool_s *mp, m_addr_t m) in ___dma_freep() argument
414 vbpp = &mp->vtob[hc]; in ___dma_freep()
420 dma_free_coherent(mp->bush, PAGE_SIZE<<MEMO_PAGE_ORDER, in ___dma_freep()
423 --mp->nump; in ___dma_freep()
429 m_pool_s *mp; in ___get_dma_pool() local
430 for (mp = mp0.next; mp && mp->bush != bush; mp = mp->next); in ___get_dma_pool()
431 return mp; in ___get_dma_pool()
436 m_pool_s *mp; in ___cre_dma_pool() local
437 mp = __m_calloc(&mp0, sizeof(*mp), "MPOOL"); in ___cre_dma_pool()
438 if (mp) { in ___cre_dma_pool()
439 memset(mp, 0, sizeof(*mp)); in ___cre_dma_pool()
440 mp->bush = bush; in ___cre_dma_pool()
441 mp->getp = ___dma_getp; in ___cre_dma_pool()
442 mp->freep = ___dma_freep; in ___cre_dma_pool()
443 mp->next = mp0.next; in ___cre_dma_pool()
444 mp0.next = mp; in ___cre_dma_pool()
446 return mp; in ___cre_dma_pool()
464 struct m_pool *mp; in __m_calloc_dma() local
468 mp = ___get_dma_pool(bush); in __m_calloc_dma()
469 if (!mp) in __m_calloc_dma()
470 mp = ___cre_dma_pool(bush); in __m_calloc_dma()
471 if (mp) in __m_calloc_dma()
472 m = __m_calloc(mp, size, name); in __m_calloc_dma()
473 if (mp && !mp->nump) in __m_calloc_dma()
474 ___del_dma_pool(mp); in __m_calloc_dma()
483 struct m_pool *mp; in __m_free_dma() local
486 mp = ___get_dma_pool(bush); in __m_free_dma()
487 if (mp) in __m_free_dma()
488 __m_free(mp, m, size, name); in __m_free_dma()
489 if (mp && !mp->nump) in __m_free_dma()
490 ___del_dma_pool(mp); in __m_free_dma()
497 m_pool_s *mp; in __vtobus() local
503 mp = ___get_dma_pool(bush); in __vtobus()
504 if (mp) { in __vtobus()
505 vp = mp->vtob[hc]; in __vtobus()