From patchwork Tue Jun 20 07:32:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tao Zhang X-Patchwork-Id: 110281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3491507vqr; Tue, 20 Jun 2023 00:40:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7MtIlwi1153x4bw9pR0HyJhQRd2HxihbIZ32JijVL531JkaVnlzrR4FtPkjlCDKbYy3fAU X-Received: by 2002:aa7:88d3:0:b0:63f:120a:1dc3 with SMTP id k19-20020aa788d3000000b0063f120a1dc3mr12227511pff.0.1687246823039; Tue, 20 Jun 2023 00:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687246823; cv=none; d=google.com; s=arc-20160816; b=AubthbSAGYTnq+cTc9+r6w9I17ZnwzlblYpCaPq8VBWHWgh/5cJQawKIjUkdAEPvQB z8NwpiLKhEvaLN13Lnwaee08GCDwmS1d9PY+mjsf4zC9yuzbI1OOHbXdUHtgOPF4W/AX GIV+YgGy2rDuFUJPhqxFSkRg29xqtfwlKDVcFUGrsnF2LKq7zbEwyCwmyD5otVNhdVC6 kdW1Bs2Fzav+U/FKNWZcO4XMDoqvXWj4ddt/zIzk1kBg4BZud+PHeq1e7rc94kKO3Fd5 n//flJfHSDBDg7eVbi8TV8faUbRGQSTVUsdMJBzKnIuM9fbmsuvZ5I5iwTjkye4iefOP ZP4Q== 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=2+FYJqvd8KPGLBxHJyZuzJMgY6Vqc6U1VDQqXT1I4S0=; b=weZcxeQf4QPKYcX72tDKL+zxElWdtyOGlYKD10/Z3zKYzFSAU/I43h7yeMfKpcAgfT 5i8MQOiSkA0wqtJBm7PHPwdQLuMpl6Qio+PaD/dXx62L4CMrnABMlf6QLw9s8s0laCaV WZECmIXmZF7yrjZldyOOVOMOdRyrhgTaobTG4gLYvFwewhJN2WhRkiONZp8Xe9jAsSkZ myXkqVPUKGjatkiEcpMvcSnv4KyA9+hoJrPTbbmRLFPGX+UqmWjyMWrqbtO0jZPVgYXd OoXVCEyAkzGz7wqlg5qm0OM8rrUGL/WQjdXQSFqz1OfaWdEc6P0tdmZ5SpG2ZoPZp6HY tN7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kS1h8p0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020aa79ecd000000b00667e17e30ddsi1095671pfq.339.2023.06.20.00.40.08; Tue, 20 Jun 2023 00:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kS1h8p0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbjFTHe4 (ORCPT + 99 others); Tue, 20 Jun 2023 03:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230252AbjFTHe2 (ORCPT ); Tue, 20 Jun 2023 03:34:28 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CFE5188; Tue, 20 Jun 2023 00:34:25 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35K5PpGW009732; Tue, 20 Jun 2023 07:33:32 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=2+FYJqvd8KPGLBxHJyZuzJMgY6Vqc6U1VDQqXT1I4S0=; b=kS1h8p0U+9Otp44mTrDOjTMhh/b0v9kx67ofv0cYSyikaA1oZzDwxIgonkwWMp0sAAZA fzcO4pfkcvOx6xBQQcq6qMNSflW8F8l5HgnuaKwQTG3DuSla3ev40qxgoZ4OpHiaS2Yn NyCDcBi6oI7ZoiQH/ZMh7u8Zx9J4AE6Neog0qkMN5WdV139yjHWcHiMJMuiUJx5mpeYf mrqC9Re9zF2fisBoqnmTJbqU1kT6+eBygdA4osEurtkb9LnrVMxeNyEkp3XS0Sx4UV90 udDvELqSJE5jVdBkZr2YmoD1zeV3NYn+rx91VDS9C6jMy0lV74XnCN0+vZ7R1meuIJdg CA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rarwes9y4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Jun 2023 07:33:32 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35K7XUTM000602 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Jun 2023 07:33:30 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.986.42; Tue, 20 Jun 2023 00:33:10 -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 v6 01/13] coresight-tpdm: Remove the unnecessary lock Date: Tue, 20 Jun 2023 15:32:29 +0800 Message-ID: <1687246361-23607-2-git-send-email-quic_taozha@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687246361-23607-1-git-send-email-quic_taozha@quicinc.com> References: <1687246361-23607-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-GUID: dUjUVHFAUIS7sAEQJCs2FAgw_b1dBeno X-Proofpoint-ORIG-GUID: dUjUVHFAUIS7sAEQJCs2FAgw_b1dBeno X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-20_04,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 malwarescore=0 bulkscore=0 phishscore=0 impostorscore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306200067 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769206525106456781?= X-GMAIL-MSGID: =?utf-8?q?1769206525106456781?= Remove the unnecessary lock "CS_{UN,}LOCK" in TPDM driver. This lock is only needed while writing the data to Coresight registers. Signed-off-by: Tao Zhang --- drivers/hwtracing/coresight/coresight-tpdm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c index f4854af..b645612 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -114,11 +114,9 @@ static void tpdm_init_default_data(struct tpdm_drvdata *drvdata) { u32 pidr; - CS_UNLOCK(drvdata->base); /* Get the datasets present on the TPDM. */ pidr = readl_relaxed(drvdata->base + CORESIGHT_PERIPHIDR0); drvdata->datasets |= pidr & GENMASK(TPDM_DATASETS - 1, 0); - CS_LOCK(drvdata->base); } /*