summaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2023-03-05 14:45:08 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2023-03-05 14:45:08 +0000
commit5f76d51b68f8299f3df44838d74170e18547f663 (patch)
treeeb9c91d1f4fb67d980c799cfc2080de4cd6c40f3 /sys/dev/fdt
parent2e955ba5f359988cfa707b7f8c58f7bc3ab569dd (diff)
Mask off IPL flags before storing the IPL for an interrupt.
ok kettenis@ jmatthew@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/imxgpio.c4
-rw-r--r--sys/dev/fdt/rkgpio.c4
2 files changed, 4 insertions, 4 deletions
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;