Module Name:    src
Committed By:   drochner
Date:           Mon Aug  1 10:42:24 UTC 2011

Modified Files:
        src/sys/arch/x86/include: intr.h
        src/sys/arch/x86/x86: intr.c

Log Message:
if checking whether an interrupt is shared, don't compare pin numbers
if it is "-1" -- this is a hack to allow MSIs which don't have a concept
of pin numbers, and are generally not shared
(This doesn't give us sensible event names for statistics display. The
whole abstraction has more exceptions than regular cases, it should
be redesigned imho.)


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/include/intr.h
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x86/x86/intr.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/include/intr.h
diff -u src/sys/arch/x86/include/intr.h:1.42 src/sys/arch/x86/include/intr.h:1.43
--- src/sys/arch/x86/include/intr.h:1.42	Sun Apr  3 22:29:27 2011
+++ src/sys/arch/x86/include/intr.h	Mon Aug  1 10:42:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.42 2011/04/03 22:29:27 dyoung Exp $	*/
+/*	$NetBSD: intr.h,v 1.43 2011/08/01 10:42:23 drochner Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -73,7 +73,8 @@
 
 struct intrsource {
 	int is_maxlevel;		/* max. IPL for this source */
-	int is_pin;			/* IRQ for legacy; pin for IO APIC */
+	int is_pin;			/* IRQ for legacy; pin for IO APIC,
+					   -1 for MSI */
 	struct intrhand *is_handlers;	/* handler chain */
 	struct pic *is_pic;		/* originating PIC */
 	void *is_recurse;		/* entry for spllower */

Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.71 src/sys/arch/x86/x86/intr.c:1.72
--- src/sys/arch/x86/x86/intr.c:1.71	Sun Apr  3 22:29:27 2011
+++ src/sys/arch/x86/x86/intr.c	Mon Aug  1 10:42:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.71 2011/04/03 22:29:27 dyoung Exp $	*/
+/*	$NetBSD: intr.c,v 1.72 2011/08/01 10:42:24 drochner Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.71 2011/04/03 22:29:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.72 2011/08/01 10:42:24 drochner Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -480,7 +480,8 @@
 			if ((isp = ci->ci_isources[slot]) == NULL) {
 				continue;
 			}
-			if (isp->is_pic == pic && isp->is_pin == pin) {
+			if (isp->is_pic == pic &&
+			    pin != -1 && isp->is_pin == pin) {
 				*idt_slot = isp->is_idtvec;
 				*index = slot;
 				*cip = ci;

Reply via email to