Index: kernel/arch/mips32/src/asm.S
===================================================================
--- kernel/arch/mips32/src/asm.S	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ kernel/arch/mips32/src/asm.S	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -28,5 +28,5 @@
 
 #include <arch/asm/regname.h>
-	
+
 .text
 
@@ -46,4 +46,9 @@
 .set noreorder
 .set nomacro
+
+.global asm_delay_loop
+asm_delay_loop:
+	j $31
+	nop
 
 .global cpu_halt
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ kernel/arch/mips32/src/debugger.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -163,5 +163,5 @@
 		if (breakpoints[i].address == (uintptr_t)argv->intval) {
 			printf("Duplicate breakpoint %d.\n", i);
-			spinlock_unlock(&bkpoints_lock);
+			spinlock_unlock(&bkpoint_lock);
 			return 0;
 		} else if (breakpoints[i].address == (uintptr_t)argv->intval +
@@ -170,8 +170,8 @@
 			printf("Adjacent breakpoints not supported, conflict "
 			    "with %d.\n", i);
-			spinlock_unlock(&bkpoints_lock);
+			spinlock_unlock(&bkpoint_lock);
 			return 0;
 		}
-			
+		
 	}
 
Index: kernel/arch/mips32/src/dummy.S
===================================================================
--- kernel/arch/mips32/src/dummy.S	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#
-# Copyright (c) 2003-2004 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-.text
-.set noat
-
-.global calibrate_delay_loop
-.global asm_delay_loop
-.global dummy
-	
-calibrate_delay_loop:
-asm_delay_loop:
-
-dummy:
-	j $31
-	nop
Index: kernel/arch/mips32/src/interrupt.c
===================================================================
--- kernel/arch/mips32/src/interrupt.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ kernel/arch/mips32/src/interrupt.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -42,6 +42,7 @@
 #include <ddi/device.h>
 
-#define IRQ_COUNT 8
-#define TIMER_IRQ 7
+#define IRQ_COUNT   8
+#define TIMER_IRQ   7
+#define DORDER_IRQ  5
 
 function virtual_timer_fnc = NULL;
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ kernel/arch/mips32/src/mips32.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -167,4 +167,8 @@
 }
 
+void calibrate_delay_loop(void)
+{
+}
+
 void userspace(uspace_arg_t *kernel_uarg)
 {
Index: kernel/arch/mips32/src/mm/tlb.c
===================================================================
--- kernel/arch/mips32/src/mm/tlb.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ kernel/arch/mips32/src/mm/tlb.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32mm	
+/** @addtogroup mips32mm
  * @{
  */
@@ -42,5 +42,5 @@
 #include <arch.h>
 #include <symtab.h>
-#include <synch/spinlock.h>
+#include <synch/mutex.h>
 #include <print.h>
 #include <debug.h>
@@ -93,13 +93,13 @@
 	pte_t *pte;
 	int pfrc;
-
+	
 	badvaddr = cp0_badvaddr_read();
-
-	spinlock_lock(&AS->lock);
+	
+	mutex_lock(&AS->lock);
 	asid = AS->asid;
-	spinlock_unlock(&AS->lock);
-
+	mutex_unlock(&AS->lock);
+	
 	page_table_lock(AS, true);
-
+	
 	pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc);
 	if (!pte) {
Index: kernel/arch/mips32/src/smp/dorder.c
===================================================================
--- kernel/arch/mips32/src/smp/dorder.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
+++ kernel/arch/mips32/src/smp/dorder.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup mips32
+ * @{
+ */
+/** @file
+ */
+
+#include <arch/smp/dorder.h>
+
+#define MSIM_DORDER_ADDRESS  0xB0000004
+
+void ipi_broadcast_arch(int ipi)
+{
+#ifdef CONFIG_SMP
+	*((volatile unsigned int *) MSIM_DORDER_ADDRESS) = 0x7FFFFFFF;
+#endif
+}
+
+/** @}
+ */
Index: kernel/arch/mips32/src/smp/order.c
===================================================================
--- kernel/arch/mips32/src/smp/order.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2007 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup mips32	
- * @{
- */
-/** @file
- */
-
-#include <arch/smp/order.h>
-
-#define MSIM_ORDER_ADDRESS	0xB0000004
-
-void ipi_broadcast_arch(int ipi)
-{
-	*((volatile unsigned int *) MSIM_ORDER_ADDRESS) = 0x7FFFFFFF;
-}
-
-/** @}
- */
Index: kernel/arch/mips32/src/smp/smp.c
===================================================================
--- kernel/arch/mips32/src/smp/smp.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
+++ kernel/arch/mips32/src/smp/smp.c	(revision 7f34182064fa93a69263014cb1b9789bf87da965)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2009 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup mips32
+ * @{
+ */
+/** @file
+ */
+
+#include <smp/smp.h>
+
+#ifdef CONFIG_SMP
+
+void smp_init(void)
+{
+}
+
+void kmp(void *arg __attribute__((unused)))
+{
+}
+
+#endif /* CONFIG_SMP */
+
+/** @}
+ */
