Lines Matching refs:npgs
44 sg_alloc_table(struct sg_table *sgt, unsigned npgs, gfp_t gfp) in sg_alloc_table() argument
47 sgt->sgl->sg_pgs = kcalloc(npgs, sizeof(sgt->sgl->sg_pgs[0]), gfp); in sg_alloc_table()
50 sgt->sgl->sg_npgs = sgt->nents = npgs; in sg_alloc_table()
58 unsigned npgs, bus_size_t offset, bus_size_t size, unsigned maxseg, in __sg_alloc_table_from_pages() argument
65 KASSERT(size == (bus_size_t)npgs << PAGE_SHIFT); in __sg_alloc_table_from_pages()
67 ret = sg_alloc_table(sgt, npgs, gfp); in __sg_alloc_table_from_pages()
71 for (i = 0; i < npgs; i++) in __sg_alloc_table_from_pages()
79 unsigned npgs, bus_size_t offset, bus_size_t size, gfp_t gfp) in sg_alloc_table_from_pages() argument
82 return __sg_alloc_table_from_pages(sgt, pgs, npgs, offset, size, in sg_alloc_table_from_pages()
90 int i, npgs = 0; in sg_alloc_table_from_bus_dmamem() local
101 for (; len >= PAGE_SIZE; len -= PAGE_SIZE, npgs++) { in sg_alloc_table_from_bus_dmamem()
102 if (npgs == INT_MAX) in sg_alloc_table_from_bus_dmamem()
109 ret = sg_alloc_table(sgt, npgs, gfp); in sg_alloc_table_from_bus_dmamem()