summaryrefslogtreecommitdiff
path: root/sys/arch/armish
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-05-15 05:26:46 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-05-15 05:26:46 +0000
commitb3082faac71e0bbf79eed5f503d8906326fe1084 (patch)
tree2b27d6df0df1bdd90add99e191ddf5a5b7db79d6 /sys/arch/armish
parent6f5d7c74dcd62f8b14ef5f388edeb24e190788fc (diff)
Dummy mutex code for arm platforms. ok drahn@ deraadt@
Diffstat (limited to 'sys/arch/armish')
-rw-r--r--sys/arch/armish/include/_types.h3
-rw-r--r--sys/arch/armish/include/armish_intr.h6
-rw-r--r--sys/arch/armish/include/intr.h51
-rw-r--r--sys/arch/armish/include/mutex.h3
4 files changed, 9 insertions, 54 deletions
diff --git a/sys/arch/armish/include/_types.h b/sys/arch/armish/include/_types.h
index 99f5e8b4784..a9eaa5821c7 100644
--- a/sys/arch/armish/include/_types.h
+++ b/sys/arch/armish/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.1 2006/05/29 17:13:19 drahn Exp $ */
+/* $OpenBSD: _types.h,v 1.2 2007/05/15 05:26:44 miod Exp $ */
/* $NetBSD: types.h,v 1.4 2002/02/28 03:17:26 simonb Exp $ */
#ifndef _ARMISH__TYPES_H_
@@ -6,5 +6,6 @@
#include <arm/_types.h>
#define __HAVE_GENERIC_SOFT_INTERRUPTS
+#define __HAVE_MUTEX
#endif /* _ARMISH__TYPES_H_ */
diff --git a/sys/arch/armish/include/armish_intr.h b/sys/arch/armish/include/armish_intr.h
index 13d1c78d879..2bc4f4da2a8 100644
--- a/sys/arch/armish/include/armish_intr.h
+++ b/sys/arch/armish/include/armish_intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: armish_intr.h,v 1.2 2006/06/15 21:35:30 drahn Exp $ */
+/* $OpenBSD: armish_intr.h,v 1.3 2007/05/15 05:26:44 miod Exp $ */
/* $NetBSD: i80321_intr.h,v 1.4 2003/07/05 06:53:08 dogcow Exp $ */
/*
@@ -45,7 +45,6 @@
#include <arm/armreg.h>
#include <arm/cpufunc.h>
-#include <machine/intr.h>
#include <arm/softintr.h>
extern __volatile int current_ipl_level;
@@ -59,7 +58,6 @@ int i80321_splraise(int ipl);
int i80321_spllower(int ipl);
void i80321_setsoftintr(int si);
-
/*
* An useful function for interrupt handlers.
* XXX: This shouldn't be here.
@@ -97,6 +95,8 @@ void *i80321_intr_establish(int irqno, int level, int (*func)(void *),
void i80321_intr_disestablish(void *cookie);
const char *i80321_intr_string(void *cookie);
+#define splassert(wantipl) do { /* nada */ } while (0)
+
#endif /* ! _LOCORE */
#endif /* _I80321_INTR_H_ */
diff --git a/sys/arch/armish/include/intr.h b/sys/arch/armish/include/intr.h
index 32b059024a4..0baf01aec68 100644
--- a/sys/arch/armish/include/intr.h
+++ b/sys/arch/armish/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.3 2006/06/15 21:35:30 drahn Exp $ */
+/* $OpenBSD: intr.h,v 1.4 2007/05/15 05:26:44 miod Exp $ */
/* $NetBSD: intr.h,v 1.12 2003/06/16 20:00:59 thorpej Exp $ */
/*
@@ -76,50 +76,6 @@
#include <sys/device.h>
#include <sys/queue.h>
-#if defined(_LKM)
-
-int _splraise(int);
-int _spllower(int);
-void splx(int);
-void _setsoftintr(int);
-
-#else /* _LKM */
-
-/*
- * Each board needs to define the following functions:
- *
- * int _splraise(int);
- * int _spllower(int);
- * void splx(int);
- * void _setsoftintr(int);
- *
- * These may be defined as functions, static __inline functions, or macros,
- * but there must be a _spllower() and splx() defined as functions callable
- * from assembly language (for cpu_switch()). However, since it's quite
- * useful to be able to inline splx(), you could do something like the
- * following:
- *
- * in <boardtype>_intr.h:
- * static __inline int
- * boardtype_splx(int spl)
- * {...}
- *
- * #define splx(nspl) boardtype_splx(nspl)
- * ...
- * and in boardtype's machdep code:
- *
- * ...
- * #undef splx
- * int
- * splx(int spl)
- * {
- * return boardtype_splx(spl);
- * }
- */
-
-
-#endif /* _LKM */
-
#define splhigh() _splraise(IPL_HIGH)
#define splsoft() _splraise(IPL_SOFT)
#define splsoftclock() _splraise(IPL_SOFTCLOCK)
@@ -137,15 +93,10 @@ void _setsoftintr(int);
#define splsched() splhigh()
#define spllock() splhigh()
-/* Use generic software interrupt support. */
-#include <arm/softintr.h>
-
#endif /* ! _LOCORE */
#include <machine/armish_intr.h>
-#define splassert(wantipl) do { /* nada */ } while (0)
-
#endif /* _KERNEL */
#endif /* _ARMISH_INTR_H_ */
diff --git a/sys/arch/armish/include/mutex.h b/sys/arch/armish/include/mutex.h
new file mode 100644
index 00000000000..11c58b359af
--- /dev/null
+++ b/sys/arch/armish/include/mutex.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: mutex.h,v 1.1 2007/05/15 05:26:44 miod Exp $ */
+/* public domain */
+#include <arm/xscale/i80321_mutex.h>