Index: generic/src/console/console.c
===================================================================
--- generic/src/console/console.c	(revision 961b5f01ab0baf25db1ae2fde08e1dd39e0e62bc)
+++ generic/src/console/console.c	(revision c43fa55776e570818cc110af5b944e2bc0d14546)
@@ -37,4 +37,5 @@
 #include <func.h>
 #include <print.h>
+#include <arch/atomic.h>
 
 /** Standard input character device. */
@@ -53,5 +54,5 @@
 	ipl_t ipl;
 
-	if (haltstate) {
+	if (atomic_get(&haltstate)) {
 		/* If we are here, we are hopefully on the processor, that 
 		 * issued the 'halt' command, so proceed to read the character
@@ -61,5 +62,9 @@
 			return chardev->op->read(chardev);
 		/* no other way of interacting with user, halt */
-		printf("cpu: halted - no kconsole\n");
+		if (CPU)
+			printf("cpu%d: ", CPU->id);
+		else
+			printf("cpu: ");
+		printf("halted - no kconsole\n");
 		cpu_halt();
 	}
Index: generic/src/lib/func.c
===================================================================
--- generic/src/lib/func.c	(revision 961b5f01ab0baf25db1ae2fde08e1dd39e0e62bc)
+++ generic/src/lib/func.c	(revision c43fa55776e570818cc110af5b944e2bc0d14546)
@@ -35,5 +35,5 @@
 #include <console/kconsole.h>
 
-__u32 volatile haltstate = 0; /**< Halt flag */
+atomic_t haltstate = {0}; /**< Halt flag */
 
 
@@ -43,13 +43,26 @@
  *
  */
-void halt(void)
+void halt()
 {
-	haltstate = 1;
+#ifdef CONFIG_DEBUG
+	bool rundebugger;
+
+//      TODO test_and_set not defined on all arches
+//	if (!test_and_set(&haltstate))
+	if (!atomic_get(&haltstate)) {
+		atomic_set(&haltstate, 1);
+		rundebugger = true;
+	}
+#else
+	atomic_set(haltstate, 1);
+#endif
+
 	interrupts_disable();
 #ifdef CONFIG_DEBUG
-	printf("\n");
-	kconsole("panic"); /* Run kconsole as a last resort to user */
+	if (rundebugger) {
+		printf("\n");
+		kconsole("panic"); /* Run kconsole as a last resort to user */
+	}
 #endif      
-
 	if (CPU)
 		printf("cpu%d: halted\n", CPU->id);
Index: generic/src/proc/scheduler.c
===================================================================
--- generic/src/proc/scheduler.c	(revision 961b5f01ab0baf25db1ae2fde08e1dd39e0e62bc)
+++ generic/src/proc/scheduler.c	(revision c43fa55776e570818cc110af5b944e2bc0d14546)
@@ -407,5 +407,5 @@
 	ipl = interrupts_disable();
 
-	if (haltstate)
+	if (atomic_get(&haltstate))
 		halt();
 
