diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-03-08 08:48:03 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2017-03-08 08:48:03 +0000 |
commit | fe2591891e1899c993e332ff49b1d92bb3f1a45f (patch) | |
tree | ad684f57612d2e64b7cdec2998a81f44da684b8a /sys | |
parent | 2b9ee094c979708beb7ef321a14cf3a97289b9df (diff) |
Establish API to route interrupts to specific CPU cores.
Based on and ok drahn@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm64/arm64/intr.c | 12 | ||||
-rw-r--r-- | sys/arch/arm64/include/intr.h | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/arch/arm64/arm64/intr.c b/sys/arch/arm64/arm64/intr.c index 53ab09c2266..b369d7a3431 100644 --- a/sys/arch/arm64/arm64/intr.c +++ b/sys/arch/arm64/arm64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.5 2017/02/25 16:53:09 patrick Exp $ */ +/* $OpenBSD: intr.c,v 1.6 2017/03/08 08:48:02 patrick Exp $ */ /* * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> * @@ -459,6 +459,16 @@ arm_intr_parent_disestablish_fdt(void *cookie) free(ih, M_DEVBUF, sizeof(*ih)); } +void +arm_intr_route(void *cookie, int enable, int cpuid) +{ + struct arm_intr_handle *ih = cookie; + struct interrupt_controller *ic = ih->ih_ic; + + if (ic->ic_route) + ic->ic_route(ih->ih_ih, enable, cpuid); +} + int arm_dflt_splraise(int newcpl) { diff --git a/sys/arch/arm64/include/intr.h b/sys/arch/arm64/include/intr.h index ef788d965e9..cd31339bbb5 100644 --- a/sys/arch/arm64/include/intr.h +++ b/sys/arch/arm64/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.4 2017/02/25 16:53:09 patrick Exp $ */ +/* $OpenBSD: intr.h,v 1.5 2017/03/08 08:48:02 patrick Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -137,6 +137,7 @@ struct interrupt_controller { void *(*ic_establish_msi)(void *, uint64_t *, uint64_t *, int, int (*)(void *), void *, char *); void (*ic_disestablish)(void *); + void (*ic_route)(void *, int, int); LIST_ENTRY(interrupt_controller) ic_list; uint32_t ic_phandle; @@ -154,6 +155,7 @@ void *arm_intr_establish_fdt_imap(int, int *, int, int, int, int (*)(void *), void *arm_intr_establish_fdt_msi(int, uint64_t *, uint64_t *, int , int (*)(void *), void *, char *); void arm_intr_disestablish_fdt(void *); +void arm_intr_route(void *, int, int); void *arm_intr_parent_establish_fdt(void *, int *, int, int (*)(void *), void *, char *); |