Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2946219pxk; Mon, 28 Sep 2020 04:39:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIsMaittOj4x6oge2KiW1gYp8VpkQ2kXCaev5vJ+rHMk2/Z3ADHdO7nFZYIDTd1x+U3ugE X-Received: by 2002:a17:906:abc5:: with SMTP id kq5mr1173517ejb.284.1601293180620; Mon, 28 Sep 2020 04:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601293180; cv=none; d=google.com; s=arc-20160816; b=vCKbUQT5nhcIi38IXWtRgqx4BSQJywSx0miMx5/EKJUyC0OOfDn37eVTE28Vs/aZb+ KsoVQsyvdXBqumQOXVHROCngBLoTMYK/IuyBfWsAhUFEfrtYUAFFkJ+Ici4sdvVdqE5j oEnfl1V+q1uUC9Moy5C2wjfqeVQPyQj3ILUqvtRe06BJIOFZ4SYsPdQ+iT5HeWTbPlq2 AuyC/457eNnlOUwxrYvFFoKoKYvnMg2SMEanyaDArx3+456delW75u83qI+8qC6rhv8d /3W6TfJrrRtDybQtVJXtg0rf+XbxMyu37hJ1Xo4FRlw8yERbmlz7jhXA5EbHp0jrXHlW 1Fpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:sender:dkim-signature; bh=HtyanNG6hEeZvhgA5eqgIt4/bt21T19irBZrb+nidcM=; b=H0urIMrRFscfgr7Xh8vd5uljIxt8GzU6CuJqgWmP7ePSlZSlbT/iXg1/7MA83GHaQb 76LyyawrUsahWFPR28WV9LJWlzhGgopBJps5EbKpi3qonEmrafy3RAA4xC3Aw/ZKjO/J znxQxUdBgH2TowyBPD7EhPRqPYO/5xIZvKeJW0eduKPH5kjo7MljvrIhsfyB8E2dzZNk DlGCmb4pfwmv2KpXssqBn1KFjljSAlfM8cqjXmNZYr9aD4wMpkILF4XI2dAPAN0vu0rq grkCRmZi/QBGl1lt8IaYR3uokxi0XNXiyp+pofqu6ClQKj531j3Lb0of+wlOIIEucXxc O+jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=TiKhy4Ro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si421920edp.276.2020.09.28.04.39.18; Mon, 28 Sep 2020 04:39:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=TiKhy4Ro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbgI1LiY (ORCPT + 99 others); Mon, 28 Sep 2020 07:38:24 -0400 Received: from m42-4.mailgun.net ([69.72.42.4]:51241 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbgI1LiX (ORCPT ); Mon, 28 Sep 2020 07:38:23 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1601293103; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=HtyanNG6hEeZvhgA5eqgIt4/bt21T19irBZrb+nidcM=; b=TiKhy4RoiJ/8PBU2fVVkPFLwvy9FNf5D6dzDQjr9KcgM2L+54o0KQumXKr7clKQOZuVjgkbd uoZUMHbicCb7x842A/Mhxb+HMskW7xWmJvzuuLtI5zoXJsJH2mEbw4ADtodoISGIevYwsh5C 8hO6FcbSOp3hJIflG5+jPPduJMM= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 5f71cb01557d03a9f4acd846 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 28 Sep 2020 11:37:37 GMT Sender: saiprakash.ranjan=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 6AC72C43395; Mon, 28 Sep 2020 11:37:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 047CFC433CA; Mon, 28 Sep 2020 11:37:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 047CFC433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Mathieu Poirier , Suzuki K Poulose , Mike Leach Cc: coresight@lists.linaro.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, peterz@infradead.org, Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sai Prakash Ranjan Subject: [PATCHv2 2/2] coresight: etm4x: Fix save and restore of TRCVMIDCCTLR1 register Date: Mon, 28 Sep 2020 17:07:09 +0530 Message-Id: <011321608e06db0a2797d3a0418b81c75438c571.1601292571.git.saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states"), mistakenly TRCVMIDCCTLR1 register value was saved in trcvmidcctlr0 state variable which is used to store TRCVMIDCCTLR0 register value in etm4x_cpu_save() and then same value is written back to both TRCVMIDCCTLR0 and TRCVMIDCCTLR1 in etm4x_cpu_restore(). There is already a trcvmidcctlr1 state variable available for TRCVMIDCCTLR1, so use it. Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states") Reviewed-by: Suzuki K Poulose Signed-off-by: Sai Prakash Ranjan --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index de76d57850bc..abd706b216ac 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -1243,7 +1243,7 @@ static int etm4_cpu_save(struct etmv4_drvdata *drvdata) state->trccidcctlr1 = readl(drvdata->base + TRCCIDCCTLR1); state->trcvmidcctlr0 = readl(drvdata->base + TRCVMIDCCTLR0); - state->trcvmidcctlr0 = readl(drvdata->base + TRCVMIDCCTLR1); + state->trcvmidcctlr1 = readl(drvdata->base + TRCVMIDCCTLR1); state->trcclaimset = readl(drvdata->base + TRCCLAIMCLR); @@ -1353,7 +1353,7 @@ static void etm4_cpu_restore(struct etmv4_drvdata *drvdata) writel_relaxed(state->trccidcctlr1, drvdata->base + TRCCIDCCTLR1); writel_relaxed(state->trcvmidcctlr0, drvdata->base + TRCVMIDCCTLR0); - writel_relaxed(state->trcvmidcctlr0, drvdata->base + TRCVMIDCCTLR1); + writel_relaxed(state->trcvmidcctlr1, drvdata->base + TRCVMIDCCTLR1); writel_relaxed(state->trcclaimset, drvdata->base + TRCCLAIMSET); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation