Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 While we're here, fix pic->pic_delroute() t...



details:   https://anonhg.NetBSD.org/src/rev/ab3ae719b970
branches:  trunk
changeset: 836268:ab3ae719b970
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sun Oct 07 05:28:51 2018 +0000

description:
While we're here, fix pic->pic_delroute() to DTRT on XEN and
cleanup after itself.

diffstat:

 sys/arch/x86/x86/i8259.c  |   9 +++++++--
 sys/arch/x86/x86/ioapic.c |  10 ++++++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 160b8b4e9cb4 -r ab3ae719b970 sys/arch/x86/x86/i8259.c
--- a/sys/arch/x86/x86/i8259.c  Sun Oct 07 05:23:01 2018 +0000
+++ b/sys/arch/x86/x86/i8259.c  Sun Oct 07 05:28:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i8259.c,v 1.18 2018/10/07 05:23:01 cherry Exp $        */
+/*     $NetBSD: i8259.c,v 1.19 2018/10/07 05:28:51 cherry Exp $        */
 
 /*
  * Copyright 2002 (c) Wasabi Systems, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.18 2018/10/07 05:23:01 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.19 2018/10/07 05:28:51 cherry Exp $");
 
 #include <sys/param.h> 
 #include <sys/systm.h>
@@ -291,6 +291,11 @@
        port = unbind_pirq_from_evtch(irq);
 
        KASSERT(port < NR_EVENT_CHANNELS);
+
+       KASSERT(irq2port[irq] != 0);
+       irq2port[irq] = 0;
+
+       xen_atomic_clear_bit(&ci->ci_evtmask[0], port);
 #else
        if (CPU_IS_PRIMARY(ci))
                i8259_reinit_irqs();
diff -r 160b8b4e9cb4 -r ab3ae719b970 sys/arch/x86/x86/ioapic.c
--- a/sys/arch/x86/x86/ioapic.c Sun Oct 07 05:23:01 2018 +0000
+++ b/sys/arch/x86/x86/ioapic.c Sun Oct 07 05:28:51 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioapic.c,v 1.56 2017/12/13 16:30:18 bouyer Exp $       */
+/*     $NetBSD: ioapic.c,v 1.57 2018/10/07 05:28:51 cherry Exp $       */
 
 /*-
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.56 2017/12/13 16:30:18 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.57 2018/10/07 05:28:51 cherry Exp $");
 
 #include "opt_ddb.h"
 
@@ -601,6 +601,12 @@
        port = unbind_pirq_from_evtch(irq);
 
        KASSERT(port < NR_EVENT_CHANNELS);
+
+       KASSERT(irq2port[irq] != 0);
+       irq2port[irq] = 0;
+
+       xen_atomic_clear_bit(&ci->ci_evtmask[0], port);
+
 #endif
 
 }



Home | Main Index | Thread Index | Old Index