@@ -330,12 +330,6 @@ static void kfd_init_apertures_vi(struct kfd_process_device *pdd, uint8_t id)
330
330
pdd -> gpuvm_limit =
331
331
pdd -> dev -> kfd -> shared_resources .gpuvm_size - 1 ;
332
332
333
- /* dGPUs: the reserved space for kernel
334
- * before SVM
335
- */
336
- pdd -> qpd .cwsr_base = SVM_CWSR_BASE ;
337
- pdd -> qpd .ib_base = SVM_IB_BASE ;
338
-
339
333
pdd -> scratch_base = MAKE_SCRATCH_APP_BASE_VI ();
340
334
pdd -> scratch_limit = MAKE_SCRATCH_APP_LIMIT (pdd -> scratch_base );
341
335
}
@@ -345,18 +339,18 @@ static void kfd_init_apertures_v9(struct kfd_process_device *pdd, uint8_t id)
345
339
pdd -> lds_base = MAKE_LDS_APP_BASE_V9 ();
346
340
pdd -> lds_limit = MAKE_LDS_APP_LIMIT (pdd -> lds_base );
347
341
348
- pdd -> gpuvm_base = PAGE_SIZE ;
342
+ /* Raven needs SVM to support graphic handle, etc. Leave the small
343
+ * reserved space before SVM on Raven as well, even though we don't
344
+ * have to.
345
+ * Set gpuvm_base and gpuvm_limit to CANONICAL addresses so that they
346
+ * are used in Thunk to reserve SVM.
347
+ */
348
+ pdd -> gpuvm_base = SVM_USER_BASE ;
349
349
pdd -> gpuvm_limit =
350
350
pdd -> dev -> kfd -> shared_resources .gpuvm_size - 1 ;
351
351
352
352
pdd -> scratch_base = MAKE_SCRATCH_APP_BASE_V9 ();
353
353
pdd -> scratch_limit = MAKE_SCRATCH_APP_LIMIT (pdd -> scratch_base );
354
-
355
- /*
356
- * Place TBA/TMA on opposite side of VM hole to prevent
357
- * stray faults from triggering SVM on these pages.
358
- */
359
- pdd -> qpd .cwsr_base = pdd -> dev -> kfd -> shared_resources .gpuvm_size ;
360
354
}
361
355
362
356
int kfd_init_apertures (struct kfd_process * process )
@@ -413,6 +407,12 @@ int kfd_init_apertures(struct kfd_process *process)
413
407
return - EINVAL ;
414
408
}
415
409
}
410
+
411
+ /* dGPUs: the reserved space for kernel
412
+ * before SVM
413
+ */
414
+ pdd -> qpd .cwsr_base = SVM_CWSR_BASE ;
415
+ pdd -> qpd .ib_base = SVM_IB_BASE ;
416
416
}
417
417
418
418
dev_dbg (kfd_device , "node id %u\n" , id );
0 commit comments