From nobody Sat Sep 26 14:39:03 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 5AB694F55A6 for ; Fri, 25 Sep 2026 20:51:51 +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=1790369513; cv=none; b=QQHa+sTIR9Flrse6RcE5qansFB4fhW8g04iza+u1KqNJFXB0hNf0tmDs/6Rq4JfZOfQoiFjdHD+USlDO0YU31cf/gEL5Q69JIYW16T0reYWIWVkQUIR8V12pBEh2Oez+kQJtloWllMo1ZrczDtE74nOCaV7yILxtIfnuVNvjRjY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790369513; c=relaxed/simple; bh=Q0GQSFNnxzjh7QJ0TPu35gluKAst3z+Q57VIYVkwkt0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZQwVPSEkOgn/jprF29AsCNk0E+Srh9S/VY2uVOx8J+uJSyNDrkmaKreM1wvPhLE03XR3sD4R4wxgNnRigdjZe7qjNeJ0tNS6lUKwnrPeJPcwSEBqWnOAG8sS6QP0MVIMSmEeYxbKN2H3HJ+qJQ9RliTbhx01K0IX9fOfAu9jSbc= 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=lR5SFMDC; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XBqv7Xja; 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="lR5SFMDC"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XBqv7Xja" 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 68PIoDNA1862921 for ; Fri, 25 Sep 2026 20:51:50 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= hXEWsrMj8YsWuXAHVVNPxeZafw4Osmo9egEVowveV8w=; b=lR5SFMDCzKEzgvlc Md/3/TJoUMZqR5lG2TVQyt+mQAgfzAghyJaj82HVKJLIRea2maX5Pbjl4DojVOc+ Pdwi4dYUySCgbb/kwC7xyxHUWnjwzeYeFCKwAEao2QxR/oGmK+UDB1mUnYvsTbk2 0v5iDF88ftSWNQ2+pHwm+qT/MDdX5p03YfBi6tAhWsTpH6An0wRJvZ/767iBKFk9 QZp9iqePm3q/J7I1kUbP0wjoDzm+sSnjNLOa3gb3k+VjyOHhmiImL0CATOfY9awR BNMbcYxX83BMfhmD5jg0wGR5CW0f2r17miaHEnPESyenx5kdkH2iNLsayVx0mY56 QQl62Q== Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gwr1021xw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 25 Sep 2026 20:51:50 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-30f1b904861so2043419eec.0 for ; Fri, 25 Sep 2026 13:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1790369509; x=1790974309; 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=hXEWsrMj8YsWuXAHVVNPxeZafw4Osmo9egEVowveV8w=; b=XBqv7Xjah9KS99GTDuzOQkq2bVNLY2+JGtdjmqNHmjVss2batJK7eYyVcYX/4mJX6e A1P1mKGB+OGzIoIoqtdRHLyi9SHLdF2VkYXrX7XLxEKvJlS/+FYyq45o60r0YDiWB0xj Ioq4r0or673hM56U6vm7a0H7IUMfJFGqPdenhZafpFNbsFxfvK2pH88/hLje92TGT6JX hGnUaIMiixK5pXP39m1jflMTbg3KTa5Dhi4NCvMo9KBydpWEOpbqvTfxFIuPj/+wPxsB cW/F7iYU9VFS2PazgN91bzZoU5TGqTbKcYPmXmxJJhpLPrQNPM0aSPgbNnyNJuDCbQ7t 82Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790369509; x=1790974309; 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=hXEWsrMj8YsWuXAHVVNPxeZafw4Osmo9egEVowveV8w=; b=x4gWO0k0eg0JdLzIooXoKR97/DMPNccmga445WVgrjs6DXebE34NrEzJbmR6ZUnzA9 QzZv8FrVJT3R5MoYTyTwisHVDAtZkJ2irOrzOBmvCgGvosDB+NqbpE+aMWrE1sppj/gm w2izrRNy600l7pjeyr7Ut/XBfQUQ60plZTwAsfxAhl3rn2iZrfWEq1ePe0EJEKQ6Do24 AzNt5azALPqDtRBCDe/adSdh+i91+Gu+msqBtlKWBhY/loNzJ9QEUN0f/yr7rW8s61t6 0c/VS7u31//v6iEILaQGpud/dUu+KjWtRA1nT0DglW+Z8Riodj5yhfwOkE08ZUT8Pmdz xa3A== X-Forwarded-Encrypted: i=1; AKwUvByV5vhiIAnzQSo8R5s6Egcu7nOuPYaIHHGfNrsDSFepCJrIbfqMy3TUXuKRel9+11AG9qcI2hB6I802Dpo=@vger.kernel.org X-Gm-Message-State: AFuF++lfF+cJCDrbRaACLLxRHYe7Yq811pLHbDrJOsjal/DIBGvI9jgr a1XZNjBowlrTtE30owQ3l6p+4g7lFy9N6UEDgL2Wdpbzf0iimDGV2mnrwZf27qGSaKZhoUewq0b D7hNnWSNvkffZzzDoLDKK8ZcGsBr0GD+eVlQEqMaUK/2vIPPfj3SEjzVEWFWyXMHECCg= X-Gm-Gg: AYBFou2IGcgOZiVhEthaEK9VkHkO928L5t6pLQznQCMpQCfvII+OFu7A7B1QLwelb+g bY//jCn/XUFGKGY8wyYQ6gl4tsP2pi+zx9v81v6JpzbsbyjHYJG7D865pscBQ9KhzMAFaNHneIt pDmtOTIIVWXU+hHNy/CyUpVrQBUY+lRgDfJGzTktixM7Sg6wVb/uTmChvlKZRBoBL/rc1f0e+yK kwxvQAAX5maWenpsg9s/kK9k2Oov+p1ytjsRVOUiPV3B/no1N/BnIUm/ybgbcoNEQ51oeGxKIz8 tGM8eBfYu+GfOoy1LDegGcp1auGuKztaH4rJBEuBgIkQZFPjiEx1Xi6Jr7L3+3OZJUkmuVyu6XM UfYMv/GuOhF2QNPiUfOwqMgzkBifsXoqW X-Received: by 2002:a05:7301:790d:b0:341:6ebb:4e2c with SMTP id 5a478bee46e88-342727579d8mr1228515eec.35.1790369508883; Fri, 25 Sep 2026 13:51:48 -0700 (PDT) X-Received: by 2002:a05:7301:790d:b0:341:6ebb:4e2c with SMTP id 5a478bee46e88-342727579d8mr1228486eec.35.1790369508002; Fri, 25 Sep 2026 13:51:48 -0700 (PDT) Received: from hu-ptalari-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-34144757f31sm13085734eec.14.2026.09.25.13.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2026 13:51:47 -0700 (PDT) From: Praveen Talari Date: Sat, 26 Sep 2026 02:21:35 +0530 Subject: [PATCH v3 1/2] 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: <20260926-add-trace-support-gpio-v3-1-8572bf7456b2@oss.qualcomm.com> References: <20260926-add-trace-support-gpio-v3-0-8572bf7456b2@oss.qualcomm.com> In-Reply-To: <20260926-add-trace-support-gpio-v3-0-8572bf7456b2@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=1790369498; l=13347; i=praveen.talari@oss.qualcomm.com; s=20251114; h=from:subject:message-id; bh=Q0GQSFNnxzjh7QJ0TPu35gluKAst3z+Q57VIYVkwkt0=; b=OmHJ2AuuhOYXLzZBNZgEa2rnqi6cE+JThVBm0FfP7uigKA9RyQq0hBXBzDWVE5x+Jf3JWc29V 4zzPjc5ZRfPD5KBFjDRUcGwJHQysIo0F83PDKekhL7hv/ffzB3LMS6I X-Developer-Key: i=praveen.talari@oss.qualcomm.com; a=ed25519; pk=NGK/88fjyHXgfhIKwag7+uIytOmyOypvZ/hDFaYPEss= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTI1MDA4MyBTYWx0ZWRfX0visPHwxdVO9 4i7Dm8F3R5buRmEWQtF8siqqrsG6JEU6k5MD2QbneRGc23B9ltl/LnJbc3U0+yqvu2+DqjkVxcA FA92cvhMlY0APbtGotAAPmi6wn9plmVzdvMHEAmJQ5hz5CZTqtQzgPzqlDehG2X2BpK5VoOItoZ finwZCBu5D6RAJL/lUxdCgHHRFO18OpfEy1rCDCAiioo9jkznoG2DzSMZ/+K24H6KdTO14et7hs Jhv6z8wIPo3gboXemYHgrZ3+yqcnS93gDy1LGih5PDc08QK7ND1NgUNKSkN5o6D89dOY0YFk7TT qQcfUCltBtMIt7bszz84uKOb2gfhX22gsUgJO/X3Wc6+V7n9//P2H7uM5lPyOBmemUadUeiNynP 8fwxeEPP3idhWUL1+GuRnZzBtvWsaPpPoLh0CMgjUAjXek+LPLCL1uARgqZnwsZxmlTyVlbC4wm CImxV+aEIaFG1hUbm2g== X-Authority-Analysis: v=2.4 cv=ZfKIpcVA c=1 sm=1 tr=0 ts=6ab6dee6 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==: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=11w8Wl5C-LXbRnlNqkMA:9 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-ORIG-GUID: 7Fdr2WrnfACzlBN8WjWVVMq4Gp2zot-Z X-Proofpoint-GUID: 7Fdr2WrnfACzlBN8WjWVVMq4Gp2zot-Z X-Proofpoint-Spam-Info: AW1haW4tMjYwOTI1MDA4MyBTYWx0ZWRfX/hFqw18x86HC Kr9qYJJZmeXifF5NL2Y8bV5uOXD00Ynfiuqw8wtGClPByKHyQTd2/DmESiEs8853vOsVOf7OLP3 gSNIzKnNbXq0Noo2MgW8cERDg8qIypI= 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-25_04,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 impostorscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 adultscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609250083 Add tracepoint support to the Qualcomm GPI DMA engine driver, giving structured runtime visibility into GPI DMA behavior without requiring invasive debug patches. The events 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. Signed-off-by: Praveen Talari --- drivers/dma/qcom/gpi.c | 11 ++ drivers/dma/qcom/gpi_trace.h | 317 +++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 328 insertions(+) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index c41bfac65ddf..fafe6ac848d9 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 "gpi_trace.h" + #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); diff --git a/drivers/dma/qcom/gpi_trace.h b/drivers/dma/qcom/gpi_trace.h new file mode 100644 index 000000000000..f16d156833b9 --- /dev/null +++ b/drivers/dma/qcom/gpi_trace.h @@ -0,0 +1,317 @@ +/* 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 */ +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_PATH ../../drivers/dma/qcom +#define TRACE_INCLUDE_FILE gpi_trace +#include --=20 2.34.1 From nobody Sat Sep 26 14:39:03 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 04FAF4F5E01 for ; Fri, 25 Sep 2026 20:51:55 +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=1790369518; cv=none; b=Gjz9LFP08oJPDiLkTbC4eKFP4K3uw0gu2zJZpxsFoJ4jVqIF4qK9169i5nhxythtgSQR6OIdpf2N1msicHmgd0NLgsPGrH2odvKAKS9B1ttP56yaesx6LLnl09tIQYNqkPBeu/RRfkCGIrBan3J+TPbw3T0UY5WiyrH9lfnrwyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790369518; c=relaxed/simple; bh=IBzKwuEAw2IzSX3BSi9sh3eWLeU2EFMHDvkG5DZOjbk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PW+7TV8fb0VCclYrHznep8yAJsFNCj77xks0hImOvEn9LzQj4TJ+l3Egwzo0xGaCug8k/8wozaXvwqA5jbVhtd932nJbVCQ6ozeri53oVfkXB0rTUSGSf0XTpRtvAzatkIbwoEpruqZgEV9z1rLNfRKVlf+/rJZN2bAjTxEPiXs= 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=UTVYqV9v; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hB21yrg6; 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="UTVYqV9v"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hB21yrg6" 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 68PIne542034768 for ; Fri, 25 Sep 2026 20:51:54 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= iZQSoAYjcp8FM4R9KKzLNu8MzgRqTqIgLzMBLesMe5Q=; b=UTVYqV9vIh/P43mY UWY+FRv9epQk7Us/LrbAFjD+yL6ar6yT3RN9UmvWVKpEPLpttZVIrDg8NUUnPXE6 Mn0E11+7AisiU+rGjeoXF3Ryh/dM/VuYSx1e6KDA6+uXk1jWOO5eWy3eAeWm3VAS 0xgMwPG8xnc4+3d7VHC6FSzrC7skK7EvzbrYtCdme+IsiJul2ebEkAsCbdc77JH2 83aO6ZTZjIvusjz1U+pU2+7/tPsUxu3oo8AlLIXCF7UU7PD6IwzPL+GcdBoKS6HF Qbia2klKmAAgLGZbrwFeyQ2FKSW4gWtp0nl7rS8WhZQlnEG/f3iD5H9PdVn3jWFx sgOR4g== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gwvd3ryd4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 25 Sep 2026 20:51:54 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-3286d2bac04so1819760eec.0 for ; Fri, 25 Sep 2026 13:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1790369514; x=1790974314; 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=iZQSoAYjcp8FM4R9KKzLNu8MzgRqTqIgLzMBLesMe5Q=; b=hB21yrg6LwvgZuCpDATFWXJ2RVTJUfrt5vHnKbKTklCjp0cLMqqppIab5R57BfduuI kza5oVR0RQWwkK+UCy8ppLpe3Cm5IDC0anE2Y8LGkT5MBD4omzzVQTfKxQj9pffKjAyJ EzmA2axfB9esU8H3bzLWk59s4VttF2YMm9CReRJ+fjfpI/6I86P7tRpkc/OTLEi08tBu rN4pFm7ZUcby0P4AOCeiLJ3IcMWtwE66FmGrglJwIQuBchkOsYxFQWkiEXRNzKKVv+yv 0klCgNkneC8nmw/ZI7YeZbDYvAS5TFyB3ZX8X8mp5lgEuRlHyrM43jEL9HxXto/KklOb NR1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790369514; x=1790974314; 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=iZQSoAYjcp8FM4R9KKzLNu8MzgRqTqIgLzMBLesMe5Q=; b=IcMfkkEwuYQ24blukfTSrpjKdvjVfi4qm5ETuN9GKoFYNI24eMUJTZO3LeJqiR9VFk L5zEOGVYD+7iV5QACGaLMzmcIhIxWCgu7hIya0y3M4ET5jwKUeMZihmEjFbrvscfv12Q wSA5nWOo8xJMpPJdfbJzgCr79KBkKcLUuCzCyoon5lZU509P4qQD3WO2nq355aWKQ0xs PJgexLL1Uaa9HohV1uFmGwWBjDTUecYqd558RaoyY566dURc1j4sSjoiO2bhRvod17tX BKf1GvMpreognG9WtfPDDGWDuanXAjJcTkYH7GsPv+P6OByDOZDGlRVTq2NUmI1Ezsme WNUw== X-Forwarded-Encrypted: i=1; AKwUvBzCj0mKfboWnZLfSEXcyuxiRT7hKBnnWRlyOEafy77SvO9JQu4OKon3AVf9DOKNTgvChAXqOln2uvRev1o=@vger.kernel.org X-Gm-Message-State: AFuF++nyJMa6SrYuC9Oyvotj3pZ40EKm9Rc+8JIA2xPthw93syELRhUA i9n90W3qmib74uh72lkjBjJP2L0o38TlEk7yxPs8KcK5VSada2ifs/V2QWtLIGF+oTvp3odfJCL LQ/SO3cAq9ynOblT6/wG5zglxNYZOGHe/NCCKBtPxcSZ5P3T/1RQ2U4vXz2Mc24cUl+XKSGbnKa c= X-Gm-Gg: AYBFou36dwAvq645bHpwBRjEDojrpFAnpeRAxQqkFg9872sEVQ+uSFTyEkJh/G/H/5G bEq2WX+Ea7cnPwEjxJj5ZLhV+4WPE+TxRBu1pJ42aaqkoPhhzl3fPumcBAKBS+ZnPJo8fSxULUI WqQ5stCGwJiNlGS5+JTTzj/wfxH+j+L9GLcjGzYhLUAaOhHn1YM4c2JwooORu/6GD5eeWuWBAlq +GoxlpJ6gyY0vJK+gpPKzWU1ZA0hR+q3LLnojZfClOm1FiDIG5guhGJ/0GyTDGpr4ufVTcYvgkn DJKrwKfWMnQQIU/6U9VEyN76oPZss6HnQ8hkUMN0kmV1lxhTcVCGnati9ElR0u9zo7w9uItkZ1S Hw0QtI+Cv2ncxB8Y8TCyCEtHMY7p5HFnRVBu7VO9PdPo= X-Received: by 2002:a05:693c:2a08:b0:33b:7fff:dfea with SMTP id 5a478bee46e88-342700bf366mr1168087eec.2.1790369513395; Fri, 25 Sep 2026 13:51:53 -0700 (PDT) X-Received: by 2002:a05:693c:2a08:b0:33b:7fff:dfea with SMTP id 5a478bee46e88-342700bf366mr1168056eec.2.1790369512668; Fri, 25 Sep 2026 13:51:52 -0700 (PDT) Received: from hu-ptalari-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-34144757f31sm13085734eec.14.2026.09.25.13.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2026 13:51:52 -0700 (PDT) From: Praveen Talari Date: Sat, 26 Sep 2026 02:21:36 +0530 Subject: [PATCH v3 2/2] 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: <20260926-add-trace-support-gpio-v3-2-8572bf7456b2@oss.qualcomm.com> References: <20260926-add-trace-support-gpio-v3-0-8572bf7456b2@oss.qualcomm.com> In-Reply-To: <20260926-add-trace-support-gpio-v3-0-8572bf7456b2@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=1790369498; l=7464; i=praveen.talari@oss.qualcomm.com; s=20251114; h=from:subject:message-id; bh=IBzKwuEAw2IzSX3BSi9sh3eWLeU2EFMHDvkG5DZOjbk=; b=kWa1HxqLG5GpSXPv03O2FAd72j4c58leYBHJkisUNw+YbrNXn5v+3YVmvDkofVz6nVACoBb2W dEU7/3Zi6R+CCF4//W7GjcVHTGUaDnAELs+EIh2cILioWv4irhwEbxr X-Developer-Key: i=praveen.talari@oss.qualcomm.com; a=ed25519; pk=NGK/88fjyHXgfhIKwag7+uIytOmyOypvZ/hDFaYPEss= X-Proofpoint-GUID: tZHnq7KIjI7tFZU29X4KVBO9PQyjSIcV X-Proofpoint-ORIG-GUID: tZHnq7KIjI7tFZU29X4KVBO9PQyjSIcV X-Authority-Analysis: v=2.4 cv=YL4KWhGx c=1 sm=1 tr=0 ts=6ab6deea cx=c_pps a=Uww141gWH0fZj/3QKPojxA==: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=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTI1MDA4MyBTYWx0ZWRfX7K7Qla1oqGD/ lQaX7RjK+g+g99R6Y+s7P/lp+t2u+PlxPlCM6oF9PbBvUKSF7ONjjBgLXW1GdQe9kAcy/h1x+Xx xQzlxDGb3jnIH/sMdLud3eI5/6kmbLurmRQyPdoHf+e/i4inhQI3+aBX3A+h7tiKEViEL499bJa UMGA5gxEV6SdHmE5cfWlBt8c4N03TOGIYSOp1AHVYfFgUGVVJQcFt+5N/AqjJd3M00kxmQjN8hY 1Oyoqx5d0t8z/QFVT/unf6qfiPhmBR7Kf0hzjHLgc05zQnqscBcSobPRss5WSsN3uByyGdhWvN3 LpNUBUb2pnFVd8WHTS15/w1FfhLEfcZA/sno0akjVeTa5dHbwGIp5r1henBCldrgvrj4Dk1wl+z rViVAcOXyOZO0xu20Ap6Ob6qvwvndyaia/9WIvBLDzVyDpbZLvEex6hPiQVOfUKtXAIQmyXO6k2 tn1bMcTtY3I2Zk1+QZg== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTI1MDA4MyBTYWx0ZWRfXw7nUwUfQczxh C5jrMNC2U27J+WfQ7j+UqUEOr2zjspKi6HgEJmMkdzj55ULA/z60szsktvW+iSIVYhe7aCwGr4u UT3Qmh57+DG7Rry0Mm/HpFNdPOxo0vc= 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-25_04,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 clxscore=1015 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609250083 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. 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 fafe6ac848d9..6aff2a0d5416 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