File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,9 @@ int x86_add_exclusive(unsigned int what)
360
360
{
361
361
int i ;
362
362
363
+ if (x86_pmu .lbr_pt_coexist )
364
+ return 0 ;
365
+
363
366
if (!atomic_inc_not_zero (& x86_pmu .lbr_exclusive [what ])) {
364
367
mutex_lock (& pmc_reserve_mutex );
365
368
for (i = 0 ; i < ARRAY_SIZE (x86_pmu .lbr_exclusive ); i ++ ) {
@@ -380,6 +383,9 @@ int x86_add_exclusive(unsigned int what)
380
383
381
384
void x86_del_exclusive (unsigned int what )
382
385
{
386
+ if (x86_pmu .lbr_pt_coexist )
387
+ return ;
388
+
383
389
atomic_dec (& x86_pmu .lbr_exclusive [what ]);
384
390
atomic_dec (& active_events );
385
391
}
Original file line number Diff line number Diff line change @@ -3609,6 +3609,7 @@ __init int intel_pmu_init(void)
3609
3609
*/
3610
3610
x86_pmu .pebs_aliases = NULL ;
3611
3611
x86_pmu .pebs_prec_dist = true;
3612
+ x86_pmu .lbr_pt_coexist = true;
3612
3613
x86_pmu .flags |= PMU_FL_HAS_RSP_1 ;
3613
3614
pr_cont ("Goldmont events, " );
3614
3615
break ;
Original file line number Diff line number Diff line change @@ -601,6 +601,7 @@ struct x86_pmu {
601
601
u64 lbr_sel_mask ; /* LBR_SELECT valid bits */
602
602
const int * lbr_sel_map ; /* lbr_select mappings */
603
603
bool lbr_double_abort ; /* duplicated lbr aborts */
604
+ bool lbr_pt_coexist ; /* LBR may coexist with PT */
604
605
605
606
/*
606
607
* Intel PT/LBR/BTS are exclusive
You can’t perform that action at this time.
0 commit comments