Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86 if checking whether an interrupt is shared, don...



details:   https://anonhg.NetBSD.org/src/rev/071c6bd21db5
branches:  trunk
changeset: 767841:071c6bd21db5
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Aug 01 10:42:23 2011 +0000

description:
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.)

diffstat:

 sys/arch/x86/include/intr.h |  5 +++--
 sys/arch/x86/x86/intr.c     |  7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r ce7ad67489df -r 071c6bd21db5 sys/arch/x86/include/intr.h
--- a/sys/arch/x86/include/intr.h       Mon Aug 01 10:33:26 2011 +0000
+++ b/sys/arch/x86/include/intr.h       Mon Aug 01 10:42:23 2011 +0000
@@ -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 */
diff -r ce7ad67489df -r 071c6bd21db5 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Mon Aug 01 10:33:26 2011 +0000
+++ b/sys/arch/x86/x86/intr.c   Mon Aug 01 10:42:23 2011 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index