diff --git a/sys/arch/i386/eisa/eisa_machdep.c b/sys/arch/i386/eisa/eisa_machdep.c index 2a8c12ce3a29..4dcd2a873f07 100644 --- a/sys/arch/i386/eisa/eisa_machdep.c +++ b/sys/arch/i386/eisa/eisa_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: eisa_machdep.c,v 1.30 2008/04/28 20:23:23 martin Exp $ */ +/* $NetBSD: eisa_machdep.c,v 1.31 2008/05/30 19:03:10 ad Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.30 2008/04/28 20:23:23 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.31 2008/05/30 19:03:10 ad Exp $"); #include "ioapic.h" @@ -226,7 +226,7 @@ eisa_intr_establish(eisa_chipset_tag_t ec, eisa_intr_handle_t ih, } #endif - return intr_establish(irq, pic, pin, type, level, func, arg); + return intr_establish(irq, pic, pin, type, level, func, arg, false); } void diff --git a/sys/arch/i386/pci/elan520.c b/sys/arch/i386/pci/elan520.c index e91016920543..e9292692e13d 100644 --- a/sys/arch/i386/pci/elan520.c +++ b/sys/arch/i386/pci/elan520.c @@ -1,4 +1,4 @@ -/* $NetBSD: elan520.c,v 1.33 2008/05/01 22:59:37 dyoung Exp $ */ +/* $NetBSD: elan520.c,v 1.34 2008/05/30 19:03:10 ad Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.33 2008/05/01 22:59:37 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elan520.c,v 1.34 2008/05/30 19:03:10 ad Exp $"); #include #include @@ -911,7 +911,7 @@ elansc_intr_establish(device_t dev, int (*handler)(void *), void *arg) ELAN_IRQ); return NULL; } else if ((ih = intr_establish(ELAN_IRQ, pic, ELAN_IRQ, - IST_LEVEL, IPL_HIGH, handler, arg)) == NULL) { + IST_LEVEL, IPL_HIGH, handler, arg, false)) == NULL) { aprint_error_dev(dev, "could not establish interrupt\n"); return NULL; diff --git a/sys/arch/x86/include/intr.h b/sys/arch/x86/include/intr.h index f26eff5e1294..7cebe9962f28 100644 --- a/sys/arch/x86/include/intr.h +++ b/sys/arch/x86/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.34 2008/05/07 07:00:16 joerg Exp $ */ +/* $NetBSD: intr.h,v 1.35 2008/05/30 19:03:10 ad Exp $ */ /*- * Copyright (c) 1998, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -165,7 +165,7 @@ void *nmi_establish(int (*)(void *), void *); bool nmi_disestablish(void *); int nmi_dispatch(void); int x86_nmi(void); -void *intr_establish(int, struct pic *, int, int, int, int (*)(void *), void *); +void *intr_establish(int, struct pic *, int, int, int, int (*)(void *), void *, bool); void intr_disestablish(struct intrhand *); void intr_add_pcibus(struct pcibus_attach_args *); const char *intr_string(int); diff --git a/sys/arch/x86/isa/isa_machdep.c b/sys/arch/x86/isa/isa_machdep.c index 4711c18caa7d..3c7176e906a1 100644 --- a/sys/arch/x86/isa/isa_machdep.c +++ b/sys/arch/x86/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.19 2008/04/28 20:23:40 martin Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.20 2008/05/30 19:03:10 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.19 2008/04/28 20:23:40 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.20 2008/05/30 19:03:10 ad Exp $"); #include #include @@ -251,7 +251,7 @@ isa_intr_establish( printf("isa_intr_establish: no MP mapping found\n"); } #endif - return intr_establish(irq, pic, pin, type, level, ih_fun, ih_arg); + return intr_establish(irq, pic, pin, type, level, ih_fun, ih_arg, false); } /* diff --git a/sys/arch/x86/pci/pci_intr_machdep.c b/sys/arch/x86/pci/pci_intr_machdep.c index 4812be4f9dd9..011545a6f176 100644 --- a/sys/arch/x86/pci/pci_intr_machdep.c +++ b/sys/arch/x86/pci/pci_intr_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_intr_machdep.c,v 1.9 2008/05/03 17:03:45 cegger Exp $ */ +/* $NetBSD: pci_intr_machdep.c,v 1.10 2008/05/30 19:03:10 ad Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.9 2008/05/03 17:03:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.10 2008/05/30 19:03:10 ad Exp $"); #include #include @@ -242,7 +242,8 @@ pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih, } #endif - return intr_establish(irq, pic, pin, IST_LEVEL, level, func, arg); + return intr_establish(irq, pic, pin, IST_LEVEL, level, func, arg, + false); } void diff --git a/sys/arch/x86/x86/acpi_machdep.c b/sys/arch/x86/x86/acpi_machdep.c index 0e793febd956..8a28ae5c5de5 100644 --- a/sys/arch/x86/x86/acpi_machdep.c +++ b/sys/arch/x86/x86/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_machdep.c,v 1.20 2007/12/17 14:11:12 joerg Exp $ */ +/* $NetBSD: acpi_machdep.c,v 1.21 2008/05/30 19:03:10 ad Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.20 2007/12/17 14:11:12 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.21 2008/05/30 19:03:10 ad Exp $"); #include #include @@ -173,7 +173,7 @@ sci_override: * XXX probably, IPL_BIO is enough. */ ih = intr_establish(irq, pic, pin, trigger, IPL_TTY, - (int (*)(void *)) ServiceRoutine, Context); + (int (*)(void *)) ServiceRoutine, Context, false); if (ih == NULL) return (AE_NO_MEMORY); *cookiep = ih; diff --git a/sys/arch/x86/x86/intr.c b/sys/arch/x86/x86/intr.c index 73fe67e75763..372d51dee649 100644 --- a/sys/arch/x86/x86/intr.c +++ b/sys/arch/x86/x86/intr.c @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.54 2008/05/13 20:19:26 ad Exp $ */ +/* $NetBSD: intr.c,v 1.55 2008/05/30 19:03:10 ad Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.54 2008/05/13 20:19:26 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.55 2008/05/30 19:03:10 ad Exp $"); #include "opt_multiprocessor.h" #include "opt_acpi.h" @@ -642,7 +642,7 @@ intr_findpic(int num) void * intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level, - int (*handler)(void *), void *arg) + int (*handler)(void *), void *arg, bool known_mpsafe) { struct intrhand **p, *q, *ih; struct cpu_info *ci; @@ -650,7 +650,7 @@ intr_establish(int legacy_irq, struct pic *pic, int pin, int type, int level, struct intrsource *source; struct intrstub *stubp; #ifdef MULTIPROCESSOR - bool mpsafe = (level != IPL_VM); + bool mpsafe = (known_mpsafe || level != IPL_VM); #endif /* MULTIPROCESSOR */ #ifdef DIAGNOSTIC diff --git a/sys/arch/xen/include/intr.h b/sys/arch/xen/include/intr.h index 0437e92fdb66..44b60cc37a5f 100644 --- a/sys/arch/xen/include/intr.h +++ b/sys/arch/xen/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.28 2008/05/24 15:10:50 bouyer Exp $ */ +/* $NetBSD: intr.h,v 1.29 2008/05/30 19:03:10 ad Exp $ */ /* NetBSD intr.h,v 1.15 2004/10/31 10:39:34 yamt Exp */ /*- @@ -164,7 +164,7 @@ void intr_default_setup(void); int x86_nmi(void); void intr_calculatemasks(struct evtsource *); -void *intr_establish(int, struct pic *, int, int, int, int (*)(void *), void *); +void *intr_establish(int, struct pic *, int, int, int, int (*)(void *), void *, bool); void intr_disestablish(struct intrhand *); const char *intr_string(int); void cpu_intr_init(struct cpu_info *); diff --git a/sys/arch/xen/x86/intr.c b/sys/arch/xen/x86/intr.c index 76d59886583e..a786345ccdfb 100644 --- a/sys/arch/xen/x86/intr.c +++ b/sys/arch/xen/x86/intr.c @@ -103,7 +103,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.18 2008/05/11 15:59:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.19 2008/05/30 19:03:10 ad Exp $"); #include "opt_multiprocessor.h" #include "opt_xen.h" @@ -209,7 +209,8 @@ cpu_intr_init(struct cpu_info *ci) #if NPCI > 0 || NISA > 0 void * intr_establish(int legacy_irq, struct pic *pic, int pin, - int type, int level, int (*handler)(void *) , void *arg) + int type, int level, int (*handler)(void *) , void *arg, + bool known_mpsafe) { struct pintrhand *ih; int evtchn;