File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 13
13
#include <asm/sysreg.h>
14
14
#include <asm/virt.h>
15
15
16
+ #include <clocksource/arm_arch_timer.h>
17
+
16
18
#include <linux/acpi.h>
17
19
#include <linux/clocksource.h>
18
20
#include <linux/kvm_host.h>
@@ -1173,16 +1175,15 @@ void arch_perf_update_userpage(struct perf_event *event,
1173
1175
unsigned int seq ;
1174
1176
u64 ns ;
1175
1177
1176
- /*
1177
- * Internal timekeeping for enabled/running/stopped times
1178
- * is always computed with the sched_clock.
1179
- */
1180
- userpg -> cap_user_time = 1 ;
1181
- userpg -> cap_user_time_zero = 1 ;
1178
+ userpg -> cap_user_time = 0 ;
1179
+ userpg -> cap_user_time_zero = 0 ;
1182
1180
1183
1181
do {
1184
1182
rd = sched_clock_read_begin (& seq );
1185
1183
1184
+ if (rd -> read_sched_clock != arch_timer_read_counter )
1185
+ return ;
1186
+
1186
1187
userpg -> time_mult = rd -> mult ;
1187
1188
userpg -> time_shift = rd -> shift ;
1188
1189
userpg -> time_zero = rd -> epoch_ns ;
@@ -1212,4 +1213,10 @@ void arch_perf_update_userpage(struct perf_event *event,
1212
1213
userpg -> time_mult >>= 1 ;
1213
1214
}
1214
1215
1216
+ /*
1217
+ * Internal timekeeping for enabled/running/stopped times
1218
+ * is always computed with the sched_clock.
1219
+ */
1220
+ userpg -> cap_user_time = 1 ;
1221
+ userpg -> cap_user_time_zero = 1 ;
1215
1222
}
You can’t perform that action at this time.
0 commit comments