From: Laurent FERT Date: Mon, 15 Feb 2016 17:11:56 +0000 (+0200) Subject: intel_th: msu: Fix offset for wrapped block X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4eca2a1c71fda33cd8b5aacc7744176e440f80d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git intel_th: msu: Fix offset for wrapped block 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 Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 70ca27e45602..3c793bbf6ab2 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; }