From: patrick Date: Sun, 5 Mar 2023 14:45:07 +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=671f311c7ba72421460cca4021c1a8e1dad9e2d9;p=openbsd Mask off IPL flags before storing the IPL for an interrupt. ok kettenis@ jmatthew@ --- diff --git a/sys/arch/arm64/dev/apldc.c b/sys/arch/arm64/dev/apldc.c index 6cd8e5a8fea..678191dc4cd 100644 --- a/sys/arch/arm64/dev/apldc.c +++ b/sys/arch/arm64/dev/apldc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apldc.c,v 1.4 2022/09/16 16:30:10 robert Exp $ */ +/* $OpenBSD: apldc.c,v 1.5 2023/03/05 14:45:07 patrick Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -212,7 +212,7 @@ apldc_intr_establish(void *cookie, int *cells, int ipl, ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); ih->ih_func = func; ih->ih_arg = arg; - ih->ih_ipl = ipl; + ih->ih_ipl = ipl & IPL_IRQMASK; ih->ih_irq = irq; ih->ih_name = name; ih->ih_level = level; diff --git a/sys/arch/arm64/dev/aplpinctrl.c b/sys/arch/arm64/dev/aplpinctrl.c index 394b69a0d3a..e2145b04482 100644 --- a/sys/arch/arm64/dev/aplpinctrl.c +++ b/sys/arch/arm64/dev/aplpinctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplpinctrl.c,v 1.5 2022/12/06 16:07:14 kettenis Exp $ */ +/* $OpenBSD: aplpinctrl.c,v 1.6 2023/03/05 14:45:07 patrick Exp $ */ /* * Copyright (c) 2021 Mark Kettenis * @@ -337,7 +337,7 @@ aplpinctrl_intr_establish(void *cookie, int *cells, int ipl, ih->ih_arg = arg; ih->ih_irq = pin; ih->ih_type = type; - ih->ih_ipl = ipl; + ih->ih_ipl = ipl & IPL_IRQMASK; ih->ih_name = name; ih->ih_sc = sc; if (name != NULL) diff --git a/sys/arch/armv7/omap/omgpio.c b/sys/arch/armv7/omap/omgpio.c index 7a3e3bc37d6..5c94f3962fb 100644 --- a/sys/arch/armv7/omap/omgpio.c +++ b/sys/arch/armv7/omap/omgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omgpio.c,v 1.14 2021/10/24 17:52:27 mpi Exp $ */ +/* $OpenBSD: omgpio.c,v 1.15 2023/03/05 14:45:07 patrick Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * @@ -671,7 +671,7 @@ omgpio_intr_establish(struct omgpio_softc *sc, unsigned int gpio, int level, int 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_gpio = gpio; ih->ih_irq = gpio + 512; ih->ih_name = name; diff --git a/sys/dev/fdt/imxgpio.c b/sys/dev/fdt/imxgpio.c index 86ba12bd2d8..d877cc8efba 100644 --- a/sys/dev/fdt/imxgpio.c +++ b/sys/dev/fdt/imxgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxgpio.c,v 1.6 2021/10/24 17:52:26 mpi Exp $ */ +/* $OpenBSD: imxgpio.c,v 1.7 2023/03/05 14:45:07 patrick Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2012-2013 Patrick Wildt @@ -255,7 +255,7 @@ imxgpio_intr_establish(void *cookie, int *cells, int ipl, ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); ih->ih_func = func; ih->ih_arg = arg; - ih->ih_ipl = ipl; + ih->ih_ipl = ipl & IPL_IRQMASK; ih->ih_irq = irqno; ih->ih_name = name; ih->ih_level = level; diff --git a/sys/dev/fdt/rkgpio.c b/sys/dev/fdt/rkgpio.c index 34c9d733961..ebfad548409 100644 --- a/sys/dev/fdt/rkgpio.c +++ b/sys/dev/fdt/rkgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkgpio.c,v 1.9 2023/03/04 22:54:35 kettenis Exp $ */ +/* $OpenBSD: rkgpio.c,v 1.10 2023/03/05 14:45:07 patrick Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * Copyright (c) 2019 Patrick Wildt @@ -321,7 +321,7 @@ rkgpio_intr_establish(void *cookie, int *cells, int ipl, ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); ih->ih_func = func; ih->ih_arg = arg; - ih->ih_ipl = ipl; + ih->ih_ipl = ipl & IPL_IRQMASK; ih->ih_irq = irqno; ih->ih_name = name; ih->ih_level = level;