diff options
Diffstat (limited to 'sys/arch/armv7/include/intr.h')
-rw-r--r-- | sys/arch/armv7/include/intr.h | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/sys/arch/armv7/include/intr.h b/sys/arch/armv7/include/intr.h index be2035aaca6..e08b4942927 100644 --- a/sys/arch/armv7/include/intr.h +++ b/sys/arch/armv7/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.11 2019/05/06 03:34:43 mlarkin Exp $ */ +/* $OpenBSD: intr.h,v 1.12 2019/09/29 10:36:52 kettenis Exp $ */ /* $NetBSD: intr.h,v 1.12 2003/06/16 20:00:59 thorpej Exp $ */ /* @@ -41,27 +41,29 @@ #ifdef _KERNEL -/* Interrupt priority "levels". */ +/* Interrupt priority `levels'; not mutually exclusive. */ #define IPL_NONE 0 /* nothing */ -#define IPL_SOFT 1 /* generic software interrupts */ -#define IPL_SOFTCLOCK 2 /* software clock interrupt */ -#define IPL_SOFTNET 3 /* software network interrupt */ -#define IPL_SOFTTTY 4 /* software serial interrupt */ +#define IPL_SOFT 1 /* soft interrupts */ +#define IPL_SOFTCLOCK 2 /* soft clock interrupts */ +#define IPL_SOFTNET 3 /* soft network interrupts */ +#define IPL_SOFTTTY 4 /* soft terminal interrupts */ #define IPL_BIO 5 /* block I/O */ #define IPL_NET 6 /* network */ -#define IPL_TTY 7 /* terminals */ +#define IPL_TTY 7 /* terminal */ #define IPL_VM 8 /* memory allocation */ -#define IPL_AUDIO 9 /* audio device */ -#define IPL_CLOCK 10 /* clock interrupt */ -#define IPL_STATCLOCK 11 /* statistics clock interrupt */ -#define IPL_SCHED 12 /* everything */ -#define IPL_HIGH 12 /* everything */ - -#define NIPL 13 - -/* Interrupt priority "flags". */ -#define IPL_MPSAFE 0 /* no "mpsafe" interrupts */ -#define IPL_MPFLOOR IPL_NONE /* no MP on armv7 */ +#define IPL_AUDIO 9 /* audio */ +#define IPL_CLOCK 10 /* clock */ +#define IPL_SCHED IPL_CLOCK +#define IPL_STATCLOCK IPL_CLOCK +#define IPL_HIGH 11 /* everything */ +#define IPL_IPI 12 /* interprocessor interrupt */ +#define NIPL 13 /* number of levels */ + +#define IPL_MPFLOOR IPL_TTY +/* Interrupt priority 'flags'. */ +#define IPL_IRQMASK 0xf /* priority only */ +#define IPL_FLAGMASK 0xf00 /* flags only*/ +#define IPL_MPSAFE 0x100 /* 'mpsafe' interrupt, no kernel lock */ /* Interrupt sharing types. */ #define IST_NONE 0 /* none */ @@ -69,11 +71,11 @@ #define IST_EDGE 2 /* edge-triggered */ #define IST_LEVEL 3 /* level-triggered */ -#define IST_LEVEL_LOW IST_LEVEL -#define IST_LEVEL_HIGH 4 -#define IST_EDGE_FALLING IST_EDGE -#define IST_EDGE_RISING 5 -#define IST_EDGE_BOTH 6 +#define IST_LEVEL_LOW IST_LEVEL +#define IST_LEVEL_HIGH 4 +#define IST_EDGE_FALLING IST_EDGE +#define IST_EDGE_RISING 5 +#define IST_EDGE_BOTH 6 #ifndef _LOCORE #include <sys/device.h> @@ -158,6 +160,7 @@ struct interrupt_controller { void (*ic_enable)(void *); void (*ic_disable)(void *); void (*ic_route)(void *, int, struct cpu_info *); + void (*ic_cpu_enable)(void); LIST_ENTRY(interrupt_controller) ic_list; uint32_t ic_phandle; @@ -178,11 +181,18 @@ void arm_intr_disestablish_fdt(void *); void arm_intr_enable(void *); void arm_intr_disable(void *); void arm_intr_route(void *, int, struct cpu_info *); +void arm_intr_cpu_enable(void); void *arm_intr_parent_establish_fdt(void *, int *, int, int (*)(void *), void *, char *); void arm_intr_parent_disestablish_fdt(void *); +void arm_send_ipi(struct cpu_info *, int); +extern void (*intr_send_ipi_func)(struct cpu_info *, int); + +#define ARM_IPI_NOP 0 +#define ARM_IPI_DDB 1 + #ifdef DIAGNOSTIC /* * Although this function is implemented in MI code, it must be in this MD |