Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/isa Remove the last usage of xen_pirq_alloc() a...



details:   https://anonhg.NetBSD.org/src/rev/79631aa73295
branches:  trunk
changeset: 433364:79631aa73295
user:      cherry <cherry%NetBSD.org@localhost>
date:      Mon Sep 10 07:04:08 2018 +0000

description:
Remove the last usage of xen_pirq_alloc() and pirq_establish()
outside of the x86 interrupt and xen events framework.

This allows us to finally unify the interrupt path for both Xen
and x86 as changes 'internal' to the subsystem.

This change has been kindly tested on real hardware by gson@

The change is not cosmetic and may thus affect users on various
hardware configurations - especially involving legacy hardware.

I look forward to bug reports.

diffstat:

 sys/arch/x86/isa/isa_machdep.c |  27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)

diffs (50 lines):

diff -r 08ee2f546fdc -r 79631aa73295 sys/arch/x86/isa/isa_machdep.c
--- a/sys/arch/x86/isa/isa_machdep.c    Mon Sep 10 05:14:42 2018 +0000
+++ b/sys/arch/x86/isa/isa_machdep.c    Mon Sep 10 07:04:08 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_machdep.c,v 1.39 2018/06/24 13:35:33 jdolecek Exp $        */
+/*     $NetBSD: isa_machdep.c,v 1.40 2018/09/10 07:04:08 cherry Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.39 2018/06/24 13:35:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.40 2018/09/10 07:04:08 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -237,31 +237,8 @@
                        printf("isa_intr_establish: no MP mapping found\n");
        }
 #endif
-#if defined(XEN)
-       KASSERT(APIC_IRQ_ISLEGACY(irq));
-
-       int evtch;
-       const char *intrstr;
-       char intrstr_buf[INTRIDBUF];
-
-       mpih |= APIC_IRQ_LEGACY_IRQ(irq);
-
-       evtch = xen_pirq_alloc(&mpih, type); /* XXX: legacy - xen just tosses irq back at us */
-       if (evtch == -1)
-               return NULL;
-
-       intrstr = intr_create_intrid(irq, pic, pin, intrstr_buf,
-           sizeof(intrstr_buf));
-
-       aprint_debug("irq: %d requested on pic: %s.\n", irq, pic->pic_name);
-
-       return (void *)pirq_establish(irq, evtch, ih_fun, ih_arg, level,
-           intrstr, xname);
-#else /* defined(XEN) */
        return intr_establish_xname(irq, pic, pin, type, level, ih_fun, ih_arg,
            false, xname);
-#endif
-
 }
 
 /* Deregister an interrupt handler. */



Home | Main Index | Thread Index | Old Index