summaryrefslogtreecommitdiff
path: root/sys/kern/subr_smp.c
diff options
context:
space:
mode:
authorSteve Passe <fsmp@FreeBSD.org>1997-08-20 05:25:48 +0000
committerSteve Passe <fsmp@FreeBSD.org>1997-08-20 05:25:48 +0000
commit7b185ef8096e3b806aaa3e4bb9ec49ca62c28f6a (patch)
treed8b65c15c9e61ef908e85e942ad5726ce79ca392 /sys/kern/subr_smp.c
parent5996461961e9ad9d7956846c7f357d4b52aa17e1 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r--sys/kern/subr_smp.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index ce107d99b040..e5fb31033dce 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.40 1997/08/09 23:01:03 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.41 1997/08/10 19:32:38 fsmp Exp $
*/
#include "opt_smp.h"
@@ -1418,6 +1418,10 @@ default_mp_table(int type)
/*
* initialize all the SMP locks
*/
+
+/* lock the com (tty) data structures */
+struct simplelock com_lock;
+
static void
init_locks(void)
{
@@ -1427,8 +1431,23 @@ init_locks(void)
*/
mp_lock = 0x00000001;
+ /* ISR uses its own "giant lock" */
+ isr_lock = 0x00000000;
+
+ /* serializes FAST_INTR() accesses */
+ s_lock_init((struct simplelock*)&fast_intr_lock);
+
+ /* serializes INTR() accesses */
+ s_lock_init((struct simplelock*)&intr_lock);
+
/* locks the IO APIC and apic_imen accesses */
s_lock_init((struct simplelock*)&imen_lock);
+
+ /* locks cpl accesses */
+ s_lock_init((struct simplelock*)&cpl_lock);
+
+ /* locks com (tty) data/hardware accesses: a FASTINTR() */
+ s_lock_init((struct simplelock*)&com_lock);
}