From patchwork Thu Sep 14 05:43:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tao Zhang X-Patchwork-Id: 139361 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp158184vqi; Wed, 13 Sep 2023 23:56:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyg/ZY8vX0p1m2s36FN2m+S9gtQzWcLcyXxsxAG9kvHla0ny8fPJ0WbgzfSc8AHtV8I5QI X-Received: by 2002:a05:6a00:2d11:b0:68e:2cc4:c720 with SMTP id fa17-20020a056a002d1100b0068e2cc4c720mr5696911pfb.12.1694674598259; Wed, 13 Sep 2023 23:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694674598; cv=none; d=google.com; s=arc-20160816; b=HzLNaoFkZLcXWl0ZJXIcKmUn+/5SxH1U0tJ3j0liu/4svUkw+y2t79xDzXJmWwvzZf DXeRTbM1NQ8cm/493zgHZcl4j3A4M1mXiTWC+1uhD0EuOXIxL8EjErnlSVopVe9sh1le jKIwCTKqpRFXXoaALJVdIJKTjbsscvlATMj9QQLvQj3jpMqS87kCt+tmO5AB1Kn8V308 9MqNkBVmyC83ZxNm1YG2RQwC/omohT8WtJWojzIkJ71KMmsP5T23AUEpjtcWR1nN+A16 qGJqNCL2Q66voMT3hJd7Rg+X8uEELQFT8tj51UOU2V73klLcp0ZEhYR31HslrwXi1kxa 9ulQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=eDJ6gnGZGgRLXJp91oxjU8lgLe4JKefWcZme3teV9bU=; fh=n/cywDBrV54XLbQm/aXN5C7dSeQ+T0voxuinVQDvrSM=; b=cmPbCy11pCtWEDhzx9pYajB+GsW9pb4IqMgrltZIPtOqQwuoWV/ovKDNTFLf1/TPW1 e3U9vNC5X5GhO+vaiNO2GyUkQtM+yhs99JCTQsLjCHgkPN4EhQmSgYnGNSRzL27McJwP P+WoyDvxvc43U80g++jiydmxrSzT5mhRmNUd/bh358WcILZRowt+TJBt2LnOG4wq+jwe 3Dk9big3KnbUoe+GnhCdRr1vofoAdlW3wp1GOGg5yxWkeO4ELjzu+he5KWG1yYgZ2eH7 NlfD3kT6KwduS+XG6wCM2/vwKRYDytAVRNY5QhIZAnj5V/SuzWyjrcGYMc81nqlALEKf uE0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JH2dFj1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id fa38-20020a056a002d2600b0069019bef4e4si1004198pfb.79.2023.09.13.23.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 23:56:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=JH2dFj1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DE8C680765E6; Wed, 13 Sep 2023 22:45:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234967AbjINFoc (ORCPT + 35 others); Thu, 14 Sep 2023 01:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234904AbjINFo2 (ORCPT ); Thu, 14 Sep 2023 01:44:28 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27F4BAC; Wed, 13 Sep 2023 22:44:24 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38E4pPIQ001286; Thu, 14 Sep 2023 05:44:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=eDJ6gnGZGgRLXJp91oxjU8lgLe4JKefWcZme3teV9bU=; b=JH2dFj1OlFzTcy9i8KjnXsvC7eSL5sToDPQa673VHTqWYDWTJdCRK5K0x5Oa11X2+50i yDIDazccod2jVnfofdLBRj7ESGOWvRjdua/De8cCIjCbgq/vwCzXH9g0AYa1E03MO+Rt rsoh0UkLgdv0eYWxFcc1zP/W+LMUo3XUobFWwtmIcKPGUIF7avl9dyQlVwCHSmvYpEn3 g1GWXh9GsbHSj2E7QcWsOVexkNt1VND1JiN7XcXtxwAOTO8Y79bnO/kH8efaETrzOI7j Hr2/xlMw8QxDRcXFQpgYfSyLwGp/0jDPUuc2/bzlQYVg2YGzBeOcUrh9VPkMDE7Fmx4z yQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t2y8q3jp9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 05:44:07 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38E5i60t013967 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 05:44:06 GMT Received: from taozha-gv.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Wed, 13 Sep 2023 22:44:01 -0700 From: Tao Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski CC: Tao Zhang , Jinlong Mao , Leo Yan , Greg Kroah-Hartman , , , , , Tingwei Zhang , Yuanfang Zhang , Trilok Soni , Hao Zhang , , Subject: [PATCH v9 03/13] coresight-tpdm: Introduce TPDM subtype to TPDM driver Date: Thu, 14 Sep 2023 13:43:14 +0800 Message-ID: <1694670204-11515-4-git-send-email-quic_taozha@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1694670204-11515-1-git-send-email-quic_taozha@quicinc.com> References: <1694670204-11515-1-git-send-email-quic_taozha@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: yVdtg_PCT-KjU5ubATaf1zowpt7BAEVb X-Proofpoint-GUID: yVdtg_PCT-KjU5ubATaf1zowpt7BAEVb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-14_03,2023-09-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 adultscore=0 phishscore=0 suspectscore=0 mlxlogscore=794 bulkscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309140049 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Sep 2023 22:45:12 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776995111277868732 X-GMAIL-MSGID: 1776995111277868732 Introduce the new subtype of "CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM" for TPDM components in driver. Signed-off-by: Tao Zhang --- drivers/hwtracing/coresight/coresight-core.c | 3 +++ drivers/hwtracing/coresight/coresight-tpdm.c | 2 +- include/linux/coresight.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 9fabe00..d7f0e23 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1093,6 +1093,7 @@ static int coresight_validate_source(struct coresight_device *csdev, if (subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_PROC && subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE && + subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM && subtype != CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS) { dev_err(&csdev->dev, "wrong device subtype in %s\n", function); return -EINVAL; @@ -1162,6 +1163,7 @@ int coresight_enable(struct coresight_device *csdev) per_cpu(tracer_path, cpu) = path; break; case CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE: + case CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM: case CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS: /* * Use the hash of source's device name as ID @@ -1212,6 +1214,7 @@ void coresight_disable(struct coresight_device *csdev) per_cpu(tracer_path, cpu) = NULL; break; case CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE: + case CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM: case CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS: hash = hashlen_hash(hashlen_string(NULL, dev_name(&csdev->dev))); /* Find the path by the hash. */ diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c index b645612..abaff0b 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -203,7 +203,7 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id) if (!desc.name) return -ENOMEM; desc.type = CORESIGHT_DEV_TYPE_SOURCE; - desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS; + desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM; desc.ops = &tpdm_cs_ops; desc.pdata = adev->dev.platform_data; desc.dev = &adev->dev; diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a269fff..a4cb7dd 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -64,6 +64,7 @@ enum coresight_dev_subtype_source { CORESIGHT_DEV_SUBTYPE_SOURCE_PROC, CORESIGHT_DEV_SUBTYPE_SOURCE_BUS, CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE, + CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM, CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS, };