Module Name: src
Committed By: martin
Date: Fri Feb 19 17:47:13 UTC 2021
Modified Files:
src/sys/arch/x86/x86 [netbsd-9]: intr.c
Log Message:
Pull up following revision(s) (requested by knakahara in ticket #1209):
sys/arch/x86/x86/intr.c: revision 1.154 (via patch)
Fix x86's pci_intr_disestablish clean up routine. Pointed out by t-kusaba@IIJ,
thanks.
Fix panic on x86 by the following code.
====================
sc_ih = pci_intr_establish_xname(sc_pc, ...);
pci_intr_disestablish(sc_pc, sc_ih);
sc_ih = pci_intr_establish(sc_pc, ...);
====================
ena(4) do such processing when ifconfig down/up.
XXX pullup-8,9
To generate a diff of this commit:
cvs rdiff -u -r1.146.2.1 -r1.146.2.2 src/sys/arch/x86/x86/intr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.146.2.1 src/sys/arch/x86/x86/intr.c:1.146.2.2
--- src/sys/arch/x86/x86/intr.c:1.146.2.1 Mon Nov 11 17:20:00 2019
+++ src/sys/arch/x86/x86/intr.c Fri Feb 19 17:47:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.146.2.1 2019/11/11 17:20:00 martin Exp $ */
+/* $NetBSD: intr.c,v 1.146.2.2 2021/02/19 17:47:13 martin Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.146.2.1 2019/11/11 17:20:00 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.146.2.2 2021/02/19 17:47:13 martin Exp $");
#include "opt_intrdebug.h"
#include "opt_multiprocessor.h"
@@ -704,6 +704,9 @@ intr_source_free(struct cpu_info *ci, in
ci->ci_isources[slot] = NULL;
if (pic != &i8259_pic)
idt_vec_free(idtvec);
+
+ isp->is_recurse = NULL;
+ isp->is_resume = NULL;
}
#ifdef MULTIPROCESSOR
@@ -1042,12 +1045,12 @@ intr_disestablish_xcall(void *arg1, void
else
(*pic->pic_hwunmask)(pic, ih->ih_pin);
- /* Re-enable interrupts. */
- x86_write_psl(psl);
-
/* If the source is free we can drop it now. */
intr_source_free(ci, ih->ih_slot, pic, idtvec);
+ /* Re-enable interrupts. */
+ x86_write_psl(psl);
+
DPRINTF(("%s: remove slot %d (pic %s pin %d vec %d)\n",
device_xname(ci->ci_dev), ih->ih_slot, pic->pic_name,
ih->ih_pin, idtvec));