Module Name:    src
Committed By:   knakahara
Date:           Mon Apr 27 08:30:11 UTC 2015

Modified Files:
        src/sys/arch/i386/eisa: eisa_machdep.c
        src/sys/arch/i386/i386: mainbus.c
        src/sys/arch/i386/include: eisa_machdep.h

Log Message:
fix i386 build for MSI/MSI-X support code.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/i386/eisa/eisa_machdep.c
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/i386/i386/mainbus.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/include/eisa_machdep.h

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/i386/eisa/eisa_machdep.c
diff -u src/sys/arch/i386/eisa/eisa_machdep.c:1.39 src/sys/arch/i386/eisa/eisa_machdep.c:1.40
--- src/sys/arch/i386/eisa/eisa_machdep.c:1.39	Sat Mar 29 19:28:28 2014
+++ src/sys/arch/i386/eisa/eisa_machdep.c	Mon Apr 27 08:30:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: eisa_machdep.c,v 1.39 2014/03/29 19:28:28 christos Exp $	*/
+/*	$NetBSD: eisa_machdep.c,v 1.40 2015/04/27 08:30:10 knakahara Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.39 2014/03/29 19:28:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.40 2015/04/27 08:30:10 knakahara Exp $");
 
 #include "ioapic.h"
 
@@ -160,19 +160,19 @@ const char *
 eisa_intr_string(eisa_chipset_tag_t ec, eisa_intr_handle_t ih, char *buf,
     size_t len)
 {
-	if (ih == 0 || (ih & 0xff) >= NUM_LEGACY_IRQS || ih == 2)
-		panic("eisa_intr_string: bogus handle 0x%x", ih);
+	if (ih == 0 || APIC_IRQ_LEGACY_IRQ(ih) >= NUM_LEGACY_IRQS || ih == 2)
+		panic("eisa_intr_string: bogus handle 0x%" PRIx64, ih);
 
 #if NIOAPIC > 0
 	if (ih & APIC_INT_VIA_APIC)
 		snprintf(buf, len, "apic %d int %d (irq %d)",
 		    APIC_IRQ_APIC(ih),
 		    APIC_IRQ_PIN(ih),
-		    ih&0xff);
+		    APIC_IRQ_LEGACY_IRQ(ih));
 	else
-		snprintf(buf, len, "irq %d", ih&0xff);
+		snprintf(buf, len, "irq %d",  APIC_IRQ_LEGACY_IRQ(ih));
 #else
-	snprintf(buf, len, "irq %d", ih);
+	snprintf(buf, len, "irq %d", APIC_IRQ_LEGACY_IRQ(ih));
 #endif
 	return buf;
 }

Index: src/sys/arch/i386/i386/mainbus.c
diff -u src/sys/arch/i386/i386/mainbus.c:1.99 src/sys/arch/i386/i386/mainbus.c:1.100
--- src/sys/arch/i386/i386/mainbus.c:1.99	Mon Apr 27 07:03:57 2015
+++ src/sys/arch/i386/i386/mainbus.c	Mon Apr 27 08:30:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.99 2015/04/27 07:03:57 knakahara Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.100 2015/04/27 08:30:11 knakahara Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.99 2015/04/27 07:03:57 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.100 2015/04/27 08:30:11 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -86,7 +86,7 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 
 #include <arch/x86/pci/pci_addr_fixup.h>
 #endif
 #endif
-#include <archx86/pci/msipic.h>
+#include <arch/x86/pci/msipic.h>
 #endif
 
 void	mainbus_childdetached(device_t, device_t);

Index: src/sys/arch/i386/include/eisa_machdep.h
diff -u src/sys/arch/i386/include/eisa_machdep.h:1.13 src/sys/arch/i386/include/eisa_machdep.h:1.14
--- src/sys/arch/i386/include/eisa_machdep.h:1.13	Sat Mar 29 19:28:28 2014
+++ src/sys/arch/i386/include/eisa_machdep.h	Mon Apr 27 08:30:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: eisa_machdep.h,v 1.13 2014/03/29 19:28:28 christos Exp $	*/
+/*	$NetBSD: eisa_machdep.h,v 1.14 2015/04/27 08:30:11 knakahara Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -48,11 +48,12 @@ extern struct x86_bus_dma_tag eisa_bus_d
 #define ELCR0   0x4d0                   /* eisa irq 0-7 */
 #define ELCR1   0x4d1                   /* eisa irq 8-15 */
 
+#include <machine/intr.h> /* for intr_handle_t */
 /*
  * Types provided to machine-independent EISA code.
  */
 typedef void *eisa_chipset_tag_t;
-typedef int eisa_intr_handle_t;
+typedef intr_handle_t eisa_intr_handle_t;
 
 /*
  * Functions provided to machine-independent EISA code.

Reply via email to