• Home
  • Raw
  • Download

Lines Matching refs:page

37 #define __set_tlb_bus(trident,page,ptr,addr) \  argument
38 do { (trident)->tlb.entries[page] = cpu_to_le32((addr) & ~(SNDRV_TRIDENT_PAGE_SIZE-1)); \
39 (trident)->tlb.shadow_entries[page] = (ptr); } while (0)
40 #define __tlb_to_ptr(trident,page) \ argument
41 (void*)((trident)->tlb.shadow_entries[page])
42 #define __tlb_to_addr(trident,page) \ argument
43 (dma_addr_t)le32_to_cpu((trident->tlb.entries[page]) & ~(SNDRV_TRIDENT_PAGE_SIZE - 1))
50 #define set_tlb_bus(trident,page,ptr,addr) __set_tlb_bus(trident,page,ptr,addr) argument
52 #define set_silent_tlb(trident,page) __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silen… argument
56 #define aligned_page_offset(page) ((page) << 12) argument
58 #define page_to_ptr(trident,page) __tlb_to_ptr(trident, page) argument
60 #define page_to_addr(trident,page) __tlb_to_addr(trident, page) argument
67 #define aligned_page_offset(page) ((page) << 13) argument
68 #define page_to_ptr(trident,page) __tlb_to_ptr(trident, (page) << 1) argument
69 #define page_to_addr(trident,page) __tlb_to_addr(trident, (page) << 1) argument
72 static inline void set_tlb_bus(struct snd_trident *trident, int page, in set_tlb_bus() argument
75 page <<= 1; in set_tlb_bus()
76 __set_tlb_bus(trident, page, ptr, addr); in set_tlb_bus()
77 __set_tlb_bus(trident, page+1, ptr + SNDRV_TRIDENT_PAGE_SIZE, addr + SNDRV_TRIDENT_PAGE_SIZE); in set_tlb_bus()
79 static inline void set_silent_tlb(struct snd_trident *trident, int page) in set_silent_tlb() argument
81 page <<= 1; in set_silent_tlb()
82 …__set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_pag… in set_silent_tlb()
83 …__set_tlb_bus(trident, page+1, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_p… in set_silent_tlb()
97 #define aligned_page_offset(page) ((page) * ALIGN_PAGE_SIZE) argument
98 #define page_to_ptr(trident,page) __tlb_to_ptr(trident, (page) * UNIT_PAGES) argument
99 #define page_to_addr(trident,page) __tlb_to_addr(trident, (page) * UNIT_PAGES) argument
102 static inline void set_tlb_bus(struct snd_trident *trident, int page, in set_tlb_bus() argument
106 page *= UNIT_PAGES; in set_tlb_bus()
107 for (i = 0; i < UNIT_PAGES; i++, page++) { in set_tlb_bus()
108 __set_tlb_bus(trident, page, ptr, addr); in set_tlb_bus()
113 static inline void set_silent_tlb(struct snd_trident *trident, int page) in set_silent_tlb() argument
116 page *= UNIT_PAGES; in set_silent_tlb()
117 for (i = 0; i < UNIT_PAGES; i++, page++) in set_silent_tlb()
118 …__set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_pag… in set_silent_tlb()
143 int page, psize; in search_empty() local
147 page = 0; in search_empty()
150 if (page + psize <= firstpg(blk)) in search_empty()
152 page = lastpg(blk) + 1; in search_empty()
154 if (page + psize > MAX_ALIGN_PAGES) in search_empty()
162 blk->offset = aligned_page_offset(page); /* set aligned offset */ in search_empty()
163 firstpg(blk) = page; in search_empty()
164 lastpg(blk) = page + psize - 1; in search_empty()
195 int idx, page; in snd_trident_alloc_sg_pages() local
216 for (page = firstpg(blk); page <= lastpg(blk); page++, idx++) { in snd_trident_alloc_sg_pages()
226 set_tlb_bus(trident, page, ptr, addr); in snd_trident_alloc_sg_pages()
241 int page; in snd_trident_alloc_cont_pages() local
264 for (page = firstpg(blk); page <= lastpg(blk); page++, in snd_trident_alloc_cont_pages()
271 set_tlb_bus(trident, page, ptr, addr); in snd_trident_alloc_cont_pages()
300 int page; in snd_trident_free_pages() local
308 for (page = firstpg(blk); page <= lastpg(blk); page++) in snd_trident_free_pages()
309 set_silent_tlb(trident, page); in snd_trident_free_pages()