From: visa Date: Mon, 29 Jan 2018 14:51:57 +0000 (+0000) Subject: Let the interrupt subsystem allocate memory for the IPI handle, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0bde7ad85793e23fc4f75cf9da70a05bf96d1ae0;p=openbsd Let the interrupt subsystem allocate memory for the IPI handle, to drop remaining uses of `ci_ipiih'. In addition, mark the IPI handler MP-safe. --- diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c index 6aa9acc6749..f4bffbb5fb9 100644 --- a/sys/arch/sgi/sgi/ip27_machdep.c +++ b/sys/arch/sgi/sgi/ip27_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip27_machdep.c,v 1.77 2017/02/11 03:44:22 visa Exp $ */ +/* $OpenBSD: ip27_machdep.c,v 1.78 2018/01/29 14:51:57 visa Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -1178,8 +1178,8 @@ hw_ipi_intr_establish(int (*func)(void *), u_long cpuid) int intr; intr = IP27_SLICE_IPI(ci->ci_slice); - return ip27_hub_intr_establish(func, (void *)cpuid, intr, IPL_IPI, - NULL, &ci->ci_ipiih); + return ip27_hub_intr_establish(func, (void *)cpuid, intr, + IPL_IPI | IPL_MPSAFE, NULL, NULL); } void diff --git a/sys/arch/sgi/sgi/ip30_machdep.c b/sys/arch/sgi/sgi/ip30_machdep.c index 21c5875678a..6d50f852f3d 100644 --- a/sys/arch/sgi/sgi/ip30_machdep.c +++ b/sys/arch/sgi/sgi/ip30_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip30_machdep.c,v 1.68 2016/10/27 13:19:27 visa Exp $ */ +/* $OpenBSD: ip30_machdep.c,v 1.69 2018/01/29 14:51:57 visa Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -590,7 +590,7 @@ int hw_ipi_intr_establish(int (*func)(void *), u_long cpuid) { return xheart_intr_establish(func, (void *)cpuid, HEART_ISR_IPI(cpuid), - IPL_IPI, NULL, &curcpu()->ci_ipiih); + IPL_IPI | IPL_MPSAFE, NULL, NULL); }; void