Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386 fix i386 build for MSI/MSI-X support code.
details: https://anonhg.NetBSD.org/src/rev/9ac8c0b17861
branches: trunk
changeset: 337779:9ac8c0b17861
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Apr 27 08:30:10 2015 +0000
description:
fix i386 build for MSI/MSI-X support code.
diffstat:
sys/arch/i386/eisa/eisa_machdep.c | 14 +++++++-------
sys/arch/i386/i386/mainbus.c | 6 +++---
sys/arch/i386/include/eisa_machdep.h | 5 +++--
3 files changed, 13 insertions(+), 12 deletions(-)
diffs (93 lines):
diff -r de48ca87c9f0 -r 9ac8c0b17861 sys/arch/i386/eisa/eisa_machdep.c
--- a/sys/arch/i386/eisa/eisa_machdep.c Mon Apr 27 07:51:28 2015 +0000
+++ b/sys/arch/i386/eisa/eisa_machdep.c Mon Apr 27 08:30:10 2015 +0000
@@ -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 @@
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;
}
diff -r de48ca87c9f0 -r 9ac8c0b17861 sys/arch/i386/i386/mainbus.c
--- a/sys/arch/i386/i386/mainbus.c Mon Apr 27 07:51:28 2015 +0000
+++ b/sys/arch/i386/i386/mainbus.c Mon Apr 27 08:30:10 2015 +0000
@@ -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 @@
#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);
diff -r de48ca87c9f0 -r 9ac8c0b17861 sys/arch/i386/include/eisa_machdep.h
--- a/sys/arch/i386/include/eisa_machdep.h Mon Apr 27 07:51:28 2015 +0000
+++ b/sys/arch/i386/include/eisa_machdep.h Mon Apr 27 08:30:10 2015 +0000
@@ -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 @@
#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.
Home |
Main Index |
Thread Index |
Old Index