Add a 'known_mpsafe' argument to intr_establish().

This commit is contained in:
ad 2008-05-30 19:03:10 +00:00
parent 6cb1513d20
commit 2839301d21
9 changed files with 27 additions and 25 deletions

View File

@ -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 <sys/cdefs.h>
__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

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/systm.h>
@ -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;

View File

@ -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);

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/systm.h>
@ -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);
}
/*

View File

@ -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 <sys/cdefs.h>
__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 <sys/types.h>
#include <sys/param.h>
@ -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

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/systm.h>
@ -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;

View File

@ -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 <sys/cdefs.h>
__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

View File

@ -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 *);

View File

@ -103,7 +103,7 @@
*/
#include <sys/cdefs.h>
__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;