From f124139d6214deb4018fefdbae841039382d36c0 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 23 Oct 2024 17:57:53 +0100 Subject: [PATCH] intrng: Store the IPI priority When registering an interrupt controller we take a priority to compare. We never store the priority so any later calls may act incorrectly. Store the priority so later calls act as expected. Reviewed by: jrtc27 Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D47235 --- sys/kern/subr_intr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index a6052f28b04c70..211bfd8c434694 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -1863,8 +1863,10 @@ intr_ipi_pic_register(device_t dev, u_int priority) return (EBUSY); } - if (intr_ipi_dev == NULL || priority > intr_ipi_dev_priority) + if (intr_ipi_dev == NULL || priority > intr_ipi_dev_priority) { + intr_ipi_dev_priority = priority; intr_ipi_dev = dev; + } return (0); }