<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div dir="ltr">
<div dir="ltr">The title and description don't seem right.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Remove smu?</div>
<div dir="ltr">
<div><br>
</div>
</div>
<div id="ms-outlook-mobile-signature" dir="ltr">Best Regards,<span></span></div>
<div id="ms-outlook-mobile-signature" dir="ltr">Kevin</div>
<div id="mail-editor-reference-message-container" class="ms-outlook-mobile-reference-message">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif"><b>From:</b> Chai, Thomas <YiPeng.Chai@amd.com><br>
<b>Sent:</b> Thursday, January 18, 2024 14:43<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Chai, Thomas <YiPeng.Chai@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Li, Candice <Candice.Li@amd.com>; Wang, Yang(Kevin) <KevinYang.Wang@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com><br>
<b>Subject:</b> [PATCH V2 1/5] drm/amdgpu: Add log info for umc_v12_0 and smu_v13_0_6
<div> </div>
</font></div>
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Add log info for umc_v12_0 and smu_v13_0_6.<br>
<br>
v2:<br>
 Delete redundant logs.<br>
<br>
Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/umc_v12_0.c  | 11 +++++++++++<br>
 drivers/gpu/drm/amd/amdkfd/kfd_events.c |  6 +++++-<br>
 2 files changed, 16 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c<br>
index 6423dca5b777..fa2168f1d3bf 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c<br>
@@ -91,6 +91,17 @@ static void umc_v12_0_reset_error_count(struct amdgpu_device *adev)<br>
 <br>
 bool umc_v12_0_is_deferred_error(struct amdgpu_device *adev, uint64_t mc_umc_status)<br>
 {<br>
+       dev_info(adev->dev,<br>
+               "MCA_UMC_STATUS(0x%llx): Val:%llu, Poison:%llu, Deferred:%llu, PCC:%llu, UC:%llu, TCC:%llu\n",<br>
+               mc_umc_status,<br>
+               REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Val),<br>
+               REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Poison),<br>
+               REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Deferred),<br>
+               REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, PCC),<br>
+               REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UC),<br>
+               REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, TCC)<br>
+       );<br>
+<br>
         return (amdgpu_ras_is_poison_mode_supported(adev) &&<br>
                 (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1) &&<br>
                 (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Deferred) == 1));<br>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c<br>
index 11923964ce9a..51bb98db5d7a 100644<br>
--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c<br>
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c<br>
@@ -1297,8 +1297,10 @@ void kfd_signal_poison_consumed_event(struct kfd_node *dev, u32 pasid)<br>
         uint32_t id = KFD_FIRST_NONSIGNAL_EVENT_ID;<br>
         int user_gpu_id;<br>
 <br>
-       if (!p)<br>
+       if (!p) {<br>
+               dev_warn(dev->adev->dev, "Not find process with pasid:%d\n", pasid);<br>
                 return; /* Presumably process exited. */<br>
+       }<br>
 <br>
         user_gpu_id = kfd_process_get_user_gpu_id(p, dev->id);<br>
         if (unlikely(user_gpu_id == -EINVAL)) {<br>
@@ -1334,6 +1336,8 @@ void kfd_signal_poison_consumed_event(struct kfd_node *dev, u32 pasid)<br>
                 }<br>
         }<br>
 <br>
+       dev_warn(dev->adev->dev, "Send SIGBUS to process %s(pasid:%d)\n",<br>
+               p->lead_thread->comm, pasid);<br>
         rcu_read_unlock();<br>
 <br>
         /* user application will handle SIGBUS signal */<br>
-- <br>
2.34.1<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>