From: Rob Clark <rclark@redhat.com>
To: rhkernel-list@redhat.com
Cc: Oded Gabbay <oded.gabbay@gmail.com>,
Stable <stable@vger.kernel.org>,
David Airlie <airlied@redhat.com>, Adam Jackson <ajax@redhat.com>,
Rob Clark <rclark@redhat.com>
Subject: [RHEL7 drm 27/34] drm/amdkfd: destroy dbgmgr in notifier release
Date: Thu, 9 Jun 2016 20:16:26 -0400 [thread overview]
Message-ID: <1465517793-14679-28-git-send-email-rclark@redhat.com> (raw)
In-Reply-To: <1465517793-14679-1-git-send-email-rclark@redhat.com>
From: Oded Gabbay <oded.gabbay@gmail.com>
Upstream: Posted
RHBZ: 1328491
amdkfd need to destroy the debug manager in case amdkfd's notifier
function is called before the unbind function, because in that case,
the unbind function will exit without destroying debug manager.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
CC: Stable <stable@vger.kernel.org>
---
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index a64bc61..7708d90 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -242,13 +242,19 @@ static void kfd_process_notifier_release(struct mmu_notifier *mn,
pqm_uninit(&p->pqm);
/* Iterate over all process device data structure and check
- * if we should reset all wavefronts */
- list_for_each_entry(pdd, &p->per_device_data, per_device_list)
+ * if we should delete debug managers and reset all wavefronts
+ */
+ list_for_each_entry(pdd, &p->per_device_data, per_device_list) {
+ if ((pdd->dev->dbgmgr) &&
+ (pdd->dev->dbgmgr->pasid == p->pasid))
+ kfd_dbgmgr_destroy(pdd->dev->dbgmgr);
+
if (pdd->reset_wavefronts) {
pr_warn("amdkfd: Resetting all wave fronts\n");
dbgdev_wave_reset_wavefronts(pdd->dev, p);
pdd->reset_wavefronts = false;
}
+ }
mutex_unlock(&p->mutex);
--
2.5.5
prev parent reply other threads:[~2016-06-10 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1465517793-14679-1-git-send-email-rclark@redhat.com>
2016-06-10 0:16 ` [RHEL7 drm 26/34] drm/amdkfd: unbind only existing processes Rob Clark
2016-06-10 0:16 ` Rob Clark [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465517793-14679-28-git-send-email-rclark@redhat.com \
--to=rclark@redhat.com \
--cc=airlied@redhat.com \
--cc=ajax@redhat.com \
--cc=oded.gabbay@gmail.com \
--cc=rhkernel-list@redhat.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox