diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2023-03-05 14:45:08 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2023-03-05 14:45:08 +0000 |
commit | 5f76d51b68f8299f3df44838d74170e18547f663 (patch) | |
tree | eb9c91d1f4fb67d980c799cfc2080de4cd6c40f3 | |
parent | 2e955ba5f359988cfa707b7f8c58f7bc3ab569dd (diff) |
Mask off IPL flags before storing the IPL for an interrupt.
ok kettenis@ jmatthew@
-rw-r--r-- | sys/arch/arm64/dev/apldc.c | 4 | ||||
-rw-r--r-- | sys/arch/arm64/dev/aplpinctrl.c | 4 | ||||
-rw-r--r-- | sys/arch/armv7/omap/omgpio.c | 4 | ||||
-rw-r--r-- | sys/dev/fdt/imxgpio.c | 4 | ||||
-rw-r--r-- | sys/dev/fdt/rkgpio.c | 4 |
5 files changed, 10 insertions, 10 deletions
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 <kettenis@openbsd.org> * @@ -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 <kettenis@openbsd.org> * @@ -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 <drahn@openbsd.org> * @@ -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 <drahn@openbsd.org> * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> @@ -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 <kettenis@openbsd.org> * Copyright (c) 2019 Patrick Wildt <patrick@blueri.se> @@ -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; |