Index: sys/arch/arm/cortex/gtmr.c =================================================================== RCS file: /cvsroot/src/sys/arch/arm/cortex/gtmr.c,v retrieving revision 1.35 diff -u -p -r1.35 gtmr.c --- sys/arch/arm/cortex/gtmr.c 16 Sep 2018 13:21:36 -0000 1.35 +++ sys/arch/arm/cortex/gtmr.c 30 Sep 2018 10:04:20 -0000 @@ -120,12 +120,6 @@ gtmr_attach(device_t parent, device_t se aprint_debug_dev(self, "enabling Allwinner A64 timer workaround\n"); } - /* - * Enable the virtual counter to be accessed from usermode. - */ - gtmr_cntk_ctl_write(gtmr_cntk_ctl_read() | - CNTKCTL_PL0VCTEN | CNTKCTL_PL0PCTEN); - self->dv_private = sc; sc->sc_dev = self; @@ -195,6 +189,12 @@ gtmr_init_cpu_clock(struct cpu_info *ci) int s = splsched(); /* + * Enable the virtual counter to be accessed from usermode. + */ + gtmr_cntk_ctl_write(gtmr_cntk_ctl_read() | + CNTKCTL_PL0VCTEN | CNTKCTL_PL0PCTEN); + + /* * enable timer and stop masking the timer. */ gtmr_cntv_ctl_write(CNTCTL_ENABLE);