diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-11-08 14:01:14 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-11-08 14:01:14 +0000 |
commit | ca9dd3f79e91ee54220bf698a43a92186e48de16 (patch) | |
tree | 5cbaae6a533de6c210ed8f9f5e081c7e95ec7c9d /sys/arch | |
parent | 2fd2f8cb8a1247bd87c5d97896b80ae79155ec08 (diff) |
Move definitions for CNTV_CTL_EL0 to armreg.h.
ok mpi@, jsg@, phessler@, patrick@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm64/dev/aplintc.c | 7 | ||||
-rw-r--r-- | sys/arch/arm64/include/armreg.h | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/arm64/dev/aplintc.c b/sys/arch/arm64/dev/aplintc.c index d8c508b7e9d..01970a97ce0 100644 --- a/sys/arch/arm64/dev/aplintc.c +++ b/sys/arch/arm64/dev/aplintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplintc.c,v 1.15 2022/11/08 11:40:47 kettenis Exp $ */ +/* $OpenBSD: aplintc.c,v 1.16 2022/11/08 14:01:13 kettenis Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -22,6 +22,7 @@ #include <sys/malloc.h> #include <sys/systm.h> +#include <machine/armreg.h> #include <machine/bus.h> #include <machine/fdt.h> #include <machine/intr.h> @@ -39,10 +40,6 @@ #define APL_IPI_SR_EL1 s3_5_c15_c1_1 #define APL_IPI_SR_EL1_PENDING (1 << 0) -#define CNTV_CTL_ENABLE (1 << 0) -#define CNTV_CTL_IMASK (1 << 1) -#define CNTV_CTL_ISTATUS (1 << 2) - #define AIC_INFO 0x0004 #define AIC_INFO_NDIE(val) (((val) >> 24) & 0xf) #define AIC_INFO_NIRQ(val) ((val) & 0xffff) diff --git a/sys/arch/arm64/include/armreg.h b/sys/arch/arm64/include/armreg.h index edcfba1e6ed..1ddc4277d0d 100644 --- a/sys/arch/arm64/include/armreg.h +++ b/sys/arch/arm64/include/armreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: armreg.h,v 1.22 2022/10/04 19:36:20 kettenis Exp $ */ +/* $OpenBSD: armreg.h,v 1.23 2022/11/08 14:01:13 kettenis Exp $ */ /*- * Copyright (c) 2013, 2014 Andrew Turner * Copyright (c) 2015 The FreeBSD Foundation @@ -72,6 +72,11 @@ /* CNTKCTL_EL1 - Counter-timer Kernel Control Register */ #define CNTKCTL_EL0VCTEN (1 << 1) /* Allow EL0 virtual counter access */ +/* CNTV_CTL_EL0 */ +#define CNTV_CTL_ENABLE (1 << 0) +#define CNTV_CTL_IMASK (1 << 1) +#define CNTV_CTL_ISTATUS (1 << 2) + /* CPACR_EL1 */ #define CPACR_FPEN_MASK (0x3 << 20) #define CPACR_FPEN_TRAP_ALL1 (0x0 << 20) /* Traps from EL0 and EL1 */ |