Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334638

[PATCH 06/20] intel_th: msu: Fix offset for wrapped block

From Alexander Shishkin <alexander.shishkin@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH 06/20] intel_th: msu: Fix offset for wrapped block
Date 2016-02-15 18:20 +0100
Message-ID <r2uYA-41S-57@gated-at.bofh.it> (permalink)
References <r2uvw-3zL-21@gated-at.bofh.it> <r2uYx-41S-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Laurent FERT <laurent.fert@intel.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@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[git pull] stm class/intel_th: Updates for char-misc-next Alexander Shishkin <alexander.shishkin@intel.com> - 2016-02-15 17:10 +0100
  Re: [git pull] stm class/intel_th: Updates for char-misc-next Greg KH <gregkh@linuxfoundation.org> - 2016-02-15 17:50 +0100
    [PATCH 07/20] intel_th: msu: Release resources on read error Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
    [PATCH 10/20] intel_th: Use real device index in the node names Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
    [PATCH 08/20] intel_th: sth: Sanitize packet callback's return values Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
    [PATCH 20/20] stm class: dummy_stm: Add link callback for fault injection Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
    [PATCH 00/20] stm class/intel_th: Updates for char-misc-next Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 12/20] stm class: Support devices with multiple instances Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 11/20] stm class: Use driver's packet callback return value Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 01/20] stm class: Use a signed return type for stm_find_master_chan Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 14/20] stm class: Add heartbeat stm source device Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 09/20] intel_th: Set root device's drvdata early Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 18/20] stm class: Fix a race in unlinking Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 13/20] stm class: dummy_stm: Create multiple devices Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 19/20] stm class: Plug stm device's unlink callback Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 04/20] intel_th: gth: Remove commented-out code Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 03/20] intel_th: Depend on HAS_IOMEM Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 15/20] stm class: Fix unlocking braino in the error path Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 16/20] stm class: Guard output assignment against concurrency Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 17/20] stm class: Fix unbalanced module/device refcounting Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 05/20] intel_th: Update scratchpad bits according to enabled output activity Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 06/20] intel_th: msu: Fix offset for wrapped block Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
      [PATCH 02/20] stm class: Fix master deallocation in device unregistering Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-15 18:20 +0100
    Re: [git pull] stm class/intel_th: Updates for char-misc-next Alexander Shishkin <alexander.shishkin@linux.intel.com> - 2016-02-16 13:30 +0100

csiph-web