CVS commit: src/sys/arch/x86/isa
Module Name:src Committed By: cherry Date: Mon Dec 3 19:51:09 UTC 2018 Modified Files: src/sys/arch/x86/isa: isa_machdep.c Log Message: Allow isa_machdep.c to compile in the case of no ioapic support. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 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.40 src/sys/arch/x86/isa/isa_machdep.c:1.41 --- src/sys/arch/x86/isa/isa_machdep.c:1.40 Mon Sep 10 07:04:08 2018 +++ src/sys/arch/x86/isa/isa_machdep.c Mon Dec 3 19:51:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.40 2018/09/10 07:04:08 cherry Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.41 2018/12/03 19:51:09 cherry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.40 2018/09/10 07:04:08 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.41 2018/12/03 19:51:09 cherry Exp $"); #include #include @@ -210,8 +210,8 @@ isa_intr_establish_xname(isa_chipset_tag { struct pic *pic; int pin; - intr_handle_t mpih = 0; #if NIOAPIC > 0 + intr_handle_t mpih = 0; struct ioapic_softc *ioapic = NULL; #endif
CVS commit: src/sys/arch/x86/isa
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 -__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 #include @@ -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(, 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. */
CVS commit: src/sys/arch/x86/isa
Module Name:src Committed By: cherry Date: Fri Jul 21 12:27:48 UTC 2017 Modified Files: src/sys/arch/x86/isa: isa_machdep.c Log Message: Fix uninitialised use of variable mpih Pointed out by joerg@ To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 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.35 src/sys/arch/x86/isa/isa_machdep.c:1.36 --- src/sys/arch/x86/isa/isa_machdep.c:1.35 Sun Jul 16 06:14:23 2017 +++ src/sys/arch/x86/isa/isa_machdep.c Fri Jul 21 12:27:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.35 2017/07/16 06:14:23 cherry Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.36 2017/07/21 12:27:48 cherry Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.35 2017/07/16 06:14:23 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.36 2017/07/21 12:27:48 cherry Exp $"); #include #include @@ -211,7 +211,7 @@ isa_intr_establish_xname(isa_chipset_tag struct pic *pic; int pin; #if NIOAPIC > 0 - intr_handle_t mpih; + intr_handle_t mpih = 0; struct ioapic_softc *ioapic = NULL; #endif
CVS commit: src/sys/arch/x86/isa
Module Name:src Committed By: mbalmer Date: Tue Feb 28 20:26:38 UTC 2012 Modified Files: src/sys/arch/x86/isa: isa_machdep.c Log Message: cosmetic, spelling, and grammar adjustments To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 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.31 src/sys/arch/x86/isa/isa_machdep.c:1.32 --- src/sys/arch/x86/isa/isa_machdep.c:1.31 Tue Oct 18 23:43:36 2011 +++ src/sys/arch/x86/isa/isa_machdep.c Tue Feb 28 20:26:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.31 2011/10/18 23:43:36 dyoung Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.32 2012/02/28 20:26:37 mbalmer 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.31 2011/10/18 23:43:36 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: isa_machdep.c,v 1.32 2012/02/28 20:26:37 mbalmer Exp $); #include sys/param.h #include sys/systm.h @@ -145,12 +145,10 @@ isa_intr_alloc(isa_chipset_tag_t ic, int continue; isp = ci-ci_isources[i]; if (isp == NULL) { - /* - * if nothing's using the irq, just return it - */ + /* if nothing's using the irq, just return it */ *irq = i; mutex_exit(cpu_lock); - return (0); + return 0; } switch(isp-is_type) { @@ -175,7 +173,6 @@ isa_intr_alloc(isa_chipset_tag_t ic, int count = tmp; } break; - case IST_PULSE: /* this just isn't shareable */ continue; @@ -185,30 +182,23 @@ isa_intr_alloc(isa_chipset_tag_t ic, int mutex_exit(cpu_lock); if (bestirq == -1) - return (1); + return 1; *irq = bestirq; - return (0); + return 0; } const struct evcnt * isa_intr_evcnt(isa_chipset_tag_t ic, int irq) { - /* XXX for now, no evcnt parent reported */ return NULL; } void * -isa_intr_establish( -isa_chipset_tag_t ic, -int irq, -int type, -int level, -int (*ih_fun)(void *), -void *ih_arg -) +isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level, +int (*ih_fun)(void *), void *ih_arg) { struct pic *pic; int pin; @@ -239,12 +229,11 @@ isa_intr_establish( printf(isa_intr_establish: no MP mapping found\n); } #endif - return intr_establish(irq, pic, pin, type, level, ih_fun, ih_arg, false); + return intr_establish(irq, pic, pin, type, level, ih_fun, ih_arg, + false); } -/* - * Deregister an interrupt handler. - */ +/* Deregister an interrupt handler. */ void isa_intr_disestablish(isa_chipset_tag_t ic, void *arg) { @@ -257,8 +246,7 @@ isa_intr_disestablish(isa_chipset_tag_t } void -isa_attach_hook(device_t parent, device_t self, -struct isabus_attach_args *iba) +isa_attach_hook(device_t parent, device_t self, struct isabus_attach_args *iba) { extern struct x86_isa_chipset x86_isa_chipset; extern int isa_has_been_seen; @@ -289,20 +277,16 @@ isa_detach_hook(isa_chipset_tag_t ic, de int isa_mem_alloc(bus_space_tag_t t, bus_size_t size, bus_size_t align, - bus_addr_t boundary, int flags, bus_addr_t *addrp, bus_space_handle_t *bshp) +bus_addr_t boundary, int flags, bus_addr_t *addrp, bus_space_handle_t *bshp) { - - /* - * Allocate physical address space in the ISA hole. - */ - return (bus_space_alloc(t, IOM_BEGIN, IOM_END - 1, size, align, - boundary, flags, addrp, bshp)); + /* Allocate physical address space in the ISA hole. */ + return bus_space_alloc(t, IOM_BEGIN, IOM_END - 1, size, align, + boundary, flags, addrp, bshp); } void isa_mem_free(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) { - bus_space_free(t, bsh, size); } @@ -343,7 +327,6 @@ _isa_dma_may_bounce(bus_dma_tag_t t, bus device_t device_isa_register(device_t dev, void *aux) { - /* * Handle network interfaces here, the attachment information is * not available driver-independently later. @@ -360,7 +343,7 @@ device_isa_register(device_t dev, void * * passed by the boot ROM. The ROM should stay usable if * the driver becomes obsolete. The physical attachment * information (checked below) must be sufficient to - * idenfity the device. + * identify the device. */ if (bin-bus == BI_BUS_ISA device_is_a(device_parent(dev), isa)) {