Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu amdgpu: store proc...
details: https://anonhg.NetBSD.org/src/rev/1d893db863d7
branches: trunk
changeset: 1028982:1d893db863d7
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:38:24 2021 +0000
description:
amdgpu: store process and lwp info for netbsd in amdgpu taskinfo.
Author: phone <mrg%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r 53d7ac0b1517 -r 1d893db863d7 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c Sun Dec 19 12:38:15 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vm.c Sun Dec 19 12:38:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_vm.c,v 1.11 2021/12/19 12:33:02 riastradh Exp $ */
+/* $NetBSD: amdgpu_vm.c,v 1.12 2021/12/19 12:38:24 riastradh Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
* Jerome Glisse
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_vm.c,v 1.11 2021/12/19 12:33:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_vm.c,v 1.12 2021/12/19 12:38:24 riastradh Exp $");
#include <linux/dma-fence-array.h>
#include <linux/interval_tree_generic.h>
@@ -3284,7 +3284,6 @@
void amdgpu_vm_get_task_info(struct amdgpu_device *adev, unsigned int pasid,
struct amdgpu_task_info *task_info)
{
-#ifndef __NetBSD__ /* XXX amdgpu task info */
struct amdgpu_vm *vm;
unsigned long flags;
@@ -3295,7 +3294,6 @@
*task_info = vm->task_info;
spin_unlock_irqrestore(&adev->vm_manager.pasid_lock, flags);
-#endif
}
/**
@@ -3305,10 +3303,18 @@
*/
void amdgpu_vm_set_task_info(struct amdgpu_vm *vm)
{
-#ifndef __NetBSD__ /* XXX amdgpu task info */
if (vm->task_info.pid)
return;
+#ifdef __NetBSD__
+ vm->task_info.pid = curlwp->l_proc->p_pid;
+ vm->task_info.tgid = curlwp->l_lid;
+ strlcpy(vm->task_info.process_name, curlwp->l_proc->p_comm,
+ sizeof vm->task_info.process_name);
+ if (curlwp->l_name)
+ strlcpy(vm->task_info.task_name, curlwp->l_name,
+ sizeof vm->task_info.task_name);
+#else
vm->task_info.pid = current->pid;
get_task_comm(vm->task_info.task_name, current);
Home |
Main Index |
Thread Index |
Old Index