From nobody Fri Sep 25 20:02:45 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14CD63546E9 for ; Wed, 9 Sep 2026 05:10:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788930603; cv=none; b=NvmkrpYwOsluMQDZVq0CEOLxC0Bt7jqnejLbGlbkWXuvSexn17jOPuGyrWkPEqL2EvUgzQzzjpo2AFuH5VsdokwUyfqW9XiDVRCCJ7N8I3Ccuqmx/cAoYeJO60Gzf0h4ZjEOeyLEuuFF1EuUslrcLrl9JdNbatUpxCqtx3A72EQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788930603; c=relaxed/simple; bh=dZwjR73TiTPbLIt1okXWyFpe7GP6ItOia1YqprNwiRk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZKuGAEvtRayffo25VIGjKvjW0UyeeJX15zyT29vtXk4saJ1d6SGj6PQxk0K4Jxv+kHkfNcLlz9hsoz2Hf5KVlHbZjbW0CeY84iS7/W+lxjQxo21BF9N9mhif10I1m7pgIgPLqbNu3SN5/9/SzAdDQEF1J/+9zyvyjtCoCvYK6cU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=TOOR6mqK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=K+7RnpjB; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="TOOR6mqK"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="K+7RnpjB" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 688MgARx129688 for ; Wed, 9 Sep 2026 05:10:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= TyGqEvTHxTDvur0qvOYGRq1YtqRdHvGUUG9LYbZe1s0=; b=TOOR6mqKTGjbH42/ 8kXTWm07xF2eOEv1YieoK2dnp1dRILL+RHo8FU6d0o5ChPq5f5ndOAD04cozvDp9 tf+VbIMbhbwJfklcx0ZlX5C7jKNuSyOCZ1017UpXD/eP4j5PadZBk5yAlJJwci3J 7JHlT0Xcpp5BeQJtYprExjtGTbboLbIMonu1iMPgdPzjiCOImXW8J5N++iBcqH7r k+r/jGttP9cVk17Qd0kR+ENshThGJapibRh2aHse+Yv3JaM3/Q6wqlqsn6+QGr04 K1KJOQV6ElVKeV626Nmgnr6TqmYu9S5nnyr2wKnlwC4PPZmFzXEyz1qTaQGN5v3x imtYVg== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjntpjs6y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 05:10:00 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-38e54b6556aso2747164a91.2 for ; Tue, 08 Sep 2026 22:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788930600; x=1789535400; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=TyGqEvTHxTDvur0qvOYGRq1YtqRdHvGUUG9LYbZe1s0=; b=K+7RnpjBt0NgKEP8B1U4Hm9U9G9KdKiCZzwuqgkUYglfwp1dYovj2boJ/YTuE1q2ay BPqgjrVIwNwdEcd1pRkMI6+RvLsA67P1/oiC/seCGVvgb5C3rB3VEbuc3c7qddcbO0Xu oBozTDoA2FnDuM+UMv9mD0VihRC+gHnY/H4usc/yrY7Oi/AgVM1COcXXPXK5xPCXNPq+ bYVBayt1uYQRPBbuM2ieG8U77VjVHF9RxiROwn6fp47WmHbQXXteM4wiBs94LxaheEE1 V9kS83dZpqV02RQjsyOm9Frbtm7DmTWBVKLrnTWGNujsJqspkaus98Ox4agwbc46sGNU 58yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788930600; x=1789535400; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=TyGqEvTHxTDvur0qvOYGRq1YtqRdHvGUUG9LYbZe1s0=; b=CzQhEobSPfDfCatdi4gKZPNRcKIueTcQNjJJgmTKRN4CAAjdHIKCCJK0BJ2Xe2XRjV I1Bam2lv9yxVsCf12PiM4OMMslL5bCkS2p+xblBetZzHBJGXwKhnVbu64rMeuWA2++du PD/Sf0O9O81DhfCA6eK3Y45k6hw1/UWXf2sG9+jCt0mCjWJir5g0ntcl/nEtKzRfpevB UgeftZ5PJ0Jcs6KEHk97pR9BTKz2/E1BEqYiwWbZqC80M74rX2ae/BlNC3fdP61EkoUB PUW18tmWr3Ee6D0E5ABO/tlLW7rwUI+6FfcBPdPCU5/Mh6Hwns5DvbqmfqaaFyRBX3HT 4fmg== X-Forwarded-Encrypted: i=1; AKwUvBy5sNIHo0S/L7c4htD0ynx3v0wel5V6ujE6l+fF4kSaaZRbRYLyMTTEmFydaYJZFtIYjF6xBiLSGFRhIbM=@vger.kernel.org X-Gm-Message-State: AFuF++niwGrvHkoQiaJlALjKIpXw3xGDtC0jZ1YcZDQe9pGRdgLx68dF aYxP2wGZqyOI/rsiioTEIwKu5g4D/zitMlx14bqzU/T40tUkNi3OG4xHsFPOy97u4I062vv/NpZ I8IuUmjAtpBsZqnT25AarVH6M4y7owaj8gP2/rAtIy3kSTLKgwqAKNJxVZHe9/J1lvLOGM4COAt o= X-Gm-Gg: AYBFou3uCHPZaBy1DiuIXdJHzf3SXC5Uue40Yh7s7DUBMSNndMffPKrvlRfycX9oUFM s5rTnWh28CAIiIH37blgSVGksNG2N+lWvFeHIF6ySsoHaZumo0sb/kIGFnC6Eo/WfsK0I1XDGd+ ZpUv7lA5WuyQK2GgQuEJJGnek5j9YjiVG9mcLDWP3vThf5V1ssSVa0c7mx8UfB0iN8vo4F2llqh w17ksqAum849hWGxJvYrmLnXJwbRrOo+W0d9lFr9wVR3E9HK8u3ihYmzmDb/BJr+H4SV1paN59m eZxFFVVM8JBIXI9jqNJIbhc1JMANVnAYpjQ0fpbqqeGEkfqrm0Q5Jlj3s/1u1uogf9DAW1jGb4G GQJ3cqgy/8d+1YsAjkxWwY7f8CHWlFrc/xQ== X-Received: by 2002:a17:90b:3c48:b0:398:e436:384 with SMTP id 98e67ed59e1d1-39b260d335dmr50535963a91.1.1788930599618; Tue, 08 Sep 2026 22:09:59 -0700 (PDT) X-Received: by 2002:a17:90b:3c48:b0:398:e436:384 with SMTP id 98e67ed59e1d1-39b260d335dmr50535874a91.1.1788930598935; Tue, 08 Sep 2026 22:09:58 -0700 (PDT) Received: from hu-ptalari-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-338f7bad290sm11082833eec.14.2026.09.08.22.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 22:09:58 -0700 (PDT) From: Praveen Talari Date: Wed, 09 Sep 2026 10:39:41 +0530 Subject: [PATCH v2 1/3] dmaengine: qcom: gpi: trace: Add trace events header for Qualcomm GPI DMA Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260909-add-trace-support-gpio-v2-1-01f81739bb88@oss.qualcomm.com> References: <20260909-add-trace-support-gpio-v2-0-01f81739bb88@oss.qualcomm.com> In-Reply-To: <20260909-add-trace-support-gpio-v2-0-01f81739bb88@oss.qualcomm.com> To: konrad.dybcio@oss.qualcomm.com, Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Vinod Koul , Frank Li Cc: chandana.chiluveru@oss.qualcomm.com, mukesh.savaliya@oss.qualcomm.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Praveen Talari X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788930590; l=10756; i=praveen.talari@oss.qualcomm.com; s=20251114; h=from:subject:message-id; bh=dZwjR73TiTPbLIt1okXWyFpe7GP6ItOia1YqprNwiRk=; b=/C13ajnz22mgdvaDbBShAW4sNCIIalELI/x3po0iM31hTNhhRPm3LJ2IhCMFbN/rNwHiqbhZJ bmZitACLVC6BaEaMemLffRkTXE0TdDdnMyG3tCG8radGWdjOzQwwa0Q X-Developer-Key: i=praveen.talari@oss.qualcomm.com; a=ed25519; pk=NGK/88fjyHXgfhIKwag7+uIytOmyOypvZ/hDFaYPEss= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA1NiBTYWx0ZWRfX9WsL9gCZGOOt OoEu+iMo+lRoYYd/eeFcuCVI5FCRI3WShqePmRaE4adCwC1x4FqT5SJHIJcVyFJ3A+LP5xzmjnM tDWRMfJ6jpwnvnhASv6pSRknlOCBYK+WcE2TOlmHFBPIpcgVowZiyKSZ0/yIZ1UBRwmZpVCL8Ys NIFmCdxdYS0t7913UVSNXS+eoP6PLulN5gqbr/4VABbWB5yQfdfHPn+Npr8T69tEEsIB8pvugAq Pew9Dr5K3ctpHajyv5wyKa4UrWmDxEij3I4lgRAv+sIywwcMxRuPYBWvQT/6v2XyRApJBXYbzv2 AbDXyXS6jT9EjgN0/+lxqiP5Dk5o+m7NhoURtOsHPduFW/yLOqNztixiRb/VHGqeWn8QMhHNudc q+ukoevNGK0JtjcvcGp2s3dOxRXKMoweuGMVRhTumD4wjOD3rxQXmplqvDFMp4+Ud8Lo2M9UP3Z zvYyyIRp+fQyxeXVWDg== X-Authority-Analysis: v=2.4 cv=N+AZ0W9B c=1 sm=1 tr=0 ts=6aa0ea28 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=E82JpRapckMa8tCxcIoA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-ORIG-GUID: p2YapxhCFxLSFTgd-PnWllburVb9_VNw X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA1NiBTYWx0ZWRfXxcGdZ5N0Wk2t a8bstEqhsGdDVt339/BPml6z+1GJ7qTxnvWH5eaNjDDQvZ9drAAji2yXOJkZSV9bR7AUoKZQM6x AI7vlAkEVNHzZUdpjWvdAQFbw8HdT2c= X-Proofpoint-GUID: p2YapxhCFxLSFTgd-PnWllburVb9_VNw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 impostorscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090056 Add a tracepoint header for the Qualcomm GPI DMA engine driver. The events defined here cover channel/event command dispatch, IRQ type handling, channel/event control state transitions, error IRQ status, completion event processing (including the no-pending- descriptor and transfer result paths), per-event processing in the event ring, ring allocation/programming details, already-in-state checks for pause/resume, and TRE queuing and contents. Together they give full runtime visibility into GPI DMA behavior in place of the driver's former dev_dbg() based debug logging. Signed-off-by: Praveen Talari --- include/trace/events/qcom_gpi.h | 313 ++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 313 insertions(+) diff --git a/include/trace/events/qcom_gpi.h b/include/trace/events/qcom_gp= i.h new file mode 100644 index 000000000000..241d76855ac8 --- /dev/null +++ b/include/trace/events/qcom_gpi.h @@ -0,0 +1,313 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM qcom_gpi + +#if !defined(_TRACE_QCOM_GPI_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_QCOM_GPI_H + +#include + +TRACE_EVENT(gpi_send_cmd, + TP_PROTO(struct device *dev, u32 chid, u32 cmd, const char *cmd_str), + TP_ARGS(dev, chid, cmd, cmd_str), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __string(cmd_str, cmd_str) + __field(u32, chid) + __field(u32, cmd) + ), + + TP_fast_assign(__assign_str(name); + __assign_str(cmd_str); + __entry->chid =3D chid; + __entry->cmd =3D cmd; + ), + + TP_printk("%s: chid=3D%u cmd=3D%s(%u)", + __get_str(name), __entry->chid, __get_str(cmd_str), + __entry->cmd) +); + +TRACE_EVENT(gpi_irq_status, + TP_PROTO(struct device *dev, u32 gpii_id, u32 irq_type), + TP_ARGS(dev, gpii_id, irq_type), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, gpii_id) + __field(u32, irq_type) + ), + + TP_fast_assign(__assign_str(name); + __entry->gpii_id =3D gpii_id; + __entry->irq_type =3D irq_type; + ), + + TP_printk("%s: gpii=3D%u irq_type=3D0x%08x", + __get_str(name), __entry->gpii_id, __entry->irq_type) +); + +TRACE_EVENT(gpi_ch_ctrl_irq, + TP_PROTO(struct device *dev, u32 chid, u32 ch_state), + TP_ARGS(dev, chid, ch_state), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __field(u32, ch_state) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + __entry->ch_state =3D ch_state; + ), + + TP_printk("%s: chid=3D%u ch_state=3D%u", + __get_str(name), __entry->chid, __entry->ch_state) +); + +TRACE_EVENT(gpi_ev_process, + TP_PROTO(struct device *dev, u32 chid, u32 ev_type, u8 code, + u16 status, u32 length), + TP_ARGS(dev, chid, ev_type, code, status, length), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __field(u32, ev_type) + __field(u32, length) + __field(u16, status) + __field(u8, code) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + __entry->ev_type =3D ev_type; + __entry->code =3D code; + __entry->status =3D status; + __entry->length =3D length; + ), + + TP_printk("%s: chid=3D%u ev_type=3D0x%02x code=3D%u status=3D%u lengt= h=3D%u", + __get_str(name), __entry->chid, __entry->ev_type, + __entry->code, __entry->status, __entry->length) +); + +TRACE_EVENT(gpi_queue_xfer, + TP_PROTO(struct device *dev, u32 chid, u32 num_tre), + TP_ARGS(dev, chid, num_tre), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __field(u32, num_tre) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + __entry->num_tre =3D num_tre; + ), + + TP_printk("%s: chid=3D%u num_tre=3D%u", + __get_str(name), __entry->chid, __entry->num_tre) +); + +TRACE_EVENT(gpi_gen_err_irq, + TP_PROTO(struct device *dev, u32 gpii_id, u32 irq_stts), + TP_ARGS(dev, gpii_id, irq_stts), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, gpii_id) + __field(u32, irq_stts) + ), + + TP_fast_assign(__assign_str(name); + __entry->gpii_id =3D gpii_id; + __entry->irq_stts =3D irq_stts; + ), + + TP_printk("%s: gpii=3D%u irq_stts=3D0x%08x", + __get_str(name), __entry->gpii_id, __entry->irq_stts) +); + +TRACE_EVENT(gpi_ev_ctrl_irq, + TP_PROTO(struct device *dev, u32 gpii_id, u32 ev_ch_irq, u32 ev_state= ), + TP_ARGS(dev, gpii_id, ev_ch_irq, ev_state), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, gpii_id) + __field(u32, ev_ch_irq) + __field(u32, ev_state) + ), + + TP_fast_assign(__assign_str(name); + __entry->gpii_id =3D gpii_id; + __entry->ev_ch_irq =3D ev_ch_irq; + __entry->ev_state =3D ev_state; + ), + + TP_printk("%s: gpii=3D%u ev_ch_irq=3D0x%08x ev_state=3D%u", + __get_str(name), __entry->gpii_id, __entry->ev_ch_irq, + __entry->ev_state) +); + +TRACE_EVENT(gpi_ev_no_desc, + TP_PROTO(struct device *dev, u32 chid, const u32 *ev_dword, + const u32 *tre_dword), + TP_ARGS(dev, chid, ev_dword, tre_dword), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __array(u32, ev_dword, 4) + __array(u32, tre_dword, 4) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + memcpy(__entry->ev_dword, ev_dword, sizeof(__entry->ev_dword)); + memcpy(__entry->tre_dword, tre_dword, sizeof(__entry->tre_dword)); + ), + + TP_printk("%s: chid=3D%u event=3D%08x:%08x:%08x:%08x pending_tre=3D%0= 8x:%08x:%08x:%08x", + __get_str(name), __entry->chid, + __entry->ev_dword[0], __entry->ev_dword[1], + __entry->ev_dword[2], __entry->ev_dword[3], + __entry->tre_dword[0], __entry->tre_dword[1], + __entry->tre_dword[2], __entry->tre_dword[3]) +); + +TRACE_EVENT(gpi_xfer_result, + TP_PROTO(struct device *dev, u32 chid, int result, u32 residue), + TP_ARGS(dev, chid, result, residue), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __field(int, result) + __field(u32, residue) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + __entry->result =3D result; + __entry->residue =3D residue; + ), + + TP_printk("%s: chid=3D%u result=3D%d residue=3D%u", + __get_str(name), __entry->chid, __entry->result, + __entry->residue) +); + +TRACE_EVENT(gpi_process_event, + TP_PROTO(struct device *dev, u32 chid, u32 type, const u32 *dword), + TP_ARGS(dev, chid, type, dword), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __field(u32, type) + __array(u32, dword, 4) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + __entry->type =3D type; + memcpy(__entry->dword, dword, sizeof(__entry->dword)); + ), + + TP_printk("%s: chid=3D%u type=3D0x%02x %08x:%08x:%08x:%08x", + __get_str(name), __entry->chid, __entry->type, + __entry->dword[0], __entry->dword[1], + __entry->dword[2], __entry->dword[3]) +); + +TRACE_EVENT(gpi_alloc_ring, + TP_PROTO(struct device *dev, u32 elements, u32 el_size, + u32 req_len, u64 len, size_t alloc_size), + TP_ARGS(dev, elements, el_size, req_len, len, alloc_size), + + TP_STRUCT__entry(__field(u64, len) + __field(size_t, alloc_size) + __string(name, dev_name(dev)) + __field(u32, elements) + __field(u32, el_size) + __field(u32, req_len) + ), + + TP_fast_assign(__assign_str(name); + __entry->elements =3D elements; + __entry->el_size =3D el_size; + __entry->req_len =3D req_len; + __entry->len =3D len; + __entry->alloc_size =3D alloc_size; + ), + + TP_printk("%s: elements=3D%u el_size=3D%u req_len=3D%u len=3D%llu all= oc_size=3D%zu", + __get_str(name), __entry->elements, __entry->el_size, + __entry->req_len, __entry->len, __entry->alloc_size) +); + +TRACE_EVENT(gpi_ring_info, + TP_PROTO(struct device *dev, dma_addr_t dma_handle, phys_addr_t phys_= addr, + u32 len, u32 el_size, u32 elements), + TP_ARGS(dev, dma_handle, phys_addr, len, el_size, elements), + + TP_STRUCT__entry(__field(u64, dma_handle) + __field(u64, phys_addr) + __string(name, dev_name(dev)) + __field(u32, len) + __field(u32, el_size) + __field(u32, elements) + ), + + TP_fast_assign(__assign_str(name); + __entry->dma_handle =3D dma_handle; + __entry->phys_addr =3D phys_addr; + __entry->len =3D len; + __entry->el_size =3D el_size; + __entry->elements =3D elements; + ), + + TP_printk("%s: dma_handle=3D%llx phys_addr=3D%llx len=3D%u el_size=3D= %u elements=3D%u", + __get_str(name), __entry->dma_handle, __entry->phys_addr, + __entry->len, __entry->el_size, __entry->elements) +); + +TRACE_EVENT(gpi_already_state, + TP_PROTO(struct device *dev, u32 gpii_id, u32 pm_state), + TP_ARGS(dev, gpii_id, pm_state), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, gpii_id) + __field(u32, pm_state) + ), + + TP_fast_assign(__assign_str(name); + __entry->gpii_id =3D gpii_id; + __entry->pm_state =3D pm_state; + ), + + TP_printk("%s: gpii=3D%u already in pm_state=3D%u", + __get_str(name), __entry->gpii_id, __entry->pm_state) +); + +TRACE_EVENT(gpi_tre, + TP_PROTO(struct device *dev, u32 chid, u32 idx, const u32 *dword), + TP_ARGS(dev, chid, idx, dword), + + TP_STRUCT__entry(__string(name, dev_name(dev)) + __field(u32, chid) + __field(u32, idx) + __array(u32, dword, 4) + ), + + TP_fast_assign(__assign_str(name); + __entry->chid =3D chid; + __entry->idx =3D idx; + memcpy(__entry->dword, dword, sizeof(__entry->dword)); + ), + + TP_printk("%s: chid=3D%u tre[%u]=3D%08x:%08x:%08x:%08x", + __get_str(name), __entry->chid, __entry->idx, + __entry->dword[0], __entry->dword[1], + __entry->dword[2], __entry->dword[3]) +); + +#endif /* _TRACE_QCOM_GPI_H */ + +/* This part must be outside protection */ +#include --=20 2.34.1 From nobody Fri Sep 25 20:02:45 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1F80352034 for ; Wed, 9 Sep 2026 05:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788930607; cv=none; b=Zs87iBCFn+Qzh8+z5kHSyDYwM+n/GN9HKSZvyET+tHVh1UTQUFneZQ1L/h+n/66QQUyrftXCtbXgqStEE1qr/5xunvuOoqynNVbTIUBXVYVKlWDWHk8eU7tajxixM1h3oJXWvv0VGfzFK7jEb98UTC2guZwVuEcoqkg/yag16NQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788930607; c=relaxed/simple; bh=Z6l42kmbZIdLCp5HS8lQr0U0ximrV+BKEFCMLwjPxeM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ps/hKhpvSPdPtOgNh3gX6Kw+Hb9KYL1ylyi14zzVsWmq+gki31T1PznOYHwBhVS2dm9aTax8SDP43j2lo4165Wtgq+G0tAzktdqzG/pOGV8AKwwFmcZmb08nQi76KgOmCbFZAAPr+CHgsBYHzUl2ytUtcB0MWroe742DXBp5PYw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=K18kkAmi; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kKA+mNaJ; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="K18kkAmi"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kKA+mNaJ" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6893p1vg3771250 for ; Wed, 9 Sep 2026 05:10:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= VHqBJxd6rqKL88lhmyF6Ow7x7erHmkPvtp2e7XDc4gg=; b=K18kkAmif3x1TjjK uJObuExx6LB+gE1we25xFO0WdKAUf4IVEzTENFu52Jb1MsyCSM44DY7TYy+6G9zJ 9at74JJaH828qzvRnmzoGR3ykcz0RmOOpsmzv5cpenEjj21qmTVHsuDvte7VCHZv IVxLcv4yWgl+VpKA2J/lHj9ivAnhfnRoJAVEwrAHU7yrVHfVrhmpglxNMkeHW89k g/DA20UhVjg2x6aPEk6K8pU2aeGRwCeEKdjcULN3UPmKlO8Z3ysaRmYQEstHrZzN /Qgtk89c3vcq+YvcWaAxooZ2wtf07oUhhR/w67frXKVihz+KjOixto3jKQgvCKUA xJHI2A== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjywr07k1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 05:10:04 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2db3d832827so41691725ad.2 for ; Tue, 08 Sep 2026 22:10:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788930604; x=1789535404; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VHqBJxd6rqKL88lhmyF6Ow7x7erHmkPvtp2e7XDc4gg=; b=kKA+mNaJflHRdUzDe8XWOftUWh/MIj6lmwUo4y9iQVCdfy+Jzm20faVdeiCOMlunYW j0DBfaJ4mxQbGTMQ+QgEwbZkqhF8ipiRaWpw23utMBIDCex/nANjuizN+xY26OBfHhT4 mq+6LZTwUvhAQizqg0QwypYABHbQWlg75cxRQ4gH0zDaB/DHXkg6q+7JFORr3OGnXfTu WB4fBkYJvyBjmLQUdaKzNMTArAWi5u1YVH/CJJrw/ltW8/T52fFQbOzihQr9lsISexJo wUK7ZNAapsUXvBkrIa0wiyScPc8Sza782ceWxpEw2cYEpfbjJEAPu0ituKsMn6ll0xr5 sQ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788930604; x=1789535404; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VHqBJxd6rqKL88lhmyF6Ow7x7erHmkPvtp2e7XDc4gg=; b=nfaEdGjauw20pPXPTu8Xc1b++yBO5RCctdrhDvxwKnO369+DgcnrTh+XK2mzOhiz6F KTocGeLhqKU3KPEFcgqjAa5cCyGPNxP1xbnEYMWHG43WN5uGWShDG36L/g/ak6K84xOs qOqkB0m1zQj44fss8TSb3iBqGzQUfZ3h65IG73F0a4NR40okzdvrCVdNWWpLcgWB71RJ b3yeLBsS5E3WqAWhn4iCnDqb07yIIQvcgZ7K4GxyCoTRR2rRG6eNuhZUwBGRgwvUIKpj gvQmul6+gZ5w3rzpTJbXrL6yYsDTHtMkKpLIcQWZgp1ae1KRO5aH3bWF7aQMHekxakkZ PRlg== X-Forwarded-Encrypted: i=1; AKwUvBwf3EzfsQ8/iYzkn1mRpsfwGRlD/HowaA2D0hVNbb3N89yFmmm/BXVRFyxXpBgP1wMoYdHMbjBg6L1Kj8M=@vger.kernel.org X-Gm-Message-State: AFuF++lcXmvUJlKucqSa2n37sJWoHSf5jeFjwwJn1MWvY3XsvZ6bqoKp iNz2f+eKcSeB00nH1kKx8Zsede96TvQl7bA80dWWm1q7AKqZYXp3cFi/OOA/gNMU/cna7pV64ui UmgsepWmembQuYOxExuxZ5Enlt5bzg0PqxgGKWBKEwwm6hzPHBZ8rIoD6/1RG1qzx3bM= X-Gm-Gg: AYBFou02s/adShR1sUZBMlgJblg7TPpSIO7oQjxxP7FaTfAF0oOd1TiaDhZ89Qm5NbX 3iske+3qj4Rd8euQvylzEFVUUBX1w05uQxuidGbj9s/wid21Gj8XSC0F/jSN4AbYkRrW/F1X8qe hfpGu6mflv/827tAgvp/g9LD4CSodIXGgjfDzDjpQqC+znmQfWdwx1ExhDhCk7sZPtzGAdjhEge yS/5pPbfJ1KbWQ2xFh5kbdlJn096Vf30RayjJ+9mzwqU2ZOtbWcGciCvbpbjK8f/QX2Rzp/gsgv QxGDPwQlp7/+Nnb9DHCHgNNI3dzWaYOMrMCA1Y131pAlW3w7Nv2aq7PBitOXueVJOSQnKruxzOA mF78rwA6DxI4DXStLfaPDolBoVBG69V+nHw== X-Received: by 2002:a17:90b:4c51:b0:38e:57a3:f218 with SMTP id 98e67ed59e1d1-39b26204e5bmr46023237a91.13.1788930603987; Tue, 08 Sep 2026 22:10:03 -0700 (PDT) X-Received: by 2002:a17:90b:4c51:b0:38e:57a3:f218 with SMTP id 98e67ed59e1d1-39b26204e5bmr46023202a91.13.1788930603460; Tue, 08 Sep 2026 22:10:03 -0700 (PDT) Received: from hu-ptalari-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-338f7bad290sm11082833eec.14.2026.09.08.22.09.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 22:10:03 -0700 (PDT) From: Praveen Talari Date: Wed, 09 Sep 2026 10:39:42 +0530 Subject: [PATCH v2 2/3] dmaengine: qcom: gpi: Add trace event support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260909-add-trace-support-gpio-v2-2-01f81739bb88@oss.qualcomm.com> References: <20260909-add-trace-support-gpio-v2-0-01f81739bb88@oss.qualcomm.com> In-Reply-To: <20260909-add-trace-support-gpio-v2-0-01f81739bb88@oss.qualcomm.com> To: konrad.dybcio@oss.qualcomm.com, Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Vinod Koul , Frank Li Cc: chandana.chiluveru@oss.qualcomm.com, mukesh.savaliya@oss.qualcomm.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Praveen Talari X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788930590; l=3171; i=praveen.talari@oss.qualcomm.com; s=20251114; h=from:subject:message-id; bh=Z6l42kmbZIdLCp5HS8lQr0U0ximrV+BKEFCMLwjPxeM=; b=a+84aITZZeq5C0RC92obMoyCfcKCmGzAhKOA9KCHsw6rACt4jMGB9JuiD4f88JdjzLo/6cVrU s7f3Ek7nL32A1+19YDhjQ4AIKAWPVmYW1EyasXKpuf65vFAbstiPmfr X-Developer-Key: i=praveen.talari@oss.qualcomm.com; a=ed25519; pk=NGK/88fjyHXgfhIKwag7+uIytOmyOypvZ/hDFaYPEss= X-Authority-Analysis: v=2.4 cv=a4YAM0SF c=1 sm=1 tr=0 ts=6aa0ea2c cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=vNIMIT6v7fynGdS8nZ4A:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA1NiBTYWx0ZWRfX7nv4u1CjcYP/ isIElvYxVZAFP2ZdcWjwbm1tTCtxe0akGPgdLyuHGndQjsxtca3XsXeQzhdUZwFaP74C5WGSWNo j//uQUcB/Kc9pz0Bb8RJLBaN0GXUZ9w4lpstWtNPPbjmrPqYEC41fyb9rZ7urK3z1lyxi5POQLZ T5/HWEKddd3zkIZ6PsGBDXUDnPwBtKojIGn3As2sJtxn0dfGsQv0ryRyGPIz7zPsMAFIRM2fh0K xcVvfxEJI0Iy0uzxgf+q+uazvrbAqiN6DlH+F3p5WsQmb0eoHFNXcwR0EdE0iwPkIcbYMuGtXI6 E3/ICYyn1CWLbiu3ZWgPX07kgFvlbLsb8GX3aC8CI4jG17AHn2NMl4Enn57Rvd7h3HZkiqBeHE/ YSqWIDJOM6p2CHX7JmxaTfzNX3ux3Or6Bq4OGl+TkbU7Kx9e2RJGlhV02oo/WMO1Y3lBifxE2om 1ubwIxSajitn+a3Rutg== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA1NiBTYWx0ZWRfX8hctZbVkgN8F m0fALh93SXXU1jiRGDLsPoiNU2hj1ZW8iU7MvC7r95FKYbJwXbPb0JemYLkpPLkIwJL4lMMS3sN pBKreTqVptrzFkhCI2og9B74yQ4E8C4= X-Proofpoint-ORIG-GUID: C8c8TpiX6m0lxxNJ3PKBJ1tfRyNjLfcN X-Proofpoint-GUID: C8c8TpiX6m0lxxNJ3PKBJ1tfRyNjLfcN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 spamscore=0 adultscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090056 Wire up the qcom_gpi tracepoints into the GPI DMA engine driver to provide runtime visibility into driver behavior without requiring invasive debug patches. Tracepoints are added at the same points as their existing dev_dbg() counterparts: channel/event command dispatch in gpi_send_cmd(), top-level interrupt type in gpi_handle_irq(), channel state transitions in gpi_process_ch_ctrl_irq(), completion event handling in gpi_process_xfer_compl_event() and gpi_process_imed_data_event(), and TRE queuing in gpi_issue_pending(). Signed-off-by: Praveen Talari --- drivers/dma/qcom/gpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index a5055a6273af..b09354a73b46 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -17,6 +17,9 @@ #include "../dmaengine.h" #include "../virt-dma.h" =20 +#define CREATE_TRACE_POINTS +#include + #define TRE_TYPE_DMA 0x10 #define TRE_TYPE_IMMEDIATE_DMA 0x11 #define TRE_TYPE_GO 0x20 @@ -683,6 +686,7 @@ static int gpi_send_cmd(struct gpii *gpii, struct gchan= *gchan, =20 dev_dbg(gpii->gpi_dev->dev, "sending cmd: %s:%u\n", TO_GPI_CMD_STR(gpi_cmd), chid); + trace_gpi_send_cmd(gpii->gpi_dev->dev, chid, gpi_cmd, TO_GPI_CMD_STR(gpi_= cmd)); =20 /* send opcode and wait for completion */ reinit_completion(&gpii->cmd_completion); @@ -773,6 +777,7 @@ static void gpi_process_ch_ctrl_irq(struct gpii *gpii) if (gpii->gpi_cmd =3D=3D GPI_CH_CMD_DE_ALLOC) state =3D DEFAULT_CH_STATE; gchan->ch_state =3D state; + trace_gpi_ch_ctrl_irq(gpii->gpi_dev->dev, chid, gchan->ch_state); =20 /* * Triggering complete all if ch_state is not a stop in process. @@ -841,6 +846,7 @@ static irqreturn_t gpi_handle_irq(int irq, void *data) =20 offset =3D GPII_n_CNTXT_TYPE_IRQ_OFFS(gpii->gpii_id); type =3D gpi_read_reg(gpii, gpii->regs + offset); + trace_gpi_irq_status(gpii->gpi_dev->dev, gpii_id, type); =20 do { /* global gpii error */ @@ -968,6 +974,8 @@ static void gpi_process_imed_data_event(struct gchan *g= chan, smp_wmb(); =20 chid =3D imed_event->chid; + trace_gpi_ev_process(gpii->gpi_dev->dev, chid, IMMEDIATE_DATA_EV_TYPE, + imed_event->code, imed_event->status, imed_event->length); if (imed_event->code =3D=3D MSM_GPI_TCE_EOT && gpii->ieob_set) { if (chid =3D=3D GPI_RX_CHAN) goto gpi_free_desc; @@ -1043,6 +1051,8 @@ static void gpi_process_xfer_compl_event(struct gchan= *gchan, smp_wmb(); =20 chid =3D compl_event->chid; + trace_gpi_ev_process(gpii->gpi_dev->dev, chid, XFER_COMPLETE_EV_TYPE, + compl_event->code, compl_event->status, compl_event->length); if (compl_event->code =3D=3D MSM_GPI_TCE_EOT && gpii->ieob_set) { if (chid =3D=3D GPI_RX_CHAN) goto gpi_free_desc; @@ -1887,6 +1897,7 @@ static void gpi_issue_pending(struct dma_chan *chan) } =20 gpi_desc =3D to_gpi_desc(vd); + trace_gpi_queue_xfer(gpii->gpi_dev->dev, gchan->chid, gpi_desc->num_tre); for (i =3D 0; i < gpi_desc->num_tre; i++) { tre =3D &gpi_desc->tre[i]; gpi_queue_xfer(gpii, gchan, tre, &wp); --=20 2.34.1 From nobody Fri Sep 25 20:02:45 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C85A3546E9 for ; Wed, 9 Sep 2026 05:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788930611; cv=none; b=ikpgqKiWE3fxlXbIpIMaM0mcBwEC9Itzwp2EvZ6OKGqgw2zBMRuinGr9C+0IPY4U2LDePfE7Yj15Q3zxb0OXOxUMkcg8fqubCrYgaarpLgHzpHRhntzjMu3xSA+yJSMxW5+dk0zK+0HqalVpGUYr4yeaHW34X1j2uN3VKjuc984= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788930611; c=relaxed/simple; bh=g8lTclxGhOqcW7CZT8rYnXsAoNxsoFJn/wn4jG/TwCc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TFYEn4K/XJcSbkeSHTLYUJSTs9NCIt07bG4reBqy8QT5/NQFzD0rCCoS0GuLqz0X+YiVIyEDgoLTOhtX7lPW7B+d+sPuUuEiyNHiqG6Awk0bnQgJ+zYT7eSQpCZSiE1SDnUcdnKj30ExK2Rhu/kJnKWi7JI+bP0d56/7mL5WKtk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=paOT+6WP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=fwBr2ATw; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="paOT+6WP"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="fwBr2ATw" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6892U20l639125 for ; Wed, 9 Sep 2026 05:10:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ut6uHPVnRZtHbF7GE08rnRaLAQ7S+8eEO2cEaVL+cVE=; b=paOT+6WPk1VHHOTy oiinnobbBnCN5ELec1xQZwolYuGfJIMYcbc7cwdqIcOq7TXXelYr2vfMXeYTgUUL kBFihqhT03u8BJdY1jBPAMO15Td/fg7k0LREQmj5g2yICr6uMAk0EEu1fPmBVVGL RcYsKCHntdlGpUPXFn27VGVlhMpDsStNtZQvdl5N/B+x/6M6ehZPT6O4UYOldlLC qP6a77cE9ediJTKaelZTlhTmird9Yazt/4hc74dAWq8HSch35ns2jHu/rkONqZZN Q8iO0z6jL3xOKh+gztIbOZ14W+Mky0z/ZGAiAH3TNznCoJ5BTqwCfsmPyMsKvFa9 uPWFJA== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjxqj8g33-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 05:10:09 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-38e54b6556aso2747364a91.2 for ; Tue, 08 Sep 2026 22:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788930609; x=1789535409; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ut6uHPVnRZtHbF7GE08rnRaLAQ7S+8eEO2cEaVL+cVE=; b=fwBr2ATw2rm7JIp2ZinPxiER4Burk35ID2AVfr1C8TCT5pbVDK8lyVYGkX8nfbvfhN whZs3pLaHNWetOqyu2zxQHqWyOmcKvryVUb0VpoRcuCdcnP16EabAfqnH2rn378UdNu0 1M20As1OnHDYhARKLENe+hvuduJo0xrormdaut5xC4jisdaGlpderbKsLDhNNqgteHWP qkXRwYDyrAvGtCb6IYbjLMdJseL+RJDQGTJvtWyG3oLylJhb3kRljVq8j3MIbYeESs4Y VFSS3Ld+V/T7Ew1pJa/GWpxyc/4B7tHwBZ/cdy8to/tjMzQp1JMYwooDdFEOQfoA+17E Aoww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788930609; x=1789535409; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ut6uHPVnRZtHbF7GE08rnRaLAQ7S+8eEO2cEaVL+cVE=; b=MJhxxHSTlA3wKqn7eCr/eglQh9sUol8cwrkKg2inKjYwMbyS7I2SikL1qZhJP9t68e 2sLoxGv4lcluMWhj6lyT41ISt1B5yusydk2EESRfHjMCsY3VwDqxUuTziLrky0Y6BxJ8 +ej80YJJ8BxGnvs5zSKpZm6kC6AaBTuLGzqL1AxiXqZIdrXvvf/ipLbulcXVJtgTuvl1 pY5CEECEdmg0pogXCBmYIibnDeeN8EGMyCMVy1xbh1Ru272F+o6Uhjrb1kuNQdH06RzY XbBsUXg9BHmRhCe8X4xW/vMLwCh3qm4zjNn/yCoT9QIukg2PgMJ8VPFZv1ZsrZQGKOrW ReTg== X-Forwarded-Encrypted: i=1; AKwUvBz4tbamnYrQZX3WsnvVmG8wj0hF9gNTWzrLnv8CfdQJ36BksJ99Q/BQUZ85Jf+FB14ipE3XsxFHU9TSqPE=@vger.kernel.org X-Gm-Message-State: AFuF++khLFh5R8PiBhENsu536+8bFH8izDmzh6EQ5uqIkytZoPYGS0gV UdpDAEQIa80mna6FOzwEx3BrRpHqbOBrX7x56nZLFMCb0gYwxGwetfz7oPhYgXwtlzh673aCK+g 1NoX+gnfME9zB7n3LNbV8U5T37DNvI1cFI//DOHER01dvecwn1xEnZP+S+idywHYHYCM= X-Gm-Gg: AYBFou2mY6Nw3sMh/XiETu3cHNosl+4thPvZwl2uQ3HH5weikAn1kSuWdWPAe27NDTs MKJPfF/1c05Y+tLkaSf+qJp1W09Ueui7w7MHbygyL4Hk1p9L1vV2l8qfgoiSvuJLE7No3m+fEVA rmD1RJE4x2k82cGD3BGMdwMwP9qYebZ8frC05ETd6klfCFmFwXJb24cIus/lTQ2m1+qEmMDkBQe 4MgcoQ7bd2aQIxNM4DNh96iwbcQCQh4/qRgBX27ZG5WVozZxNTT1O9prIbtSAhZMERRCqf9V8tL ThQFBmcahnpXjyWu/mb3OHeQjaz5nts+bG6HJzq0UH1amwn1lxh7fOMEcbI1/3X075/CSe2LGYu af7wvSNxjG4v0YG3PZTpFfJ8Fu9tzjH4UWA== X-Received: by 2002:a17:90b:3b8d:b0:398:b426:ca4b with SMTP id 98e67ed59e1d1-39b2624f10amr48280043a91.22.1788930608518; Tue, 08 Sep 2026 22:10:08 -0700 (PDT) X-Received: by 2002:a17:90b:3b8d:b0:398:b426:ca4b with SMTP id 98e67ed59e1d1-39b2624f10amr48279961a91.22.1788930607861; Tue, 08 Sep 2026 22:10:07 -0700 (PDT) Received: from hu-ptalari-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-338f7bad290sm11082833eec.14.2026.09.08.22.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 22:10:07 -0700 (PDT) From: Praveen Talari Date: Wed, 09 Sep 2026 10:39:43 +0530 Subject: [PATCH v2 3/3] dmaengine: qcom: gpi: Convert dev_dbg() calls to tracepoints Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260909-add-trace-support-gpio-v2-3-01f81739bb88@oss.qualcomm.com> References: <20260909-add-trace-support-gpio-v2-0-01f81739bb88@oss.qualcomm.com> In-Reply-To: <20260909-add-trace-support-gpio-v2-0-01f81739bb88@oss.qualcomm.com> To: konrad.dybcio@oss.qualcomm.com, Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Vinod Koul , Frank Li Cc: chandana.chiluveru@oss.qualcomm.com, mukesh.savaliya@oss.qualcomm.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Praveen Talari X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788930590; l=8161; i=praveen.talari@oss.qualcomm.com; s=20251114; h=from:subject:message-id; bh=g8lTclxGhOqcW7CZT8rYnXsAoNxsoFJn/wn4jG/TwCc=; b=KMAY/q7s2DO7opzeXAOweCApCdi/eaakZlXPEVuHb99p1p3J24VoxvMMNpZJ7h1Ohk4p8tjO9 nb+pqT4D3Z5CQ1NCtb8x/hmMguDItXaK4tvtQqorQjdqg6YmOiE5Yrc X-Developer-Key: i=praveen.talari@oss.qualcomm.com; a=ed25519; pk=NGK/88fjyHXgfhIKwag7+uIytOmyOypvZ/hDFaYPEss= X-Proofpoint-ORIG-GUID: tKKygKdd3Gw5px0FiqQK85VstifG6Rj- X-Proofpoint-GUID: tKKygKdd3Gw5px0FiqQK85VstifG6Rj- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA1NiBTYWx0ZWRfX94s4y7NUoWvd TW66NqFnSWDSEzao/kQiTNrjpTWHb+tXmOxQfU5wuVns9AGu5+m7Ne89ghQrdboCkXgAPVvOJAy 6ulxlsuqVByM9CLEnX4crwAgpXqjfJzt6WNWXuFxeBPNNvcBc3KxZ+frlekfWUKMBF5WyEncRhp hEFu4U27kGh4XgwvBLhXsITp9E+52Jl/Q1+anluQI1NBCR0aILTBAdeiHaRE673VwjpUOFj5Drh xpOfyMKDXVt6burPUmAxZEUR26xTefldRKPVlSS+2VAyeKChZZqXgQU4fFImqJ/8od5/3AJFCGq g5LA0V1hzSfjUY74ARS0k9WYslSI4FL8MuUT/PYJlZwiP7a69mds+MvFWn2qIrDLgiA6ldYssFj f6yinKJgBUwmlsjbanloN+nQQq9GDfGeMogD3pABAA5Dev1hL+nfzqN2vE/pylKcZlew0cIm+nt ndaz1m9iJM8Z+pC8M8A== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA1NiBTYWx0ZWRfX6eeO8FPtPSfg MKDL/l37fo9IJ49kMKBe4oSo5AC4MTloJ3zySzJ8aiJppECCnIcLPEot+Z+ZgVMq+73GRXEHOZk p2N8on7ZjKTE8kKtiU8ZsS+v3pzfVuk= X-Authority-Analysis: v=2.4 cv=f/p4wuyM c=1 sm=1 tr=0 ts=6aa0ea31 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=aSNI5RSwOxee8bqK_isA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 bulkscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090056 Replace the remaining dev_dbg() based debug logging in the GPI DMA driver with the qcom_gpi tracepoints, providing structured runtime visibility into GPI DMA behavior without requiring invasive debug patches. dev_err() calls are left untouched. Tracepoints are added at the same points as the dev_dbg() calls they replace: channel/event command dispatch in gpi_send_cmd(), error and top-level interrupt status in gpi_process_gen_err_irq() and gpi_handle_irq(), event/channel control state transitions in the IRQ handler and gpi_process_ch_ctrl_irq(), completion event handling (including the no-pending-descriptor and transfer result paths) in gpi_process_imed_data_event(), gpi_process_xfer_compl_event() and gpi_process_events(), ring allocation details in gpi_alloc_ring(), already-in-state checks in gpi_pause()/gpi_resume(), TRE contents in gpi_create_i2c_tre()/gpi_create_spi_tre(), and TRE queuing in gpi_issue_pending(). Signed-off-by: Praveen Talari --- drivers/dma/qcom/gpi.c | 58 ++++++++++++++--------------------------------= ---- 1 file changed, 16 insertions(+), 42 deletions(-) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index b09354a73b46..8e7d25a46147 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -684,8 +684,6 @@ static int gpi_send_cmd(struct gpii *gpii, struct gchan= *gchan, if (IS_CHAN_CMD(gpi_cmd)) chid =3D gchan->chid; =20 - dev_dbg(gpii->gpi_dev->dev, - "sending cmd: %s:%u\n", TO_GPI_CMD_STR(gpi_cmd), chid); trace_gpi_send_cmd(gpii->gpi_dev->dev, chid, gpi_cmd, TO_GPI_CMD_STR(gpi_= cmd)); =20 /* send opcode and wait for completion */ @@ -797,7 +795,7 @@ static void gpi_process_gen_err_irq(struct gpii *gpii) u32 irq_stts =3D gpi_read_reg(gpii, gpii->regs + offset); =20 /* clear the status */ - dev_dbg(gpii->gpi_dev->dev, "irq_stts:0x%x\n", irq_stts); + trace_gpi_gen_err_irq(gpii->gpi_dev->dev, gpii_id, irq_stts); =20 /* Clear the register */ offset =3D GPII_n_CNTXT_GPII_IRQ_CLR_OFFS(gpii_id); @@ -866,8 +864,6 @@ static irqreturn_t gpi_handle_irq(int irq, void *data) u32 ev_state; u32 ev_ch_irq; =20 - dev_dbg(gpii->gpi_dev->dev, - "processing EV CTRL interrupt\n"); offset =3D GPII_n_CNTXT_SRC_EV_CH_IRQ_OFFS(gpii_id); ev_ch_irq =3D gpi_read_reg(gpii, gpii->regs + offset); =20 @@ -887,15 +883,14 @@ static irqreturn_t gpi_handle_irq(int irq, void *data) ev_state =3D DEFAULT_EV_CH_STATE; =20 gpii->ev_state =3D ev_state; - dev_dbg(gpii->gpi_dev->dev, "setting EV state to %s\n", - TO_GPI_EV_STATE_STR(gpii->ev_state)); + trace_gpi_ev_ctrl_irq(gpii->gpi_dev->dev, gpii_id, ev_ch_irq, + gpii->ev_state); complete_all(&gpii->cmd_completion); type &=3D ~(GPII_n_CNTXT_TYPE_IRQ_MSK_EV_CTRL); } =20 /* channel control irq */ if (type & GPII_n_CNTXT_TYPE_IRQ_MSK_CH_CTRL) { - dev_dbg(gpii->gpi_dev->dev, "process CH CTRL interrupts\n"); gpi_process_ch_ctrl_irq(gpii); type &=3D ~(GPII_n_CNTXT_TYPE_IRQ_MSK_CH_CTRL); } @@ -945,17 +940,10 @@ static void gpi_process_imed_data_event(struct gchan = *gchan, struct gpi_tre *gpi_tre; =20 spin_unlock_irqrestore(&gchan->vc.lock, flags); - dev_dbg(gpii->gpi_dev->dev, "event without a pending descriptor!\n"); gpi_ere =3D (struct gpi_ere *)imed_event; - dev_dbg(gpii->gpi_dev->dev, - "Event: %08x %08x %08x %08x\n", - gpi_ere->dword[0], gpi_ere->dword[1], - gpi_ere->dword[2], gpi_ere->dword[3]); gpi_tre =3D tre; - dev_dbg(gpii->gpi_dev->dev, - "Pending TRE: %08x %08x %08x %08x\n", - gpi_tre->dword[0], gpi_tre->dword[1], - gpi_tre->dword[2], gpi_tre->dword[3]); + trace_gpi_ev_no_desc(gpii->gpi_dev->dev, imed_event->chid, + gpi_ere->dword, gpi_tre->dword); return; } gpi_desc =3D to_gpi_desc(vd); @@ -1064,11 +1052,10 @@ static void gpi_process_xfer_compl_event(struct gch= an *gchan, dev_err(gpii->gpi_dev->dev, "Error in Transaction\n"); result.result =3D DMA_TRANS_ABORTED; } else { - dev_dbg(gpii->gpi_dev->dev, "Transaction Success\n"); result.result =3D DMA_TRANS_NOERROR; } result.residue =3D gpi_desc->len - compl_event->length; - dev_dbg(gpii->gpi_dev->dev, "Residue %d\n", result.residue); + trace_gpi_xfer_result(gpii->gpi_dev->dev, chid, result.result, result.res= idue); =20 dma_cookie_complete(&vd->tx); dmaengine_desc_get_callback_invoke(&vd->tx, &result); @@ -1100,11 +1087,8 @@ static void gpi_process_events(struct gpii *gpii) chid =3D gpi_event->xfer_compl_event.chid; type =3D gpi_event->xfer_compl_event.type; =20 - dev_dbg(gpii->gpi_dev->dev, - "Event: CHID:%u, type:%x %08x %08x %08x %08x\n", - chid, type, gpi_event->gpi_ere.dword[0], - gpi_event->gpi_ere.dword[1], gpi_event->gpi_ere.dword[2], - gpi_event->gpi_ere.dword[3]); + trace_gpi_process_event(gpii->gpi_dev->dev, chid, type, + gpi_event->gpi_ere.dword); =20 switch (type) { case XFER_COMPLETE_EV_TYPE: @@ -1113,7 +1097,6 @@ static void gpi_process_events(struct gpii *gpii) &gpi_event->xfer_compl_event); break; case STALE_EV_TYPE: - dev_dbg(gpii->gpi_dev->dev, "stale event, not processing\n"); break; case IMMEDIATE_DATA_EV_TYPE: gchan =3D &gpii->gchan[chid]; @@ -1121,11 +1104,8 @@ static void gpi_process_events(struct gpii *gpii) &gpi_event->immediate_data_event); break; case QUP_NOTIF_EV_TYPE: - dev_dbg(gpii->gpi_dev->dev, "QUP_NOTIF_EV_TYPE\n"); break; default: - dev_dbg(gpii->gpi_dev->dev, - "not supported event type:0x%x\n", type); } gpi_ring_recycle_ev_element(ev_ring); } @@ -1409,10 +1389,8 @@ static int gpi_alloc_ring(struct gpi_ring *ring, u32= elements, bit++; len =3D 1 << bit; ring->alloc_size =3D (len + (len - 1)); - dev_dbg(gpii->gpi_dev->dev, - "#el:%u el_size:%u len:%u actual_len:%llu alloc_size:%zu\n", - elements, el_size, (elements * el_size), len, - ring->alloc_size); + trace_gpi_alloc_ring(gpii->gpi_dev->dev, elements, el_size, + (elements * el_size), len, ring->alloc_size); =20 ring->pre_aligned =3D dma_alloc_coherent(gpii->gpi_dev->dev, ring->alloc_size, @@ -1437,10 +1415,8 @@ static int gpi_alloc_ring(struct gpi_ring *ring, u32= elements, /* update to other cores */ smp_wmb(); =20 - dev_dbg(gpii->gpi_dev->dev, - "phy_pre:%pad phy_alig:%pa len:%u el_size:%u elements:%u\n", - &ring->dma_handle, &ring->phys_addr, ring->len, - ring->el_size, ring->elements); + trace_gpi_ring_info(gpii->gpi_dev->dev, ring->dma_handle, ring->phys_addr, + ring->len, ring->el_size, ring->elements); =20 return 0; } @@ -1542,7 +1518,7 @@ static int gpi_pause(struct dma_chan *chan) * client needs to call pause only once */ if (gpii->pm_state =3D=3D PAUSE_STATE) { - dev_dbg(gpii->gpi_dev->dev, "channel is already paused\n"); + trace_gpi_already_state(gpii->gpi_dev->dev, gpii->gpii_id, gpii->pm_stat= e); mutex_unlock(&gpii->ctrl_lock); return 0; } @@ -1578,7 +1554,7 @@ static int gpi_resume(struct dma_chan *chan) =20 mutex_lock(&gpii->ctrl_lock); if (gpii->pm_state =3D=3D ACTIVE_STATE) { - dev_dbg(gpii->gpi_dev->dev, "channel is already active\n"); + trace_gpi_already_state(gpii->gpi_dev->dev, gpii->gpii_id, gpii->pm_stat= e); mutex_unlock(&gpii->ctrl_lock); return 0; } @@ -1703,8 +1679,7 @@ static int gpi_create_i2c_tre(struct gchan *chan, str= uct gpi_desc *desc, } =20 for (i =3D 0; i < tre_idx; i++) - dev_dbg(dev, "TRE:%d %x:%x:%x:%x\n", i, desc->tre[i].dword[0], - desc->tre[i].dword[1], desc->tre[i].dword[2], desc->tre[i].dword[3]); + trace_gpi_tre(dev, chan->chid, i, desc->tre[i].dword); =20 return tre_idx; } @@ -1797,8 +1772,7 @@ static int gpi_create_spi_tre(struct gchan *chan, str= uct gpi_desc *desc, TRE_FLAGS_IEOT); =20 for (i =3D 0; i < tre_idx; i++) - dev_dbg(dev, "TRE:%d %x:%x:%x:%x\n", i, desc->tre[i].dword[0], - desc->tre[i].dword[1], desc->tre[i].dword[2], desc->tre[i].dword[3]); + trace_gpi_tre(dev, chan->chid, i, desc->tre[i].dword); =20 return tre_idx; } --=20 2.34.1