diff options
author | 2020-09-26 17:56:54 +0000 | |
---|---|---|
committer | 2020-09-26 17:56:54 +0000 | |
commit | a4fe4c27250de193a5494ef22adadc90cf6b43f2 (patch) | |
tree | 9e854c48a9f3a03f00524bbfa277e01de5ef2371 | |
parent | Cleanup msg_eap in ikev2_msg_cleanup(). (diff) | |
download | wireguard-openbsd-a4fe4c27250de193a5494ef22adadc90cf6b43f2.tar.xz wireguard-openbsd-a4fe4c27250de193a5494ef22adadc90cf6b43f2.zip |
Do the NULL -> cpu_info_primary conversion in the interrupt controller
drivers instead of the "midlayer". I had missed a couple of places in
the midlayer and instead of fixing this in several places it is better
to do it in the functions that get invoked in the end.
-rw-r--r-- | sys/arch/powerpc64/dev/xicp.c | 5 | ||||
-rw-r--r-- | sys/arch/powerpc64/dev/xive.c | 5 | ||||
-rw-r--r-- | sys/arch/powerpc64/powerpc64/intr.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/powerpc64/dev/xicp.c b/sys/arch/powerpc64/dev/xicp.c index 0d0c81e1eea..fb45c3a2868 100644 --- a/sys/arch/powerpc64/dev/xicp.c +++ b/sys/arch/powerpc64/dev/xicp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xicp.c,v 1.2 2020/09/21 11:14:28 kettenis Exp $ */ +/* $OpenBSD: xicp.c,v 1.3 2020/09/26 17:56:54 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> * @@ -182,6 +182,9 @@ xicp_intr_establish(uint32_t girq, int type, int level, struct cpu_info *ci, int64_t error; uint16_t server; + if (ci == NULL) + ci = cpu_info_primary; + ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); ih->ih_func = func; ih->ih_arg = arg; diff --git a/sys/arch/powerpc64/dev/xive.c b/sys/arch/powerpc64/dev/xive.c index c5174591d7f..57ad233f737 100644 --- a/sys/arch/powerpc64/dev/xive.c +++ b/sys/arch/powerpc64/dev/xive.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xive.c,v 1.13 2020/09/21 11:14:28 kettenis Exp $ */ +/* $OpenBSD: xive.c,v 1.14 2020/09/26 17:56:54 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> * @@ -259,6 +259,9 @@ xive_intr_establish(uint32_t girq, int type, int level, struct cpu_info *ci, uint32_t esb_shift, lirq; int64_t error; + if (ci == NULL) + ci = cpu_info_primary; + /* Allocate a logical IRQ. */ if (sc->sc_lirq >= XIVE_NUM_IRQS) return NULL; diff --git a/sys/arch/powerpc64/powerpc64/intr.c b/sys/arch/powerpc64/powerpc64/intr.c index 6f07ccf3ec2..d2658a8176c 100644 --- a/sys/arch/powerpc64/powerpc64/intr.c +++ b/sys/arch/powerpc64/powerpc64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.8 2020/09/23 03:03:12 gkoehler Exp $ */ +/* $OpenBSD: intr.c,v 1.9 2020/09/26 17:56:54 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -61,9 +61,6 @@ void * intr_establish(uint32_t girq, int type, int level, struct cpu_info *ci, int (*func)(void *), void *arg, const char *name) { - if (ci == NULL) - ci = cpu_info_primary; - return (*_intr_establish)(girq, type, level, ci, func, arg, name); } |