To get the device context, replace pr_ with dev_ functions.

Signed-off-by: Lijo Lazar <lijo.la...@amd.com>
---
 .../gpu/drm/amd/amdkfd/kfd_int_process_v10.c  | 142 ++++++++++++------
 .../gpu/drm/amd/amdkfd/kfd_int_process_v11.c  |  92 ++++++++----
 .../gpu/drm/amd/amdkfd/kfd_int_process_v9.c   | 142 ++++++++++++++----
 3 files changed, 263 insertions(+), 113 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
index 37b69fe0ede3..54870b4c5000 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v10.c
@@ -168,11 +168,12 @@ static bool event_interrupt_isr_v10(struct kfd_node *dev,
            client_id != SOC15_IH_CLIENTID_SE3SH)
                return false;
 
-       pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw 
data:\n",
-                client_id, source_id, vmid, pasid);
-       pr_debug("%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n",
-                data[0], data[1], data[2], data[3],
-                data[4], data[5], data[6], data[7]);
+       dev_dbg(dev->adev->dev,
+               "client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw 
data:\n",
+               client_id, source_id, vmid, pasid);
+       dev_dbg(dev->adev->dev, "%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n",
+               data[0], data[1], data[2], data[3], data[4], data[5], data[6],
+               data[7]);
 
        /* If there is no valid PASID, it's likely a bug */
        if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
@@ -217,37 +218,66 @@ static void event_interrupt_wq_v10(struct kfd_node *dev,
                                                SQ_INTERRUPT_WORD_WAVE_CTXID1, 
ENCODING);
                        switch (encoding) {
                        case SQ_INTERRUPT_WORD_ENCODING_AUTO:
-                               pr_debug_ratelimited(
+                               dev_dbg_ratelimited(
+                                       dev->adev->dev,
                                        "sq_intr: auto, se %d, ttrace %d, wlt 
%d, ttrac_buf0_full %d, ttrac_buf1_full %d, ttrace_utc_err %d\n",
-                                       REG_GET_FIELD(context_id1, 
SQ_INTERRUPT_WORD_AUTO_CTXID1,
-                                                       SE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID0,
-                                                       THREAD_TRACE),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID0,
-                                                       WLT),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID0,
-                                                       THREAD_TRACE_BUF0_FULL),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID0,
-                                                       THREAD_TRACE_BUF1_FULL),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID0,
-                                                       
THREAD_TRACE_UTC_ERROR));
+                                       REG_GET_FIELD(
+                                               context_id1,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID1,
+                                               SE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                                               THREAD_TRACE),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                                               WLT),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                                               THREAD_TRACE_BUF0_FULL),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                                               THREAD_TRACE_BUF1_FULL),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                                               THREAD_TRACE_UTC_ERROR));
                                break;
                        case SQ_INTERRUPT_WORD_ENCODING_INST:
-                               pr_debug_ratelimited("sq_intr: inst, se %d, 
data 0x%x, sa %d, priv %d, wave_id %d, simd_id %d, wgp_id %d\n",
-                                       REG_GET_FIELD(context_id1, 
SQ_INTERRUPT_WORD_WAVE_CTXID1,
-                                                       SE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       DATA),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       SA_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       PRIV),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       WAVE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       SIMD_ID),
-                                       REG_GET_FIELD(context_id1, 
SQ_INTERRUPT_WORD_WAVE_CTXID1,
-                                                       WGP_ID));
+                               dev_dbg_ratelimited(
+                                       dev->adev->dev,
+                                       "sq_intr: inst, se %d, data 0x%x, sa 
%d, priv %d, wave_id %d, simd_id %d, wgp_id %d\n",
+                                       REG_GET_FIELD(
+                                               context_id1,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID1,
+                                               SE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               DATA),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               SA_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               PRIV),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               WAVE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               SIMD_ID),
+                                       REG_GET_FIELD(
+                                               context_id1,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID1,
+                                               WGP_ID));
                                if (context_id0 & 
SQ_INTERRUPT_WORD_WAVE_CTXID0__PRIV_MASK) {
                                        if (kfd_set_dbg_ev_from_interrupt(dev, 
pasid,
                                                        
KFD_DEBUG_DOORBELL_ID(context_id0),
@@ -259,21 +289,37 @@ static void event_interrupt_wq_v10(struct kfd_node *dev,
                        case SQ_INTERRUPT_WORD_ENCODING_ERROR:
                                sq_intr_err_type = REG_GET_FIELD(context_id0, 
KFD_CTXID0,
                                                                ERR_TYPE);
-                               pr_warn_ratelimited("sq_intr: error, se %d, 
data 0x%x, sa %d, priv %d, wave_id %d, simd_id %d, wgp_id %d, err_type %d\n",
-                                       REG_GET_FIELD(context_id1, 
SQ_INTERRUPT_WORD_WAVE_CTXID1,
-                                                       SE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       DATA),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       SA_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       PRIV),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       WAVE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID0,
-                                                       SIMD_ID),
-                                       REG_GET_FIELD(context_id1, 
SQ_INTERRUPT_WORD_WAVE_CTXID1,
-                                                       WGP_ID),
+                               dev_warn_ratelimited(
+                                       dev->adev->dev,
+                                       "sq_intr: error, se %d, data 0x%x, sa 
%d, priv %d, wave_id %d, simd_id %d, wgp_id %d, err_type %d\n",
+                                       REG_GET_FIELD(
+                                               context_id1,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID1,
+                                               SE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               DATA),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               SA_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               PRIV),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               WAVE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                                               SIMD_ID),
+                                       REG_GET_FIELD(
+                                               context_id1,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID1,
+                                               WGP_ID),
                                        sq_intr_err_type);
                                break;
                        default:
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
index c5f97e6e36ff..eb88ba8d8b01 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
@@ -148,44 +148,69 @@ enum SQ_INTERRUPT_ERROR_TYPE {
 #define KFD_CTXID0_DOORBELL_ID(ctxid0)         ((ctxid0) & \
                                KFD_CTXID0_DOORBELL_ID_MASK)
 
-static void print_sq_intr_info_auto(uint32_t context_id0, uint32_t context_id1)
+static void print_sq_intr_info_auto(struct kfd_node *dev, uint32_t context_id0,
+                                   uint32_t context_id1)
 {
-       pr_debug_ratelimited(
+       dev_dbg_ratelimited(
+               dev->adev->dev,
                "sq_intr: auto, ttrace %d, wlt %d, ttrace_buf_full %d, reg_tms 
%d, cmd_tms %d, host_cmd_ovf %d, host_reg_ovf %d, immed_ovf %d, ttrace_utc_err 
%d\n",
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
THREAD_TRACE),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             THREAD_TRACE),
                REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, WLT),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
THREAD_TRACE_BUF_FULL),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
REG_TIMESTAMP),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
CMD_TIMESTAMP),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
HOST_CMD_OVERFLOW),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
HOST_REG_OVERFLOW),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
IMMED_OVERFLOW),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, 
THREAD_TRACE_UTC_ERROR));
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             THREAD_TRACE_BUF_FULL),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             REG_TIMESTAMP),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             CMD_TIMESTAMP),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             HOST_CMD_OVERFLOW),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             HOST_REG_OVERFLOW),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             IMMED_OVERFLOW),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0,
+                             THREAD_TRACE_UTC_ERROR));
 }
 
-static void print_sq_intr_info_inst(uint32_t context_id0, uint32_t context_id1)
+static void print_sq_intr_info_inst(struct kfd_node *dev, uint32_t context_id0,
+                                   uint32_t context_id1)
 {
-       pr_debug_ratelimited(
+       dev_dbg_ratelimited(
+               dev->adev->dev,
                "sq_intr: inst, data 0x%08x, sh %d, priv %d, wave_id %d, 
simd_id %d, wgp_id %d\n",
                REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0, DATA),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0, 
SH_ID),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                             SH_ID),
                REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0, PRIV),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0, 
WAVE_ID),
-               REG_GET_FIELD(context_id1, SQ_INTERRUPT_WORD_WAVE_CTXID1, 
SIMD_ID),
-               REG_GET_FIELD(context_id1, SQ_INTERRUPT_WORD_WAVE_CTXID1, 
WGP_ID));
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0,
+                             WAVE_ID),
+               REG_GET_FIELD(context_id1, SQ_INTERRUPT_WORD_WAVE_CTXID1,
+                             SIMD_ID),
+               REG_GET_FIELD(context_id1, SQ_INTERRUPT_WORD_WAVE_CTXID1,
+                             WGP_ID));
 }
 
-static void print_sq_intr_info_error(uint32_t context_id0, uint32_t 
context_id1)
+static void print_sq_intr_info_error(struct kfd_node *dev, uint32_t 
context_id0,
+                                    uint32_t context_id1)
 {
-       pr_warn_ratelimited(
+       dev_warn_ratelimited(
+               dev->adev->dev,
                "sq_intr: error, detail 0x%08x, type %d, sh %d, priv %d, 
wave_id %d, simd_id %d, wgp_id %d\n",
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, 
DETAIL),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, 
TYPE),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, 
SH_ID),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, 
PRIV),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, 
WAVE_ID),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID1, 
SIMD_ID),
-               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID1, 
WGP_ID));
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0,
+                             DETAIL),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0,
+                             TYPE),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0,
+                             SH_ID),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0,
+                             PRIV),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0,
+                             WAVE_ID),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID1,
+                             SIMD_ID),
+               REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID1,
+                             WGP_ID));
 }
 
 static void event_interrupt_poison_consumption_v11(struct kfd_node *dev,
@@ -255,11 +280,12 @@ static bool event_interrupt_isr_v11(struct kfd_node *dev,
            (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG))
                return false;
 
-       pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw 
data:\n",
-                client_id, source_id, vmid, pasid);
-       pr_debug("%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n",
-                data[0], data[1], data[2], data[3],
-                data[4], data[5], data[6], data[7]);
+       dev_dbg(dev->adev->dev,
+               "client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw 
data:\n",
+               client_id, source_id, vmid, pasid);
+       dev_dbg(dev->adev->dev, "%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n",
+               data[0], data[1], data[2], data[3], data[4], data[5], data[6],
+               data[7]);
 
        /* If there is no valid PASID, it's likely a bug */
        if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
@@ -353,10 +379,10 @@ static void event_interrupt_wq_v11(struct kfd_node *dev,
                                        SQ_INTERRUPT_WORD_WAVE_CTXID1, 
ENCODING);
                        switch (sq_int_enc) {
                        case SQ_INTERRUPT_WORD_ENCODING_AUTO:
-                               print_sq_intr_info_auto(context_id0, 
context_id1);
+                               print_sq_intr_info_auto(dev, context_id0, 
context_id1);
                                break;
                        case SQ_INTERRUPT_WORD_ENCODING_INST:
-                               print_sq_intr_info_inst(context_id0, 
context_id1);
+                               print_sq_intr_info_inst(dev, context_id0, 
context_id1);
                                sq_int_priv = REG_GET_FIELD(context_id0,
                                                SQ_INTERRUPT_WORD_WAVE_CTXID0, 
PRIV);
                                if (sq_int_priv && 
(kfd_set_dbg_ev_from_interrupt(dev, pasid,
@@ -366,7 +392,7 @@ static void event_interrupt_wq_v11(struct kfd_node *dev,
                                        return;
                                break;
                        case SQ_INTERRUPT_WORD_ENCODING_ERROR:
-                               print_sq_intr_info_error(context_id0, 
context_id1);
+                               print_sq_intr_info_error(dev, context_id0, 
context_id1);
                                sq_int_errtype = REG_GET_FIELD(context_id0,
                                                SQ_INTERRUPT_WORD_ERROR_CTXID0, 
TYPE);
                                if (sq_int_errtype != 
SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST &&
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
index b8a91bf4ef30..4ceb251312a6 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
@@ -314,11 +314,12 @@ static bool event_interrupt_isr_v9(struct kfd_node *dev,
                                        & ~pasid_mask) | pasid);
        }
 
-       pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw 
data:\n",
-                client_id, source_id, vmid, pasid);
-       pr_debug("%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n",
-                data[0], data[1], data[2], data[3],
-                data[4], data[5], data[6], data[7]);
+       dev_dbg(dev->adev->dev,
+               "client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw 
data:\n",
+               client_id, source_id, vmid, pasid);
+       dev_dbg(dev->adev->dev, "%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n",
+               data[0], data[1], data[2], data[3], data[4], data[5], data[6],
+               data[7]);
 
        /* If there is no valid PASID, it's likely a bug */
        if (WARN_ONCE(pasid == 0, "Bug: No PASID in KFD interrupt"))
@@ -379,28 +380,82 @@ static void event_interrupt_wq_v9(struct kfd_node *dev,
                        encoding = REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, ENCODING);
                        switch (encoding) {
                        case SQ_INTERRUPT_WORD_ENCODING_AUTO:
-                               pr_debug_ratelimited(
+                               dev_dbg_ratelimited(
+                                       dev->adev->dev,
                                        "sq_intr: auto, se %d, ttrace %d, wlt 
%d, ttrac_buf_full %d, reg_tms %d, cmd_tms %d, host_cmd_ovf %d, host_reg_ovf 
%d, immed_ovf %d, ttrace_utc_err %d\n",
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, SE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, THREAD_TRACE),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, WLT),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, THREAD_TRACE_BUF_FULL),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, REG_TIMESTAMP),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, CMD_TIMESTAMP),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, HOST_CMD_OVERFLOW),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, HOST_REG_OVERFLOW),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, IMMED_OVERFLOW),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_AUTO_CTXID, THREAD_TRACE_UTC_ERROR));
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               SE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               THREAD_TRACE),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               WLT),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               THREAD_TRACE_BUF_FULL),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               REG_TIMESTAMP),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               CMD_TIMESTAMP),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               HOST_CMD_OVERFLOW),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               HOST_REG_OVERFLOW),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               IMMED_OVERFLOW),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_AUTO_CTXID,
+                                               THREAD_TRACE_UTC_ERROR));
                                break;
                        case SQ_INTERRUPT_WORD_ENCODING_INST:
-                               pr_debug_ratelimited("sq_intr: inst, se %d, 
data 0x%x, sh %d, priv %d, wave_id %d, simd_id %d, cu_id %d, intr_data 0x%x\n",
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, SE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, DATA),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, SH_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, PRIV),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, WAVE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, SIMD_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, CU_ID),
+                               dev_dbg_ratelimited(
+                                       dev->adev->dev,
+                                       "sq_intr: inst, se %d, data 0x%x, sh 
%d, priv %d, wave_id %d, simd_id %d, cu_id %d, intr_data 0x%x\n",
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               SE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               DATA),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               SH_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               PRIV),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               WAVE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               SIMD_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               CU_ID),
                                        sq_int_data);
                                if (context_id0 & 
SQ_INTERRUPT_WORD_WAVE_CTXID__PRIV_MASK) {
                                        if (kfd_set_dbg_ev_from_interrupt(dev, 
pasid,
@@ -412,14 +467,37 @@ static void event_interrupt_wq_v9(struct kfd_node *dev,
                                break;
                        case SQ_INTERRUPT_WORD_ENCODING_ERROR:
                                sq_intr_err = REG_GET_FIELD(sq_int_data, 
KFD_SQ_INT_DATA, ERR_TYPE);
-                               pr_warn_ratelimited("sq_intr: error, se %d, 
data 0x%x, sh %d, priv %d, wave_id %d, simd_id %d, cu_id %d, err_type %d\n",
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, SE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, DATA),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, SH_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, PRIV),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, WAVE_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, SIMD_ID),
-                                       REG_GET_FIELD(context_id0, 
SQ_INTERRUPT_WORD_WAVE_CTXID, CU_ID),
+                               dev_warn_ratelimited(
+                                       dev->adev->dev,
+                                       "sq_intr: error, se %d, data 0x%x, sh 
%d, priv %d, wave_id %d, simd_id %d, cu_id %d, err_type %d\n",
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               SE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               DATA),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               SH_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               PRIV),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               WAVE_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               SIMD_ID),
+                                       REG_GET_FIELD(
+                                               context_id0,
+                                               SQ_INTERRUPT_WORD_WAVE_CTXID,
+                                               CU_ID),
                                        sq_intr_err);
                                if (sq_intr_err != 
SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST &&
                                        sq_intr_err != 
SQ_INTERRUPT_ERROR_TYPE_MEMVIOL) {
-- 
2.25.1

Reply via email to