Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2400777lqp; Sun, 24 Mar 2024 17:56:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXdKN77jYcJoqBO1/Dz87DfSOKPYkvVxrvcAJlyodWCf9sLgI1MPQywFFPt5z1q//qEuNahztSc7AvTxjcVclsTz6ytLmWamzrUB2hRuQ== X-Google-Smtp-Source: AGHT+IH5Nw/BrwvSHFo/i8eu1KiLgURw/nSGFWMcDHlh7zzTPcKKtvIg7sFIEC0MYsFGL7T3uZuB X-Received: by 2002:a17:90a:cc08:b0:2a0:46b5:463c with SMTP id b8-20020a17090acc0800b002a046b5463cmr7683371pju.18.1711328164370; Sun, 24 Mar 2024 17:56:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328164; cv=pass; d=google.com; s=arc-20160816; b=KLmYBzC0Er04tuBbma9A42DLD0utec96HbixLpH38tPmnIbbnoBg1++Zwp/Dacs8v/ Rwbr80rH7hyaeTCiIPJnxYEwS99QrFb/JLIV0xuAeSLqYoekpeWjkP6N3oLHEbiBBbwG VM2/tmFDeihegqrePgDRm/Vr9HGokkFZOFGOp5xB7GySL7/lSs0468T+hEZmFWzmcYEn MAvy0LJ4LkdiXb36VQPFG8UfWIG2RcK2P1IVrqruTyMnfMeKk793vDyI4LkbMRn6mLdl WP/7Frr4+0mQ7Q0ygIaHSofrqxnWfCpdSKc13zmcCEmS42iHrwFRLn+e43FB10E8RWQx 3uuQ== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=I7h3Q6RG+fiAiGSkh5dI7JeeV6WCG1g1lSJNOq7yH3w=; fh=oPmJw4eILkPxeEOTLmGXWb7CsWCXQzbnjNybB2Z4ZM4=; b=VRmA5YodeFsumnF6mt0rewrVo/bHKMAvxlVMSbMyilS4x9Hp472sNaBLqCpyxWYrMQ gkhIToIsUdXOpPzwX77883EgtJ8/eDvFfxakFrVa0MU1M64K0vWvj79kM7USPoaGkAd8 SJN6HX0nQSuUd6YmBB+PzUaryi7hJz28Ee587kEQ3z/RGaGL53YlHm3XXorD0A3wr1QT JJVBWt06siIndl5Yyw4goQ6+4+HgDEa/ys98Rk/pn+VYawR2dcAgX5F/eioMMG5BwfDj QUsXK/1BDqBGMyNb+xZ/NGcmUNzkDaq6849oDb2RjGDi4Cq1DQnrZoC6ec6Ry0tHkmF0 1u+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D5XQDGLT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u17-20020a17090abb1100b0029bc84dea9csi10227753pjr.5.2024.03.24.17.56.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D5XQDGLT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113508-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113508-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EE654283914 for ; Mon, 25 Mar 2024 00:53:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21CBF1BB740; Sun, 24 Mar 2024 22:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D5XQDGLT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3C0C91BB722; Sun, 24 Mar 2024 22:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320310; cv=none; b=T9KwYs+B+PT1maKUi6Dhgy3I14CFU+S8QHfRZQRvKGKXRTMVokbbwXIw5ACkpw9pXRgKyr2fDm1NigYGW06r0fAxYuQ+LONuiJVzXOkkJMpXGmOb+VDF9a8xvKYWso82TGbd3D6qWLJovkzyXVYd9SsV0bUTiNtJ8gno6XgkZ7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320310; c=relaxed/simple; bh=w4FsLlM85Wl0SqW7LTrVCNiV7Q59gaipye9gyE/smGs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ecsq8YvViIbCR9KXibjSBxSSP3HBe0WRxZHQhMjREXaP+AEleg1ONX2iKUgSF6SEYmArA+Ea5rRFlN7eT3LBAgiBchKfOMpA2/yDDktJD6YOvzEdpiob85s38qbYFy7U/VmjJl8/MOKicJBVYdemKOvyq9Pl33ahaBrjGRyfG+M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D5XQDGLT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3598C43394; Sun, 24 Mar 2024 22:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320309; bh=w4FsLlM85Wl0SqW7LTrVCNiV7Q59gaipye9gyE/smGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5XQDGLTEFXdPRCBoUbmtxzsVmcz5cytjWqXRJkvpxDrA/ZfsXAYMz9ogq70rIkTu 2n+xBQhTx7NdwHEJqVT1W1UbvzcatmNZ88D0tR2C7jZCBBHDMLbZCdt1Is9uOubGcA g0Fqv8n+yIbb6pozTduRIbbJ5YowiWqvd81bCyQ196LHpXo/uf4wSPJD3lsGSQUt7a xtX84o1jk60rXXl5D9fhn9TGpsBnUlkTedco9urWVQ1ioP6EiuhkFMluYkS5a8KoHh 03IzqB86hUyjMm/gbOUkcDpdJRkkH1Z/Nm+Z707eh8BnnpBbgfTULqw+3+qlYPi0N5 YDCqZxYWm6NEg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mao Jinlong , Suzuki K Poulose , Sasha Levin Subject: [PATCH 6.8 617/715] coresight: etm4x: Set skip_power_up in etm4_init_arch_data function Date: Sun, 24 Mar 2024 18:33:16 -0400 Message-ID: <20240324223455.1342824-618-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Mao Jinlong [ Upstream commit 1bbe0a247e5d72f723daeecf41596bfa99e199f1 ] 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. Fixes: 5214b563588e ("coresight: etm4x: Add support for sysreg only devices") Signed-off-by: Mao Jinlong Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20240131105423.9519-1-quic_jinlmao@quicinc.com Signed-off-by: Sasha Levin --- 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 ce1995a2827f0..2e2cabc5f50ab 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.43.0