Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1574027rdb; Wed, 31 Jan 2024 02:55:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1eF8ypztp7yznFyTj7s5AS9ghxLRnQWFbcNfaYv1TGHBbM6NdpWOd0snhnHgOKnE4UbLf X-Received: by 2002:a17:906:e215:b0:a2d:79b6:bbea with SMTP id gf21-20020a170906e21500b00a2d79b6bbeamr907447ejb.64.1706698503427; Wed, 31 Jan 2024 02:55:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706698503; cv=pass; d=google.com; s=arc-20160816; b=y+clNwKJdBqMzt20bp5t9CBkNZGZlmFBwbVEcz7pW9jscfGKExjcUH6EY3Oj9oYnNr SGzkpyVqpwiFKucijtG3ElhMLZuMjVt031LHcpk6qiWMZEKP8l7twNSNpNRhOkrzEZ1U j1IDNTi3jqK2xCI0kzTgF7cbDbzzVE7C0hkcmCBECFAbIJWG1qSWL2uA3lhKYAOUAzRR U1DnfUjRuvtNfPERPGRo9qKKupQ6ECMw6cDQ0Jca033FmLuM7wmibEqilPJ4JTpaRscr cbGfNCj7bBmz38GhTqAT3C/3/E0eY5QGhznqPApI9+4zcLpso12I/AAzljIrL5kXOgqy ABWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=HToiBboTPz8qsLgu36/sThc02qvHG2OfSEjYxlrcBnw=; fh=qgn4UG/Ca/d3r/xypq5IUf/quTa9GpjkOodqt+zWEkU=; b=fXyAf/wXZXDcyGUVcyzUxLck+DFvsTE7/FDnkv8cSwCrNgTZkNZ4Gk1+ziX6EQcTNT exwsGhaVnKSwsTMEDY6R8tZnT+CY1v0x1W+xGV35uS114p8fdXcxHSHF5aKSc/TNhgLY gKnm147zMQCuESzLLHdxBdRYLIFOM7o6WOPWBgZdq/G4MG6bLXjwEX9y22n40LTBIxuX x1CdAznd0HEKg44L9x7ZfEwlCbAQucud63lKpnkk1DjQ9xMIW+vh3Dn2fA8uioxdWbRd URa0Uk+eEOajVA4tWCIM/ZTfpZGGcFEBqqIYQ+gvXjmgruhxO2JOgf9zOYA5O4kZxIgt 7cAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LDO5e3RP; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-46270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCVLLUlMJmtI5hMO46oFA/YLQ5P98zgCaldSZ7C0S2LOHHOpwfDBjLY1yrYdkBRNduFkkGmE/TkySWmrddwnp2Uukb3lGo8k48RouzYyRA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q5-20020a1709066b0500b00a3554080d78si4055278ejr.220.2024.01.31.02.55.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:55:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LDO5e3RP; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-46270-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46270-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3057A1F21876 for ; Wed, 31 Jan 2024 10:55:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8DDE79DC2; Wed, 31 Jan 2024 10:54:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="LDO5e3RP" 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 DAE3A79DA0; Wed, 31 Jan 2024 10:54:47 +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=1706698489; cv=none; b=R1CyNhRpBohhEFKYr7Fi5uICSCUxhlDh2MvzzTt8MV8wpKY2ZYGC4x2nCOOJAHYj0tEnV5r71CYfnJirXslrnHV3msyu+oeO+kF6NDX86tNFSrd7W4E7N16tXqc+dbg3Shk9dAy5KHWu9VTR5VIipzAEestnSF56BWRXkBab/rg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698489; c=relaxed/simple; bh=YLkcq6jiBnvYDa/H00/UfL/H4AabT4B9uq79/aSn2cQ=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=supa2JgRIsINRtECXiwRznI0zpK+wezmWFRZAgCwhGijhQKd7ykXrrDepGGJKTZKAm1S7dpQHby7NITDD2HZ6PgG4JPim4ufXp/aR0GO+Dz9310RxO+6k6k6N6r2Fqp2O6o3IjQD1o4hDfJ61sAYhwpttNKhuusZvdgDqdTUh6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=LDO5e3RP; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40V8OBJZ000684; Wed, 31 Jan 2024 10:54:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=HToiBbo TPz8qsLgu36/sThc02qvHG2OfSEjYxlrcBnw=; b=LDO5e3RPzTGvYEuIrO+4827 PYqSPdd20WrhpOgydVFzeAdGUrtUx8SvCP4AuNBQ1qOogX0O+d3yx2Rtm45IQaWf lbygjix/2IHvxW7PwT8Loa9PTN+pBxv1l8TyqW+qwIobNg/EDSjTOvbqRvptsYqb Qn6jUxHXVZPx4vqatjWCNynrMnFaRrCog3bbMmT8bypBf3cbKFjPkp/LsUmCZk0a ayTHdVVssbVGxy8R+eJB8FR68x5azkcjDND9RKaoslb4Bw6g0xuEjWBSKupIY8FT PddkNBCtLivNy/KJO61AGqcENp5xtIdexFStfPbQTHcGH3vzBihZebls2k0YO3w= = Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vyj148e2c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 10:54:35 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40VAsYZO025666 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jan 2024 10:54:34 GMT Received: from hu-jinlmao-lv.qualcomm.com (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 31 Jan 2024 02:54:33 -0800 From: Mao Jinlong To: Suzuki K Poulose , Mike Leach , James Clark , "Alexander Shishkin" CC: Mao Jinlong , , , , Subject: [PATCH] coresight: etm4x: Set skip_power_up in etm4_init_arch_data function Date: Wed, 31 Jan 2024 02:54:19 -0800 Message-ID: <20240131105423.9519-1-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: _SGaNrBWGboyoFvlHVjteLMJt-EAtZ3R X-Proofpoint-ORIG-GUID: _SGaNrBWGboyoFvlHVjteLMJt-EAtZ3R X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-31_05,2024-01-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 bulkscore=0 adultscore=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxlogscore=999 spamscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401310081 skip_power_up is used in etm4_init_arch_data when set lpoverride. So need to set the value of it before calling using it. Signed-off-by: Mao Jinlong --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index c5ea808ea662..8afc07d1dd23 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -1200,6 +1200,7 @@ static void etm4_init_arch_data(void *info) struct etm4_init_arg *init_arg = info; struct etmv4_drvdata *drvdata; struct csdev_access *csa; + struct device *dev = init_arg->dev; int i; drvdata = dev_get_drvdata(init_arg->dev); @@ -1213,6 +1214,10 @@ static void etm4_init_arch_data(void *info) if (!etm4_init_csdev_access(drvdata, csa)) return; + if (!csa->io_mem || + fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up")) + drvdata->skip_power_up = true; + /* Detect the support for OS Lock before we actually use it */ etm_detect_os_lock(drvdata, csa); @@ -2040,11 +2045,6 @@ static int etm4_add_coresight_dev(struct etm4_init_arg *init_arg) if (!drvdata->arch) return -EINVAL; - /* TRCPDCR is not accessible with system instructions. */ - if (!desc.access.io_mem || - fwnode_property_present(dev_fwnode(dev), "qcom,skip-power-up")) - drvdata->skip_power_up = true; - major = ETM_ARCH_MAJOR_VERSION(drvdata->arch); minor = ETM_ARCH_MINOR_VERSION(drvdata->arch); -- 2.41.0