From 2e2d2d466a0fe85d09f9d881565169e2bc07ed8a Mon Sep 17 00:00:00 2001 From: Alexander Shishkin Date: Sat, 11 Sep 2021 12:14:13 +0800 Subject: [PATCH] intel_th: msu: Correct the block wrap detection mainline inclusion from mainline-v5.2-rc1 commit 4840572d3d7e66d7b55d3fc3b0f52711fd172eb8 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I47H3V CVE: NA -------------------------------- In multi window mode the MSU will set "window wrap" bit to indicate block wrapping as well. Take this into account when checking data blocks. Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jackie Liu Signed-off-by: Zheng Zengkai Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- drivers/hwtracing/intel_th/msu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/intel_th/msu.h b/drivers/hwtracing/intel_th/msu.h index e8cb819a3804..574c16004cb2 100644 --- a/drivers/hwtracing/intel_th/msu.h +++ b/drivers/hwtracing/intel_th/msu.h @@ -95,7 +95,7 @@ static inline unsigned long msc_data_sz(struct msc_block_desc *bdesc) static inline bool msc_block_wrapped(struct msc_block_desc *bdesc) { - if (bdesc->hw_tag & MSC_HW_TAG_BLOCKWRAP) + if (bdesc->hw_tag & (MSC_HW_TAG_BLOCKWRAP | MSC_HW_TAG_WINWRAP)) return true; return false; -- GitLab