From mboxrd@z Thu Jan 1 00:00:00 1970 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 0D0DB3F1AD3 for ; Mon, 15 Jun 2026 12:33:08 +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=1781526795; cv=none; b=Ii/miSMfP4fO5AmO8NFYeZWeNh1bcxYz91r8H10hvL4v3NT0V1gvyA9Hi9EIXJLJBfrQCXg0GvT7DFUeAwELmpVz15bSZP+y8tVknVYEzP7twkgRbYmWUxJVbW5AUZ0nRw57wUumbptqA1DrUsKzYWk55HieQTqzi9rA8jMe3zI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781526795; c=relaxed/simple; bh=iXQ4jRd7ZWhZy6UdVz/NuIRaIQz2T5K6T2yqI6GZwOU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=fYWPB4kJNU7q5DwPn02ca33g8xb9EcnJdfZoOhmtKk7feqQyceiHuNgz66F7qHFTI2M664T5Kdxbnj5wkPkByxyIG7iuSDljxnoQwxwwWxUAKB2ZM1myI9HaBu7mJFi7sDxl+Ugu2OC1OV+5NYqhWzW2gKqEd4nI7Fhbk3M5lRY= 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=m0t0gN/w; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=V70E7Zwa; 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="m0t0gN/w"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="V70E7Zwa" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FApAap359060 for ; Mon, 15 Jun 2026 12:33:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=RTgeCyE7ZzjwZw/j8uVLqf ETe5WOLfX91wRWOaFoB0c=; b=m0t0gN/wBAv+Ng8m+f94CXPp7NmPtB/hscC2of /87nwRzIx4g8uUG75jPjRu9HWMdkVaOH3KTft8Nx8OeBczscSkeTSGFlSUX88AaM 0OF36uxsYH7eVYN+8ZbO3lulELGe47UO+uM0/mhBAmZszS+IoIyWJRMX78UNVY9Q 2mwAOqFSi8vhdhNUPvaKjAHRX8of9pqJ7x7i4iyK7QE8ivwTACMUCRi5+pushI+Y ubkpfYGU0WntI+d+TfXXjMSdUlgrlDqGrmV2vaqRqqtm/LOIpUDGtbL3IJ7ME2QC Q14ssbV5b3uR3y+CQ8CBAvTh1roH0us0G3qAvr3AxJvYevWw== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etd2c95bf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 12:33:07 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-842446a3851so1817923b3a.0 for ; Mon, 15 Jun 2026 05:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781526787; x=1782131587; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=RTgeCyE7ZzjwZw/j8uVLqfETe5WOLfX91wRWOaFoB0c=; b=V70E7ZwaRfKjJKbkiYHwOEDtr29mMlokLyAlq7EBC+JykA4qu7RsJ4YwWm/xblnNGJ T+bdbIjU06S/6LXNi2T7BJ9wY/xYLVb3kcww/BpGiTMNkbU3q0L04MWxeKDmoutqPx+M I+WKtP2Xd5MizqRPfBEzR3JfsrpwCpo8q1OfhAHc5SnjOD8pdlRKi0HEtj4exJc+5kKD Wd5IfT5Qx79KUXwf6GQtqrebJxvunP+YN78+AWLbAGSmauu+ERnVr4KzvdgE6no8GLK0 HXEew7VrJVJuTk7aJPHOKCvTr5cFTkRUrhZiGoYAR3PbIH43dKX9CXRISXgggcFvYe8j plPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781526787; x=1782131587; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RTgeCyE7ZzjwZw/j8uVLqfETe5WOLfX91wRWOaFoB0c=; b=KZx8hztyq+NnG5O5SEPT0GT0EALHu9S6LBpozCK1iiYW2RoOr8V3DRYosTNtzD58RI gFU13Mfq4h/+R7sfl9KtnMEx0kSTj7VX3i7J4D3NXbNx0Sdv+7pe3I9V4v0qBCczWBy6 t80j1+JwiVDIKcU/QpKdQYmxeoxam7w8mj2GW3npOW0rB+S+qNd98XUNZSVUmjvi1tbl L7KHoHfxgXVj8i9C20KT1RxMTZMyVm4l5m+LnQHTzqQgQ47mOLzyRYRS4mLCSEY5OMQo gYMGo0VUQjN8zLRrVZZ3Cpc9yIHvaNK9j9VOA86HSCDjsFF+MNCdOW4O8hOxrCTyOI5W /6Mw== X-Forwarded-Encrypted: i=1; AFNElJ/nYSj5hXYmkSlKsTDdoUAiRlhvqgbLkG7e+EsbFv64b/Ia0j6YDPQGvf9ux91I1+XaQAKKradULwz8dU4=@vger.kernel.org X-Gm-Message-State: AOJu0Yyq0Twa2cPDC7f4EK39aRVvvlHuU/8kz8jYYRWjo6i1p3rL49JO FfV1e4ylaKzO/kCIdVgijN5sL4fd2jeZKDQXvcpUubI6uiCEtTv0GUtL+84gfVIA1bBYal89d+6 AqC5TQ5lOng1LUrCtRoquLL7cfevTudMUCUB9RbBmceWjRvG9F9uz/MqV3NsLOdA6wAI= X-Gm-Gg: Acq92OHaAk6VuqLSmRMM/tZKeMK69BEDyJVLIe9dHhR5JBvkeyvLeYKJrzRy0RuIPrA k0/epEHLCyUfUZ+8NG0hfEYQQVJ6XqksAZoeRkSIsEl0wK93kibp2SrhkRs6OdMP7vGGbUvBkQp mpIRJpxxZYwBnhWExPwYkBIJvp4L/IiCzKlJ7OOiW5TRgb3GVyB7YezZew7nTsw3se+uT90Ixh/ bvOF7dKfeGd9nWNEyIsECU92IsIQIhPEmBPOclzCAnl3mZQtdSXAG0AptjZPKEMo1xQQk9rwh+O CYJsOExOUJBWghC2qeEmfbPufTsTOwtnb7ie0GgotJnMyX4agkgd6nOxzR+LeVQklCsu0p6mCkG Cgxvn2bUxs9634fo6shLKv3JPgMaq6usnloH6SWXMNYKHy4oBqbNBk5q8VSM5nkE5p06fAV5PqZ c5My20/QnxAzQxTg== X-Received: by 2002:a05:6a00:1ac9:b0:835:405a:7e6d with SMTP id d2e1a72fcca58-844e1a3dda0mr11453433b3a.21.1781526786520; Mon, 15 Jun 2026 05:33:06 -0700 (PDT) X-Received: by 2002:a05:6a00:1ac9:b0:835:405a:7e6d with SMTP id d2e1a72fcca58-844e1a3dda0mr11453371b3a.21.1781526785902; Mon, 15 Jun 2026 05:33:05 -0700 (PDT) Received: from jinlmao-gv.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b03fd0bsm9968393b3a.50.2026.06.15.05.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 05:33:05 -0700 (PDT) From: Yingchao Deng Subject: [PATCH v10 0/5] Add Qualcomm extended CTI support Date: Mon, 15 Jun 2026 20:32:28 +0800 Message-Id: <20260615-extended_cti-v10-0-1c1694b6d8ed@oss.qualcomm.com> 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: 8bit X-B4-Tracking: v=1; b=H4sIANzwL2oC/x2MXQqAIBAGrxL7nKAR/V0lIqL9rH2x0AhBvHvS4 wzMJArwgkBTlcjjlSCXK2B0XdF+bu6AEi6CGt10ujNGIT5wDF73RxRzO/YGdhzsRiW5PazE/zc vOX+t9x2WXwAAAA== To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Alexander Shishkin Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, quic_yingdeng@quicinc.com, tingwei.zhang@oss.qualcomm.com, Jinlong Mao , jie.gan@oss.qualcomm.com, Yingchao Deng X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1781526781; l=6468; i=yingchao.deng@oss.qualcomm.com; s=20260611; h=from:subject:message-id; bh=iXQ4jRd7ZWhZy6UdVz/NuIRaIQz2T5K6T2yqI6GZwOU=; b=uPmEudap3yOFU9fJfvOXURiLtSN1ODahVEhiGAZIrTbWot3FPwqjCTqV0PBLJbLGD73wJnmAX w+ZrN+AVXNXDhKM58Pp/gQe6Ur5ZtV+Fgot8J86anJTPyrJeSHhWRwh X-Developer-Key: i=yingchao.deng@oss.qualcomm.com; a=ed25519; pk=+y3U2mIt7mf0C+x6qBUD670cd9S2QV+yl5015bUYMgs= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDEzMiBTYWx0ZWRfXzejqD34Du+f8 dws1XtgMyUjH2M4CvN8izU6OG8EWksIaP/zmq/BLh8Zt/wr3I5E1BDr7cHziqgjPjP5PwWzf/z0 FdNSAPnaWK+jlOjTlqUNYQPAUJNQ67TmUhFg/3KuK1xiVjqUkPiWNO9XTfZyakBXyi+hASZ9ZGO uAX6QPi6O9XhN1mow96JEGmE+3zixRQoEPlGU/OT29ZaWPQjgqkG7afhBku9V2jiY79OazRfWt3 teZLaAtUakCqwzzBUqLeK9maybYCXELKDbHkFHUJG4Y1t1GHp8h4c6ZvqYsrfqbi2SebeK9fHf3 NyQSSyOhZ56qqeU7yh88Qz1eETenMuqWtsnDnD/3ITipsVcvrSdDZuo7LOWipj05JswgkMWVALD iNtHeeHsAn5R9AIvkHChximzFfNmZVkBXou6LIDThEq3QkGbPuYCOmpFij9jb+T42VyJ4IpTs0t Aphl/Zm9b+Ko7M3PjoQ== X-Proofpoint-ORIG-GUID: sd0_R-Tz16uNZH8GZfrg85lop0JtxMTw X-Proofpoint-GUID: sd0_R-Tz16uNZH8GZfrg85lop0JtxMTw X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDEzMiBTYWx0ZWRfX/k+F5KM/oWat EivjyWtmX0yWJNvYwDEXzLVqutUKC1YZrDddaJ/7PgZ2Smm+TxsemSNkKV/FOA00XAaWuo6zQHD T7yRZrPcIwl4OXdJxxE5ysLtdc+QM7s= X-Authority-Analysis: v=2.4 cv=MsRiLWae c=1 sm=1 tr=0 ts=6a2ff103 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=jC_dHazF1ionUiSTUcYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_03,2026-06-15_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150132 The Qualcomm extended CTI is a heavily parameterized version of ARM’s CSCTI. It allows a debugger to send to trigger events to a processor or to send a trigger event to one or more processors when a trigger event occurs on another processor on the same SoC, or even between SoCs. Qualcomm extended CTI supports up to 128 triggers. And some of the register offsets are changed. The commands to configure CTI triggers are the same as ARM's CTI. Changes in v10: 1. rebase on top of linux-next-20260609. 2. patch 1: Add a bounds check in cti_allocate_trig_con() to guard against in_sigs / out_sigs exceeding nr_trig_max; carry forward Reviewed-by tag from v8/v9. 3. patch 2: Move __reg_addr(), cti_read/write_single_reg() helpers into coresight-cti.h as static inlines; add cti_read/write_single_reg_index() variants. 4. patch 3: Replace the direct CLAIMSET clear-to-zero with thin wrapper helpers (cti_claim_device, cti_disclaim_device_unlocked, cti_clear_self_claim_tag) that early-return when is_qcom_cti is set, bypassing claim operations entirely for Qualcomm CTIs. Fold qcom-cti.h into coresight-cti.h 5. patch 4: Add Reviewed-by tag. 6. patch 5: New patch. Document the banked trigger status and integration test registers added in patch 4 (triginstatus[1-3], trigoutstatus[1-3], ittrigin[1-3], ittrigout[1-3], ittrigoutack[1-3], ittriginack[1-3]). Also document the previously undocumented base integration test registers (itctrl, itchin, itchinack, ittrigin, ittriginack, itchout, itchoutack, ittrigout, ittrigoutack) introduced in kernel 5.7. Changes in v9: 1. rebase on top of linux-next-20260518. 2. patch 2: Replace the "encode index into offset high bits" scheme with a cleaner __reg_addr(drvdata, off, index) helper; update cti_read/write_single_reg() to take separate off and index arguments; add u32 index field to cs_off_attribute (moved to coresight-priv.h); drop CTI_REG_SET/GET/CLR_NR macros and ; update commit subject accordingly. 3. patch 4: Add three index-aware sysfs macros (coresight_cti_reg_index, _rw_index, _wo_index); replace string-matching visibility logic with cs_off_attribute.index field check; Link to v8 - https://lore.kernel.org/all/20260426-extended-cti-v8-0-23b900a4902f@oss.qualcomm.com/ Changes in v8: 1. Rebased on top of linux-next-20260424. 2. patch 1: Use devm_bitmap_zalloc() with nr_trig_max instead of per-connection signal counts; add bitmap_zalloc() for filter trigger group. 3. patch 2: Add #include ; move CTIINOUTEN_MAX expansion to patch3. 4. patch 3: wrap CLAIMSET clear with CS_UNLOCK/CS_LOCK; move CTIINOUTEN_MAX to 128 here with comment; fix macro alignment in qcom-cti.h. 5. patch 4: Make qcom_suffix_registers[] static. Link to v7 - https://lore.kernel.org/all/20260325-extended_cti-v7-0-bb406005089f@oss.qualcomm.com/ Changes in v7: 1. Split the extended CTI support into smaller, logically independent patches to improve reviewability. 2. Removed the dual offset-array based register access used in v6 for standard and Qualcomm CTIs. Register addressing is now unified through a single code path by encoding the register index together with the base offset and applying variant-specific translation at the final MMIO access point. 3. Removed ext_reg_sel, extend the CTI sysfs interface to expose banked register instances on Qualcomm CTIs only. Numbered sysfs nodes are hidden on standard ARM CTIs, and on Qualcomm CTIs their visibility is derived from nr_trig_max (32 triggers per bank), ensuring that only registers backed by hardware are exposed. Link to v6 - https://lore.kernel.org/all/20251202-extended_cti-v6-0-ab68bb15c4f5@oss.qualcomm.com/ Changes in v6: 1. Rename regs_idx to ext_reg_sel and add information in documentation file. 2. Reset CLAIMSET to zero for qcom-cti during probe. 3. Retrieve idx value under spinlock. 4. Use yearless copyright for qcom-cti.h. Link to v5 - https://lore.kernel.org/all/20251020-extended_cti-v5-0-6f193da2d467@oss.qualcomm.com/ Changes in v5: 1. Move common part in qcom-cti.h to coresight-cti.h. 2. Convert trigger usage fields to dynamic bitmaps and arrays. 3. Fix holes in struct cti_config to save some space. 4. Revert the previous changes related to the claim tag in cti_enable/disable_hw. Link to v4 - https://lore.kernel.org/linux-arm-msm/20250902-extended_cti-v4-1-7677de04b416@oss.qualcomm.com/ Changes in v4: 1. Read the DEVARCH registers to identify Qualcomm CTI. 2. Add a reg_idx node, and refactor the coresight_cti_reg_show() and coresight_cti_reg_store() functions accordingly. 3. The register offsets specific to Qualcomm CTI are moved to qcom_cti.h. Link to v3 - https://lore.kernel.org/linux-arm-msm/20250722081405.2947294-1-quic_jinlmao@quicinc.com/ Changes in v3: 1. Rename is_extended_cti() to of_is_extended_cti(). 2. Add the missing 'i' when write the CTI trigger registers. 3. Convert the multi-line output in sysfs to single line. 4. Initialize offset arrays using designated initializer. Link to V2 - https://lore.kernel.org/all/20250429071841.1158315-3-quic_jinlmao@quicinc.com/ Changes in V2: 1. Add enum for compatible items. 2. Move offset arrays to coresight-cti-core Signed-off-by: Yingchao Deng --- Yingchao Deng (5): coresight: cti: Convert trigger usage fields to dynamic coresight: cti: use __reg_addr() helper for register access coresight: cti: add Qualcomm extended CTI identification and quirks coresight: cti: expose banked sysfs registers for Qualcomm extended CTI coresight: cti: document banked and missing base CTI sysfs registers .../ABI/testing/sysfs-bus-coresight-devices-cti | 90 ++++++++++++ drivers/hwtracing/coresight/coresight-cti-core.c | 153 ++++++++++++++------- .../hwtracing/coresight/coresight-cti-platform.c | 26 ++-- drivers/hwtracing/coresight/coresight-cti-sysfs.c | 89 ++++++++++-- drivers/hwtracing/coresight/coresight-cti.h | 122 ++++++++++++++-- drivers/hwtracing/coresight/coresight-priv.h | 4 +- 6 files changed, 404 insertions(+), 80 deletions(-) --- base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c change-id: 20260611-extended_cti-dd4971ef98fa Best regards, -- Yingchao Deng