Index: kernel/arch/abs32le/include/asm.h
===================================================================
--- kernel/arch/abs32le/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/abs32le/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -49,5 +49,5 @@
 
 
-static inline void cpu_halt(void)
+static inline __attribute__((noreturn)) void cpu_halt(void)
 {
 	/* On real hardware this should stop processing further
Index: kernel/arch/amd64/include/asm.h
===================================================================
--- kernel/arch/amd64/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/amd64/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -68,11 +68,11 @@
 }
 
-static inline void cpu_halt(void)
-{
-	asm volatile (
-		"0:\n"
-		"	hlt\n"
-		"	jmp 0b\n"
-	);
+static inline void __attribute__((noreturn)) cpu_halt(void)
+{
+	while (true) {
+		asm volatile (
+			"hlt\n"
+		);
+	}
 }
 
Index: kernel/arch/arm32/include/asm.h
===================================================================
--- kernel/arch/arm32/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/arm32/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -96,5 +96,5 @@
 }
 
-extern void cpu_halt(void);
+extern void cpu_halt(void) __attribute__((noreturn));
 extern void asm_delay_loop(uint32_t t);
 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
Index: kernel/arch/arm32/src/arm32.c
===================================================================
--- kernel/arch/arm32/src/arm32.c	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/arm32/src/arm32.c	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -155,5 +155,6 @@
 void cpu_halt(void)
 {
-	machine_cpu_halt();
+	while (true)
+		machine_cpu_halt();
 }
 
@@ -162,5 +163,5 @@
 {
 	/* not implemented */
-	while (1);
+	while (true);
 }
 
Index: kernel/arch/ia32/include/asm.h
===================================================================
--- kernel/arch/ia32/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/ia32/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -60,11 +60,11 @@
  *
  */
-static inline void cpu_halt(void)
-{
-	asm volatile (
-		"0:\n"
-		"	hlt\n"
-		"	jmp 0b\n"
-	);
+static inline __attribute__((noreturn)) void cpu_halt(void)
+{
+	while (true) {
+		asm volatile (
+			"hlt\n"
+		);
+	}
 }
 
Index: kernel/arch/ia64/include/asm.h
===================================================================
--- kernel/arch/ia64/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/ia64/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -428,5 +428,5 @@
 }
 
-extern void cpu_halt(void);
+extern void cpu_halt(void) __attribute__((noreturn));
 extern void cpu_sleep(void);
 extern void asm_delay_loop(uint32_t t);
Index: kernel/arch/mips32/include/asm.h
===================================================================
--- kernel/arch/mips32/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/mips32/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -66,5 +66,5 @@
 }
 
-extern void cpu_halt(void);
+extern void cpu_halt(void) __attribute__((noreturn));
 extern void asm_delay_loop(uint32_t t);
 extern void userspace_asm(uintptr_t ustack, uintptr_t uspace_uarg,
Index: kernel/arch/ppc32/include/asm.h
===================================================================
--- kernel/arch/ppc32/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/ppc32/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32	
+/** @addtogroup ppc32
  * @{
  */
@@ -146,37 +146,36 @@
 }
 
-void cpu_halt(void);
-void asm_delay_loop(uint32_t t);
-
+extern void cpu_halt(void) __attribute__((noreturn));
+extern void asm_delay_loop(uint32_t t);
 extern void userspace_asm(uintptr_t uspace_uarg, uintptr_t stack, uintptr_t entry);
 
 static inline void pio_write_8(ioport8_t *port, uint8_t v)
 {
-	*port = v;	
+	*port = v;
 }
 
 static inline void pio_write_16(ioport16_t *port, uint16_t v)
 {
-	*port = v;	
+	*port = v;
 }
 
 static inline void pio_write_32(ioport32_t *port, uint32_t v)
 {
-	*port = v;	
+	*port = v;
 }
 
 static inline uint8_t pio_read_8(ioport8_t *port)
 {
-	return *port; 
+	return *port;
 }
 
 static inline uint16_t pio_read_16(ioport16_t *port)
 {
-	return *port; 
+	return *port;
 }
 
 static inline uint32_t pio_read_32(ioport32_t *port)
 {
-	return *port; 
+	return *port;
 }
 
Index: kernel/arch/sparc64/include/asm.h
===================================================================
--- kernel/arch/sparc64/include/asm.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/arch/sparc64/include/asm.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -430,5 +430,5 @@
 }
 
-extern void cpu_halt(void);
+extern void cpu_halt(void) __attribute__((noreturn));
 extern void cpu_sleep(void);
 extern void asm_delay_loop(const uint32_t usec);
Index: kernel/generic/include/func.h
===================================================================
--- kernel/generic/include/func.h	(revision c1d354979b0e891f4be092b5abd830b8b06f53f4)
+++ kernel/generic/include/func.h	(revision b4cbef1df4af24ecf6ce8b7e766827011666ebf1)
@@ -41,5 +41,5 @@
 extern atomic_t haltstate;
 
-extern void halt(void);
+extern void halt(void) __attribute__((noreturn));
 extern unative_t atoi(const char *text);
 extern void order(const uint64_t val, uint64_t *rv, char *suffix);
