perf/x86/intel: Cast u64 variable
Subsystems (2)
PATCH 1/1 perf/x86/intel: Cast u64 variable
Casting (1 >> bit) to u64 before it is compared with pebs_status variable.
Fixes 21509084f999 perf/x86/intel: Handle multiple records in the PEBS buffer
Signed-off-by Ragavendra Nagraj <[email protected]>
--- arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/ds.c +1 -1
@@ -2072,7 +2072,7 @@ get_next_pebs_record_by_bit(void *base, void *top, int bit)/* clear non-PEBS bit and re-check */ pebs_status = status & cpuc->pebs_enabled; pebs_status &=PEBS_COUNTER_MASK ; -if (pebs_status == (1 << bit)) +if (pebs_status == (u64) (1 << bit))return at; } }
Signature · 1 line
2.46.1
Peter Zijlstra
maintainerQuoted 1 line · Ragavendra
Casting (1 >> bit) to u64 before it is compared with
pebs_statusvariable.
I don't think this does what you want it to.
Quoted 22 lines
Fixes 21509084f999 perf/x86/intel: Handle multiple records in the PEBS bufferSigned-off-by Ragavendra Nagraj <[email protected]>--- arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/events/intel/ds.c +1
-1@@ -2072,7 +2072,7 @@ get_next_pebs_record_by_bit(void *base, void *top, int bit)/* clear non-PEBS bit and re-check */ pebs_status = status & cpuc->pebs_enabled; pebs_status &=PEBS_COUNTER_MASK ; -if (pebs_status == (1 << bit)) +if (pebs_status == (u64) (1 << bit))return at; } }Signature · 1 line
2.46.1