|
@@ -1888,10 +1888,7 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now)
|
|
|
userpg->cap_user_rdpmc = x86_pmu.attr_rdpmc;
|
|
|
userpg->pmc_width = x86_pmu.cntval_bits;
|
|
|
|
|
|
- if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
|
|
|
- return;
|
|
|
-
|
|
|
- if (!boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
|
|
|
+ if (!sched_clock_stable)
|
|
|
return;
|
|
|
|
|
|
userpg->cap_user_time = 1;
|
|
@@ -1899,10 +1896,8 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now)
|
|
|
userpg->time_shift = CYC2NS_SCALE_FACTOR;
|
|
|
userpg->time_offset = this_cpu_read(cyc2ns_offset) - now;
|
|
|
|
|
|
- if (sched_clock_stable && !check_tsc_disabled()) {
|
|
|
- userpg->cap_user_time_zero = 1;
|
|
|
- userpg->time_zero = this_cpu_read(cyc2ns_offset);
|
|
|
- }
|
|
|
+ userpg->cap_user_time_zero = 1;
|
|
|
+ userpg->time_zero = this_cpu_read(cyc2ns_offset);
|
|
|
}
|
|
|
|
|
|
/*
|