diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2023-03-10 12:43:59 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2023-03-14 10:37:36 +0000 |
commit | 93d574ea957decec1c95dea9bfa8bc72457cc60d (patch) | |
tree | 155ba7d9c93edba2b3d0a88f07daae60d41e6dcc /sys | |
parent | ae60314c9467012abb23cf22249c6522d2ca1d91 (diff) | |
download | src-93d574ea957decec1c95dea9bfa8bc72457cc60d.tar.gz src-93d574ea957decec1c95dea9bfa8bc72457cc60d.zip |
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/arm/generic_timer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 5d694e8e9660..0b48841c9960 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -270,13 +270,12 @@ setup_user_access(void *arg __unused) cntkctl = get_el1(cntkctl); cntkctl &= ~(GT_CNTKCTL_PL0PTEN | GT_CNTKCTL_PL0VTEN | - GT_CNTKCTL_EVNTEN); + GT_CNTKCTL_EVNTEN | GT_CNTKCTL_PL0PCTEN); + /* Always enable the virtual timer */ + cntkctl |= GT_CNTKCTL_PL0VCTEN; + /* Enable the physical timer if supported */ if (arm_tmr_sc->physical) { cntkctl |= GT_CNTKCTL_PL0PCTEN; - cntkctl &= ~GT_CNTKCTL_PL0VCTEN; - } else { - cntkctl |= GT_CNTKCTL_PL0VCTEN; - cntkctl &= ~GT_CNTKCTL_PL0PCTEN; } set_el1(cntkctl, cntkctl); isb(); |