From: jmatthew Date: Sun, 5 Mar 2023 04:30:08 +0000 (+0000) Subject: Mask off IPL flags before storing the IPL for an interrupt. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=db0c9634e1642283fb7196739d306b6a76623a54;p=openbsd Mask off IPL flags before storing the IPL for an interrupt. This fixes the IPL calculations in mpic_calc_mask() in the presence of IPL_MPSAFE interrupts such as mvneta(4). ok patrick@ kettenis@ dlg@ --- diff --git a/sys/arch/armv7/marvell/mvmpic.c b/sys/arch/armv7/marvell/mvmpic.c index 194d47fb190..11d05bf58c4 100644 --- a/sys/arch/armv7/marvell/mvmpic.c +++ b/sys/arch/armv7/marvell/mvmpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mvmpic.c,v 1.5 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: mvmpic.c,v 1.6 2023/03/05 04:30:08 jmatthew Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * Copyright (c) 2015 Patrick Wildt @@ -257,7 +257,7 @@ mpic_intr_establish(void *cookie, int *cells, int level, ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); ih->ih_func = func; ih->ih_arg = arg; - ih->ih_ipl = level; + ih->ih_ipl = level & IPL_IRQMASK; ih->ih_irq = irqno; ih->ih_name = name; ih->ih_sc = sc;