Lines Matching refs:m
248 struct mobj_shm *m = to_mobj_shm(mobj); in mobj_shm_get_va() local
253 return phys_to_virt(m->pa + offset, MEM_AREA_NSEC_SHM, in mobj_shm_get_va()
260 struct mobj_shm *m = to_mobj_shm(mobj); in mobj_shm_get_pa() local
266 p = m->pa + offs; in mobj_shm_get_pa()
304 struct mobj_shm *m = to_mobj_shm(mobj); in mobj_shm_free() local
306 free(m); in mobj_shm_free()
337 struct mobj_shm *m; in mobj_shm_alloc() local
342 m = calloc(1, sizeof(*m)); in mobj_shm_alloc()
343 if (!m) in mobj_shm_alloc()
346 m->mobj.size = size; in mobj_shm_alloc()
347 m->mobj.ops = &mobj_shm_ops; in mobj_shm_alloc()
348 m->mobj.phys_granule = SMALL_PAGE_SIZE; in mobj_shm_alloc()
349 refcount_set(&m->mobj.refc, 1); in mobj_shm_alloc()
350 m->pa = pa; in mobj_shm_alloc()
351 m->cookie = cookie; in mobj_shm_alloc()
353 return &m->mobj; in mobj_shm_alloc()
368 struct mobj_with_fobj *m = NULL; in mobj_with_fobj_alloc() local
377 m = calloc(1, sizeof(*m)); in mobj_with_fobj_alloc()
378 if (!m) in mobj_with_fobj_alloc()
381 m->mobj.ops = &mobj_with_fobj_ops; in mobj_with_fobj_alloc()
382 refcount_set(&m->mobj.refc, 1); in mobj_with_fobj_alloc()
383 m->mobj.size = fobj->num_pages * SMALL_PAGE_SIZE; in mobj_with_fobj_alloc()
384 m->mobj.phys_granule = SMALL_PAGE_SIZE; in mobj_with_fobj_alloc()
385 m->fobj = fobj_get(fobj); in mobj_with_fobj_alloc()
386 m->file = file_get(file); in mobj_with_fobj_alloc()
387 m->mem_type = mem_type; in mobj_with_fobj_alloc()
389 return &m->mobj; in mobj_with_fobj_alloc()
415 struct mobj_with_fobj *m = to_mobj_with_fobj(mobj); in mobj_with_fobj_free() local
417 fobj_put(m->fobj); in mobj_with_fobj_free()
418 file_put(m->file); in mobj_with_fobj_free()
419 free(m); in mobj_with_fobj_free()
430 struct mobj_with_fobj *m = to_mobj_with_fobj(mobj); in mobj_with_fobj_get_mem_type() local
435 *mem_type = m->mem_type; in mobj_with_fobj_get_mem_type()