Skip to content

Commit ce0d998

Browse files
ahunter6Peter Zijlstra
authored andcommitted
perf/x86/intel/pt: Fix sampling using single range output
Deal with errata TGL052, ADL037 and RPL017 "Trace May Contain Incorrect Data When Configured With Single Range Output Larger Than 4KB" by disabling single range output whenever larger than 4KB. Fixes: 6706384 ("perf/x86/intel/pt: Opportunistically use single range output mode") Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent baa014b commit ce0d998

File tree

1 file changed

+9
-0
lines changed
  • arch/x86/events/intel

1 file changed

+9
-0
lines changed

arch/x86/events/intel/pt.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,15 @@ static int pt_buffer_try_single(struct pt_buffer *buf, int nr_pages)
12631263
if (1 << order != nr_pages)
12641264
goto out;
12651265

1266+
/*
1267+
* Some processors cannot always support single range for more than
1268+
* 4KB - refer errata TGL052, ADL037 and RPL017. Future processors might
1269+
* also be affected, so for now rather than trying to keep track of
1270+
* which ones, just disable it for all.
1271+
*/
1272+
if (nr_pages > 1)
1273+
goto out;
1274+
12661275
buf->single = true;
12671276
buf->nr_pages = nr_pages;
12681277
ret = 0;

0 commit comments

Comments
 (0)