search for: sglen

Displaying 9 results from an estimated 9 matches for "sglen".

Did you mean: glen
2013 Nov 29
2
Fixing nouveau for >4k PAGE_SIZE
...gt;node->type; + u32 order = PAGE_SHIFT - shift; + u32 num = length >> PAGE_SHIFT; u32 pde = (offset >> vmm->pgt_bits) - vm->fpde; - u32 pte = (offset & ((1 << vmm->pgt_bits) - 1)) >> bits; - u32 max = 1 << (vmm->pgt_bits - bits); - unsigned m, sglen; - u32 end, len; + u32 pte = offset & ((1 << vmm->pgt_bits) - 1); + u32 max = 1 << vmm->pgt_bits; + u32 end, len, cardlen; int i; struct scatterlist *sg; - for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { - struct nouveau_gpuobj *pgt = vm->pgt[pde].ob...
2013 Dec 11
0
Fixing nouveau for >4k PAGE_SIZE
...; + u32 num = length >> PAGE_SHIFT; > u32 pde = (offset >> vmm->pgt_bits) - vm->fpde; > - u32 pte = (offset & ((1 << vmm->pgt_bits) - 1)) >> bits; > - u32 max = 1 << (vmm->pgt_bits - bits); > - unsigned m, sglen; > - u32 end, len; > + u32 pte = offset & ((1 << vmm->pgt_bits) - 1); > + u32 max = 1 << vmm->pgt_bits; > + u32 end, len, cardlen; > int i; > struct scatterlist *sg; > > - for_each_sg(mem->sg->sgl, s...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...< (vmm->pgt_bits - bits); > > @@ -98,7 +99,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, > > > > for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { > > struct nouveau_gpuobj *pgt = vm->pgt[pde].obj[big]; > > - sglen = sg_dma_len(sg) >> PAGE_SHIFT; > > + sglen = sg_dma_len(sg) >> shift; > > > > end = pte + sglen; > > if (unlikely(end >= max)) > Please add a WARN_ON(big); in map_sg and map_sg_table if you do this. So that's debatable :-) The above code is...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...pgt_bits) - 1)) >> bits; u32 max = 1 << (vmm->pgt_bits - bits); @@ -98,7 +99,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { struct nouveau_gpuobj *pgt = vm->pgt[pde].obj[big]; - sglen = sg_dma_len(sg) >> PAGE_SHIFT; + sglen = sg_dma_len(sg) >> shift; end = pte + sglen; if (unlikely(end >= max)) @@ -106,7 +107,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, len = end - pte; for (m = 0; m < len; m++) { - dma_addr_t...
2013 Aug 29
0
Fixing nouveau for >4k PAGE_SIZE
...t; > @@ -98,7 +99,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, >> > >> > for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { >> > struct nouveau_gpuobj *pgt = vm->pgt[pde].obj[big]; >> > - sglen = sg_dma_len(sg) >> PAGE_SHIFT; >> > + sglen = sg_dma_len(sg) >> shift; >> > >> > end = pte + sglen; >> > if (unlikely(end >= max)) >> Please add a WARN_ON(big); in map_sg and map_sg_table if you do this. &gt...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...lx5_vdpa_direct_mr *mr, 217 struct vhost_iotlb *iotlb) 218 { 219 struct vhost_iotlb_map *map; 220 unsigned long lgcd = 0; 221 int log_entity_size; 222 unsigned long size; 223 u64 start = 0; 224 int err; 225 struct page *pg; 226 unsigned int nsg; 227 int sglen; 228 u64 pa; 229 u64 paend; 230 struct scatterlist *sg; 231 struct device *dma = mvdev->mdev->device; 232 int ret; 233 234 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1); 235 map; map = vhost_iotlb_itree_next(map, start, mr->end...
2013 Aug 11
0
Fixing nouveau for >4k PAGE_SIZE
...> u32 max = 1 << (vmm->pgt_bits - bits); > @@ -98,7 +99,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, > > for_each_sg(mem->sg->sgl, sg, mem->sg->nents, i) { > struct nouveau_gpuobj *pgt = vm->pgt[pde].obj[big]; > - sglen = sg_dma_len(sg) >> PAGE_SHIFT; > + sglen = sg_dma_len(sg) >> shift; > > end = pte + sglen; > if (unlikely(end >= max)) Please add a WARN_ON(big); in map_sg and map_sg_table if you do this. > @@ -106,7 +107,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma,...
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
Op 11-08-13 07:36, Benjamin Herrenschmidt schreef: > On Sun, 2013-08-11 at 10:41 +1000, Benjamin Herrenschmidt wrote: >> Now, to do that, I need a better understanding of the various things >> in there since I'm not familiar with nouveau at all. What I think I've >> figured out is with a few questions, it would be awesome if you could >> answer them so I can have
2013 Aug 11
2
Fixing nouveau for >4k PAGE_SIZE
...low level, but this isn't enough, and after a bit of digging, I also think that's not the right approach: So, from what I can tell, subdev/vm/base.c is not clean vs. PAGE_SIZE in a number of places unless I'm mistaken. For example, in nouveau_vm_map_sg_table(), something like that: sglen = sg_dma_len(sg) >> PAGE_SHIFT; end = pte + sglen; Seems to imply an assumption here that the "pte" is in multiple of PAGE_SHIFT, but afaik, it's not. So further down, we do: for (m = 0; m < len; m++) { dma_addr_t addr = sg_dma_address(sg) + (m << PAGE_SHIFT);...