[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455296435-17362-6-git-send-email-alexander.shishkin@linux.intel.com>
Date: Fri, 12 Feb 2016 19:00:21 +0200
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Greg KH <greg@...ah.com>
Cc: Mathieu Poirier <mathieu.poirier@...aro.org>,
Chunyan Zhang <zhang.chunyan@...aro.org>,
laurent.fert@...el.com, yann.fouassier@...el.com,
linux-kernel@...r.kernel.org,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: [QUEUED v20160212 05/19] intel_th: msu: Fix offset for wrapped block
From: Laurent FERT <laurent.fert@...el.com>
Fix offset for the second pass on the wrapped block when iterating over
memory in multi-block mode, otherwise wrong part of the block will get
copied.
Signed-off-by: Laurent FERT <laurent.fert@...el.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
---
drivers/hwtracing/intel_th/msu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 70ca27e456..3c793bbf6a 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -408,7 +408,7 @@ msc_buffer_iterate(struct msc_iter *iter, size_t size, void *data,
* Second time (wrap_count==1), it's just like any other block,
* containing data in the range of [MSC_BDESC..data_bytes].
*/
- if (iter->block == iter->start_block && iter->wrap_count) {
+ if (iter->block == iter->start_block && iter->wrap_count == 2) {
tocopy = DATA_IN_PAGE - data_bytes;
src += data_bytes;
}
--
2.7.0
Powered by blists - more mailing lists