summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2008-12-06 04:31:25 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2008-12-06 04:31:25 +0000
commit5aa0e3f0355e445f9c826a7f58c3620b8c80e6d8 (patch)
treeddf23c84d58587b71d6015880120770c7aeff5e6 /sys/arch/amd64/include
parente774fb066c7e5e55bc5173ebf5a50e0a9b5e1673 (diff)
mpsafe intr_establish that doesn't get biglock, so that we may dream of the day when this is useful.
mostly macro magic that does nothing. only actually useful on amd64 for now, compliments of art.
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/intr.h10
-rw-r--r--sys/arch/amd64/include/pci_machdep.h11
2 files changed, 14 insertions, 7 deletions
diff --git a/sys/arch/amd64/include/intr.h b/sys/arch/amd64/include/intr.h
index a376d42d2d4..740ffb0ec5d 100644
--- a/sys/arch/amd64/include/intr.h
+++ b/sys/arch/amd64/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.13 2008/06/26 05:42:09 ray Exp $ */
+/* $OpenBSD: intr.h,v 1.14 2008/12/06 04:31:24 tedu Exp $ */
/* $NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
/*-
@@ -91,6 +91,8 @@ struct intrsource {
struct intrhand {
int (*ih_fun)(void *);
void *ih_arg;
+ int (*ih_wrapped_fun)(void *);
+ void *ih_wrapped_arg;
int ih_level;
struct intrhand *ih_next;
int ih_pin;
@@ -206,8 +208,10 @@ void intr_calculatemasks(struct cpu_info *);
int intr_allocate_slot_cpu(struct cpu_info *, struct pic *, int, int *);
int intr_allocate_slot(struct pic *, int, int, int, struct cpu_info **, int *,
int *);
+
+#define INTR_ESTABLISH_MPSAFE 0x01
void *intr_establish(int, struct pic *, int, int, int, int (*)(void *),
- void *, char *);
+ void *, char *, int);
void intr_disestablish(struct intrhand *);
void cpu_intr_init(struct cpu_info *);
int intr_find_mpmapping(int bus, int pin, int *handle);
@@ -219,8 +223,6 @@ int x86_fast_ipi(struct cpu_info *, int);
void x86_broadcast_ipi(int);
void x86_multicast_ipi(int, int);
void x86_ipi_handler(void);
-void x86_intlock(struct intrframe);
-void x86_intunlock(struct intrframe);
void x86_softintlock(void);
void x86_softintunlock(void);
void x86_setperf_ipi(struct cpu_info *);
diff --git a/sys/arch/amd64/include/pci_machdep.h b/sys/arch/amd64/include/pci_machdep.h
index 60c95d80b23..cfd04020f47 100644
--- a/sys/arch/amd64/include/pci_machdep.h
+++ b/sys/arch/amd64/include/pci_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.h,v 1.6 2008/12/03 15:46:06 oga Exp $ */
+/* $OpenBSD: pci_machdep.h,v 1.7 2008/12/06 04:31:24 tedu Exp $ */
/* $NetBSD: pci_machdep.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */
/*
@@ -93,8 +93,13 @@ void pci_conf_write(pci_chipset_tag_t, pcitag_t, int,
pcireg_t);
int pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t);
-void *pci_intr_establish(pci_chipset_tag_t, pci_intr_handle_t,
- int, int (*)(void *), void *, char *);
+
+void *pci_intr_establish_flags(pci_chipset_tag_t, pci_intr_handle_t,
+ int, int (*)(void *), void *, char *, int);
+#define pci_intr_establish(t,h,l,f,a,w) \
+ pci_intr_establish_flags(t,h,l,f,a,w,0)
+#define pci_intr_establish_mpsafe(t,h,l,f,a,w) \
+ pci_intr_establish_flags(t,h,l,f,a,w,INTR_ESTABLISH_MPSAFE)
void pci_intr_disestablish(pci_chipset_tag_t, void *);
void pci_decompose_tag(pci_chipset_tag_t, pcitag_t,
int *, int *, int *);