summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc64/dev/xicp.c5
-rw-r--r--sys/arch/powerpc64/dev/xive.c5
-rw-r--r--sys/arch/powerpc64/powerpc64/intr.c5
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);
}