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.)
This commit is contained in:
parent
ee07511cd0
commit
0ce8c54d89
@ -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.
|
* Copyright (c) 1998, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||||
@ -73,7 +73,8 @@ struct intrstub {
|
|||||||
|
|
||||||
struct intrsource {
|
struct intrsource {
|
||||||
int is_maxlevel; /* max. IPL for this source */
|
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 intrhand *is_handlers; /* handler chain */
|
||||||
struct pic *is_pic; /* originating PIC */
|
struct pic *is_pic; /* originating PIC */
|
||||||
void *is_recurse; /* entry for spllower */
|
void *is_recurse; /* entry for spllower */
|
||||||
|
@ -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.
|
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
|
||||||
@ -133,7 +133,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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_intrdebug.h"
|
||||||
#include "opt_multiprocessor.h"
|
#include "opt_multiprocessor.h"
|
||||||
@ -480,7 +480,8 @@ intr_allocate_slot(struct pic *pic, int pin, int level,
|
|||||||
if ((isp = ci->ci_isources[slot]) == NULL) {
|
if ((isp = ci->ci_isources[slot]) == NULL) {
|
||||||
continue;
|
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;
|
*idt_slot = isp->is_idtvec;
|
||||||
*index = slot;
|
*index = slot;
|
||||||
*cip = ci;
|
*cip = ci;
|
||||||
|
Loading…
Reference in New Issue
Block a user