From 33e953b8f22436fff0f0a6e2b90d042aba1b7f06 Mon Sep 17 00:00:00 2001 From: Mao Jinlong Date: Thu, 27 Aug 2020 15:46:13 +0800 Subject: [PATCH] soc: jtagv8: Correct the sequence of restoring the etm registers TRCPROCSELR is the second register to restore instead of the first one. Correct the sequence to make the restore function work. Change-Id: Ic2b3bf936a4754d9eeed3318f4ff708b298ad4d5 Signed-off-by: Mao Jinlong --- drivers/soc/qcom/jtagv8-etm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/jtagv8-etm.c b/drivers/soc/qcom/jtagv8-etm.c index bd881ed5faf2..6fe8289c8bb4 100644 --- a/drivers/soc/qcom/jtagv8-etm.c +++ b/drivers/soc/qcom/jtagv8-etm.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. * */ @@ -416,7 +416,7 @@ static inline void etm_mm_restore_state(struct etm_ctx *etmdata) etm_os_lock(etmdata); } - if (!(etmdata->state[0] & BIT(0))) { + if (!(etmdata->state[i++] & BIT(0))) { etm_os_unlock(etmdata); break; }