search for: nouveau_pfns_to_arg

Displaying 14 results from an estimated 14 matches for "nouveau_pfns_to_arg".

Did you mean: nouveau_pfns_to_args
2020 Mar 03
2
[PATCH v2] nouveau/hmm: map pages after migration
...struct nvif_ioctl_v0 i; + struct nvif_ioctl_mthd_v0 m; + struct nvif_vmm_pfnmap_v0 p; +}; + struct nouveau_ivmm { struct nouveau_svmm *svmm; u64 inst; @@ -782,6 +788,85 @@ nouveau_svm_fault(struct nvif_notify *notify) return NVIF_NOTIFY_KEEP; } +static inline struct nouveau_pfnmap_args * +nouveau_pfns_to_args(void *pfns) +{ + struct nvif_vmm_pfnmap_v0 *p = + container_of(pfns, struct nvif_vmm_pfnmap_v0, phys); + + return container_of(p, struct nouveau_pfnmap_args, p); +} + +u64 * +nouveau_pfns_alloc(unsigned long npages) +{ + struct nouveau_pfnmap_args *args; + + args = kzalloc(struct_size(args, p.phy...
2019 Aug 07
4
[PATCH] nouveau/hmm: map pages after migration
...struct nvif_ioctl_v0 i; + struct nvif_ioctl_mthd_v0 m; + struct nvif_vmm_pfnmap_v0 p; +}; + struct nouveau_ivmm { struct nouveau_svmm *svmm; u64 inst; @@ -734,6 +740,86 @@ nouveau_svm_fault(struct nvif_notify *notify) return NVIF_NOTIFY_KEEP; } +static inline struct nouveau_pfnmap_args * +nouveau_pfns_to_args(void *pfns) +{ + struct nvif_vmm_pfnmap_v0 *p = + container_of(pfns, struct nvif_vmm_pfnmap_v0, phys); + + return container_of(p, struct nouveau_pfnmap_args, p); +} + +u64 * +nouveau_pfns_alloc(unsigned long npages) +{ + struct nouveau_pfnmap_args *args; + + args = kzalloc(sizeof(*args) + npages...
2023 Mar 29
1
[PATCH] drm/nouveau/svm: remove unused ret variable
...84ba7..e072d610f2f9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c @@ -926,15 +926,14 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm, unsigned long addr, u64 *pfns, unsigned long npages) { struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns); - int ret; args->p.addr = addr; args->p.size = npages << PAGE_SHIFT; mutex_lock(&svmm->mutex); - ret = nvif_object_ioctl(&svmm->vmm->vmm.object, args, - struct_size(args, p.phys, npages), NULL); + nvif_object_ioctl(&svmm->vmm->vmm.object...
2020 Mar 03
1
[PATCH v2] nouveau/hmm: map pages after migration
...; related changes were queued there. Now that those have been merged, this >> patch just contains changes to nouveau so it could go through any tree. >> I guess Ben Skeggs' tree would be appropriate. > > Yep > >> +static inline struct nouveau_pfnmap_args * >> +nouveau_pfns_to_args(void *pfns) > > don't use static inline inside C files OK. >> +{ >> + struct nvif_vmm_pfnmap_v0 *p = >> + container_of(pfns, struct nvif_vmm_pfnmap_v0, phys); >> + >> + return container_of(p, struct nouveau_pfnmap_args, p); > > And this should jus...
2020 Mar 04
5
[PATCH v3 0/4] nouveau/hmm: map pages after migration
...hese patches just contain changes to nouveau so they could go through any tree. I guess Ben Skeggs' tree would be appropriate. Changes since v2: Added patches 1-3 to fix some minor issues. Eliminated nouveau_find_svmm() since it is easily found. Applied Jason Gunthorpe's suggestions for nouveau_pfns_to_args(). Changes since v1: Rebase to linux-5.6.0-rc4 Address Christoph Hellwig's comments Ralph Campbell (4): nouveau/hmm: fix vma range check for migration nouveau/hmm: check for SVM initialized before migrating nouveau: remove useless SVM range check nouveau/hmm: map pages after migra...
2019 Aug 13
0
[PATCH] nouveau/hmm: map pages after migration
...+ struct nvif_vmm_pfnmap_v0 p; > +}; > + > struct nouveau_ivmm { > struct nouveau_svmm *svmm; > u64 inst; > @@ -734,6 +740,86 @@ nouveau_svm_fault(struct nvif_notify *notify) > return NVIF_NOTIFY_KEEP; > } > > +static inline struct nouveau_pfnmap_args * > +nouveau_pfns_to_args(void *pfns) > +{ > + struct nvif_vmm_pfnmap_v0 *p = > + container_of(pfns, struct nvif_vmm_pfnmap_v0, phys); > + > + return container_of(p, struct nouveau_pfnmap_args, p); > +} > + > +u64 * > +nouveau_pfns_alloc(unsigned long npages) > +{ > + struct nouveau_pfnmap...
2020 Mar 03
0
[PATCH v2] nouveau/hmm: map pages after migration
...s rdma tree since other HMM > related changes were queued there. Now that those have been merged, this > patch just contains changes to nouveau so it could go through any tree. > I guess Ben Skeggs' tree would be appropriate. Yep > +static inline struct nouveau_pfnmap_args * > +nouveau_pfns_to_args(void *pfns) don't use static inline inside C files > +{ > + struct nvif_vmm_pfnmap_v0 *p = > + container_of(pfns, struct nvif_vmm_pfnmap_v0, phys); > + > + return container_of(p, struct nouveau_pfnmap_args, p); And this should just be return container_of(pfns, struct no...
2020 Aug 27
0
[PATCH] drm/nouveau/svm: remove set but not used 'ret'
...0460559..7c95ffcbd18f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c @@ -815,7 +815,6 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm, unsigned long addr, u64 *pfns, unsigned long npages) { struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns); - int ret; args->p.addr = addr; args->p.size = npages << PAGE_SHIFT; @@ -823,8 +822,8 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm, mutex_lock(&svmm->mutex); svmm->vmm->vmm.object.client->super = true; - ret = nvif_object_ioctl(...
2024 Jan 10
2
[PATCH 2/6] drm/nouveau/svm: remove unused but set variables
.../ target = args->header >> NOUVEAU_SVM_BIND_TARGET_SHIFT; target &= NOUVEAU_SVM_BIND_TARGET_MASK; @@ -926,15 +923,14 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm, unsigned long addr, u64 *pfns, unsigned long npages) { struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns); - int ret; args->p.addr = addr; args->p.size = npages << PAGE_SHIFT; mutex_lock(&svmm->mutex); - ret = nvif_object_ioctl(&svmm->vmm->vmm.object, args, - struct_size(args, p.phys, npages), NULL); + nvif_object_ioctl(&svmm->vmm->vmm.object...
2020 Sep 19
0
[PATCH -next] gpu: nouveau: Remove set but not used variable
...0460559..01583e9954a2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_svm.c +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c @@ -815,7 +815,6 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm, unsigned long addr, u64 *pfns, unsigned long npages) { struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns); - int ret; args->p.addr = addr; args->p.size = npages << PAGE_SHIFT; @@ -823,7 +822,7 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm, mutex_lock(&svmm->mutex); svmm->vmm->vmm.object.client->super = true; - ret = nvif_object_ioctl(...
2020 May 08
11
[PATCH 0/6] nouveau/hmm: add support for mapping large pages
hmm_range_fault() returns an array of page frame numbers and flags for how the pages are mapped in the requested process' page tables. The PFN can be used to get the struct page with hmm_pfn_to_page() and the page size order can be determined with compound_order(page) but if the page is larger than order 0 (PAGE_SIZE), there is no indication that the page is mapped using a larger page size. To
2020 Nov 06
12
[PATCH v3 0/6] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers. Earlier versions were posted previously [1] and [2]. The patches apply cleanly to the linux-mm 5.10.0-rc2 tree. There are a lot of other THP patches being posted. I don't think there are any semantic conflicts but there may be some merge conflicts depending on
2020 Sep 02
10
[PATCH v2 0/7] mm/hmm/nouveau: add THP migration to migrate_vma_*
This series adds support for transparent huge page migration to migrate_vma_*() and adds nouveau SVM and HMM selftests as consumers. An earlier version was posted previously [1]. This version now supports splitting a THP midway in the migration process which led to a number of changes. The patches apply cleanly to the current linux-mm tree. Since there are a couple of patches in linux-mm from Dan
2020 Jun 19
22
[PATCH 00/16] mm/hmm/nouveau: THP mapping and migration
These patches apply to linux-5.8.0-rc1. Patches 1-3 should probably go into 5.8, the others can be queued for 5.9. Patches 4-6 improve the HMM self tests. Patch 7-8 prepare nouveau for the meat of this series which adds support and testing for compound page mapping of system memory (patches 9-11) and compound page migration to device private memory (patches 12-16). Since these changes are split