Module Name:    src
Committed By:   cherry
Date:           Mon Sep 10 07:04:08 UTC 2018

Modified Files:
        src/sys/arch/x86/isa: isa_machdep.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/isa/isa_machdep.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/isa/isa_machdep.c
diff -u src/sys/arch/x86/isa/isa_machdep.c:1.39 src/sys/arch/x86/isa/isa_machdep.c:1.40
--- src/sys/arch/x86/isa/isa_machdep.c:1.39	Sun Jun 24 13:35:33 2018
+++ src/sys/arch/x86/isa/isa_machdep.c	Mon Sep 10 07:04:08 2018
@@ -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 @@ isa_intr_establish_xname(isa_chipset_tag
 			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. */

Reply via email to