Searched refs:blk (Results 1 – 3 of 3) sorted by relevance
74 static int synth_alloc_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);75 static int synth_free_pages(struct snd_emu10k1 *hw, struct snd_emu10k1_memblk *blk);81 static void emu10k1_memblk_init(struct snd_emu10k1_memblk *blk) in emu10k1_memblk_init() argument83 blk->mapped_page = -1; in emu10k1_memblk_init()84 INIT_LIST_HEAD(&blk->mapped_link); in emu10k1_memblk_init()85 INIT_LIST_HEAD(&blk->mapped_order_link); in emu10k1_memblk_init()86 blk->map_locked = 0; in emu10k1_memblk_init()88 blk->first_page = get_aligned_page(blk->mem.offset); in emu10k1_memblk_init()89 blk->last_page = get_aligned_page(blk->mem.offset + blk->mem.size - 1); in emu10k1_memblk_init()90 blk->pages = blk->last_page - blk->first_page + 1; in emu10k1_memblk_init()[all …]
74 struct snd_util_memblk *blk; in __snd_util_mem_alloc() local91 blk = get_memblk(p); in __snd_util_mem_alloc()92 if (blk->offset - prev_offset >= units) in __snd_util_mem_alloc()94 prev_offset = blk->offset + blk->size; in __snd_util_mem_alloc()112 struct snd_util_memblk *blk; in __snd_util_memblk_new() local114 blk = kmalloc(sizeof(struct snd_util_memblk) + hdr->block_extra_size, in __snd_util_memblk_new()116 if (blk == NULL) in __snd_util_memblk_new()120 blk->offset = 0; in __snd_util_memblk_new()123 blk->offset = p->offset + p->size; in __snd_util_memblk_new()125 blk->size = units; in __snd_util_memblk_new()[all …]
133 #define firstpg(blk) (((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->first_page) argument134 #define lastpg(blk) (((struct snd_trident_memblk_arg *)snd_util_memblk_argptr(blk))->last_page) argument142 struct snd_util_memblk *blk, *prev; in search_empty() local150 blk = list_entry(p, struct snd_util_memblk, list); in search_empty()151 if (page + psize <= firstpg(blk)) in search_empty()153 page = lastpg(blk) + 1; in search_empty()160 blk = __snd_util_memblk_new(hdr, psize * ALIGN_PAGE_SIZE, p->prev); in search_empty()161 if (blk == NULL) in search_empty()163 blk->offset = aligned_page_offset(page); /* set aligned offset */ in search_empty()164 firstpg(blk) = page; in search_empty()[all …]