Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdkfd: Switch to dev_* printk stuff in kfd_int_process_v12_1.c

dev_* printk stuff is multi-GPU friendly.

Use dev_warn_ratelimited() for print_sq_intr_info_error() which is
consistent with previous IPs.

Use dev_dbg_ratelimited() for irrelevant node interrupt print to
avoid too much noise.

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lang Yu and committed by
Alex Deucher
054695c0 353f2008

+16 -12
+16 -12
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v12_1.c
··· 144 144 #define KFD_CTXID0_DOORBELL_ID(ctxid0) ((ctxid0) & \ 145 145 KFD_CTXID0_DOORBELL_ID_MASK) 146 146 147 - static void print_sq_intr_info_auto(uint32_t context_id0, uint32_t context_id1) 147 + static void print_sq_intr_info_auto(struct kfd_node *dev, uint32_t context_id0, uint32_t context_id1) 148 148 { 149 - pr_debug_ratelimited( 149 + dev_dbg_ratelimited( 150 + dev->adev->dev, 150 151 "sq_intr: auto, ttrace %d, wlt %d, ttrace_buf0_full %d, ttrace_buf1_full %d ttrace_utc_err %d\n", 151 152 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, THREAD_TRACE), 152 153 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, WLT), ··· 156 155 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_AUTO_CTXID0, THREAD_TRACE_UTC_ERROR)); 157 156 } 158 157 159 - static void print_sq_intr_info_inst(uint32_t context_id0, uint32_t context_id1) 158 + static void print_sq_intr_info_inst(struct kfd_node *dev, uint32_t context_id0, uint32_t context_id1) 160 159 { 161 - pr_debug_ratelimited( 160 + dev_dbg_ratelimited( 161 + dev->adev->dev, 162 162 "sq_intr: inst, data 0x%08x, sh %d, priv %d, wave_id %d, simd_id %d, wgp_id %d\n", 163 163 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0, DATA), 164 164 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_WAVE_CTXID0, SA_ID), ··· 169 167 REG_GET_FIELD(context_id1, SQ_INTERRUPT_WORD_WAVE_CTXID1, WGP_ID)); 170 168 } 171 169 172 - static void print_sq_intr_info_error(uint32_t context_id0, uint32_t context_id1) 170 + static void print_sq_intr_info_error(struct kfd_node *dev, uint32_t context_id0, uint32_t context_id1) 173 171 { 174 - pr_debug_ratelimited( 172 + dev_warn_ratelimited( 173 + dev->adev->dev, 175 174 "sq_intr: error, detail 0x%08x, type %d, sh %d, priv %d, wave_id %d, simd_id %d, wgp_id %d\n", 176 175 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, DETAIL), 177 176 REG_GET_FIELD(context_id0, SQ_INTERRUPT_WORD_ERROR_CTXID0, TYPE), ··· 249 246 vmid = SOC15_VMID_FROM_IH_ENTRY(ih_ring_entry); 250 247 251 248 if (!kfd_irq_is_from_node(node, node_id, vmid)) { 252 - pr_debug("Interrupt not for Node, node_id: %d, vmid: %d\n", node_id, vmid); 249 + dev_dbg_ratelimited(node->adev->dev, 250 + "Interrupt not for Node, node_id: %d, vmid: %d\n", node_id, vmid); 253 251 return false; 254 252 } 255 253 ··· 270 266 (context_id0 & AMDGPU_FENCE_MES_QUEUE_FLAG)) 271 267 return false; 272 268 273 - pr_debug("client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n", 269 + dev_dbg(node->adev->dev, "client id 0x%x, source id %d, vmid %d, pasid 0x%x. raw data:\n", 274 270 client_id, source_id, vmid, pasid); 275 - pr_debug("%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n", 271 + dev_dbg(node->adev->dev, "%8X, %8X, %8X, %8X, %8X, %8X, %8X, %8X.\n", 276 272 data[0], data[1], data[2], data[3], 277 273 data[4], data[5], data[6], data[7]); 278 274 ··· 365 361 SQ_INTERRUPT_WORD_WAVE_CTXID1, ENCODING); 366 362 switch (sq_int_enc) { 367 363 case SQ_INTERRUPT_WORD_ENCODING_AUTO: 368 - print_sq_intr_info_auto(context_id0, context_id1); 364 + print_sq_intr_info_auto(node, context_id0, context_id1); 369 365 break; 370 366 case SQ_INTERRUPT_WORD_ENCODING_INST: 371 - print_sq_intr_info_inst(context_id0, context_id1); 367 + print_sq_intr_info_inst(node, context_id0, context_id1); 372 368 sq_int_priv = REG_GET_FIELD(context_id0, 373 369 SQ_INTERRUPT_WORD_WAVE_CTXID0, PRIV); 374 370 if (sq_int_priv && (kfd_set_dbg_ev_from_interrupt(node, pasid, ··· 378 374 return; 379 375 break; 380 376 case SQ_INTERRUPT_WORD_ENCODING_ERROR: 381 - print_sq_intr_info_error(context_id0, context_id1); 377 + print_sq_intr_info_error(node, context_id0, context_id1); 382 378 sq_int_errtype = REG_GET_FIELD(context_id0, 383 379 SQ_INTERRUPT_WORD_ERROR_CTXID0, TYPE); 384 380 if (sq_int_errtype != SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST &&