Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp280006pxx; Wed, 28 Oct 2020 04:54:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFjuEaX7jzG2jv8mRslvz4Y91Afu3rGRhZ0jCGGyozBOA7xoNZ+s3bd67/xjx2Xrm+osaW X-Received: by 2002:a17:906:34c3:: with SMTP id h3mr7126318ejb.132.1603886052343; Wed, 28 Oct 2020 04:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603886052; cv=none; d=google.com; s=arc-20160816; b=Eh/y2pLlR1zltf5uqMvjazKBJ+s8vu2+U3znoPiMsAAy96g0VR5JE6fl16yiBVk8Kj 16y9h8nAFrpVGgZWm5ReKlSakcBZklqcwiYK+tGpNYWMj2Je3DaagLBjEaLowJW2/Faw jwGD7z1fD6p7YCRcEyY/OMeU2xrNFnDpHN+If4GX+Plzmsds/oIkAcwHmTvlN3lN7r2+ eexvef8mpUQ8pxlgolMyhrajXW+MXA6MeDJgtlHm/XM2Jkx3xuJjdLLfALk8OfaZb5Xo tlGIcPkmicAMmHmg6RDhYG1Xuwe+qWmxtBe90YWmCUhzaCJQy2iIKk/dho7W2p/VWsey c/og== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zgW9A91MbcWR7fecJf7F1HMXh2maQvCdKVnMdPWWwY0=; b=MyRJUhreQvBQJB72CT6mQ7LZbDsPpM/srUQzQAbcVWRN0xX9vec+o0NuwXLkN864M4 BT9bbhcmryYoVn9YI8dQUDOcZusTwUvn7jXIjH+QzSKYmSA1PLY6kKJOwadOFk+zFUot 7xRUP50aPcaR049BXFQL7GbrNxJ8WdlSHCtgCt/o9PENeVYVkyYTT65tqEkDZrgFrXvG uOyRBsM9px8lk7qdfCQNps7k/Wl1LhoxxOcuZBISvDGzBWtStB85kWunFs8FOzhfgCh5 CMAHASuVjoOOIP5bf7gw6/PlAgjHySlOdNwv9GjUlbSej1Pp5+4GGwll99H7kDMX0/CZ 3ZUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vt2b2KvE; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk22si2709939edb.258.2020.10.28.04.53.50; Wed, 28 Oct 2020 04:54:12 -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=@kernel.org header.s=default header.b=vt2b2KvE; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1794748AbgJ0PNV (ORCPT + 99 others); Tue, 27 Oct 2020 11:13:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:36334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1789426AbgJ0PCM (ORCPT ); Tue, 27 Oct 2020 11:02:12 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D78620715; Tue, 27 Oct 2020 15:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810931; bh=lZE+UNIZcFc2Co4R7eO1u5OeQcue2NH2ygHCDCoJ9js=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vt2b2KvE8/VgxLKHkVFMmQ2TnWulQvTdXyV+kTIFwqElvRq8+vsLoyEKwyzSvfWiJ 2IVWd648G6qS6v8J/ndxgQ8Oyu3H3WqD3KbD+sDdo4gFjfKtK2aTd4Zk6o/odOsnqJ FpkZnOjI85GsUBg7Zd8ZTdrOxx9KdYdeWwm92xQY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suzuki K Poulose , Sai Prakash Ranjan , Mathieu Poirier , Sasha Levin Subject: [PATCH 5.8 283/633] coresight: etm4x: Fix save and restore of TRCVMIDCCTLR1 register Date: Tue, 27 Oct 2020 14:50:26 +0100 Message-Id: <20201027135535.955208020@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sai Prakash Ranjan [ Upstream commit 3477326277451000bc667dfcc4fd0774c039184c ] 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 Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-26-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/hwtracing/coresight/coresight-etm4x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index d6395aeffd99d..d4e74b03c1e0f 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -1233,7 +1233,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); @@ -1343,7 +1343,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); -- 2.25.1