File tree 1 file changed +8
-4
lines changed
opal/include/opal/sys/arm64 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change
1
+ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
1
2
/*
2
3
* Copyright (c) 2008 The University of Tennessee and The University
3
4
* of Tennessee Research Foundation. All rights
4
5
* reserved.
5
6
* Copyright (c) 2016 Broadcom Limited. All rights reserved.
7
+ * Copyright (c) 2016 Los Alamos National Security, LLC. All rights
8
+ * reserved.
6
9
* $COPYRIGHT$
7
10
*
8
11
* Additional copyrights may follow
@@ -22,7 +25,8 @@ opal_sys_timer_get_cycles(void)
22
25
{
23
26
opal_timer_t ret ;
24
27
25
- __asm__ __volatile__ ("mrs %0, CNTVCT_EL0" : "=r" (ret ));
28
+ __asm__ __volatile__ ("isb" ::: "memory" );
29
+ __asm__ __volatile__ ("mrs %0, CNTVCT_EL0" : "=r" (ret ));
26
30
27
31
return ret ;
28
32
}
@@ -31,9 +35,9 @@ opal_sys_timer_get_cycles(void)
31
35
static inline opal_timer_t
32
36
opal_sys_timer_freq (void )
33
37
{
34
- opal_timer_t freq ;
35
- __asm__ __volatile__ ("mrs %0, CNTFRQ_EL0" : "=r" (freq ));
36
- return (opal_timer_t )(freq );
38
+ opal_timer_t freq ;
39
+ __asm__ __volatile__ ("mrs %0, CNTFRQ_EL0" : "=r" (freq ));
40
+ return (opal_timer_t )(freq );
37
41
}
38
42
39
43
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
You can’t perform that action at this time.
0 commit comments