Index: kernel/arch/abs32le/include/arch/stack.h
===================================================================
--- kernel/arch/abs32le/include/arch/stack.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/abs32le/include/arch/stack.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup abs32le	
+/** @addtogroup abs32le
  * @{
  */
Index: kernel/arch/abs32le/src/smp/smp_call.c
===================================================================
--- kernel/arch/abs32le/src/smp/smp_call.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/abs32le/src/smp/smp_call.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup abs32le 
+/** @addtogroup abs32le
  * @{
  */
Index: kernel/arch/amd64/include/arch/asm.h
===================================================================
--- kernel/arch/amd64/include/arch/asm.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/asm.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -165,5 +165,5 @@
 			"outb %b[val], %w[port]\n"
 			:: [val] "a" (val), [port] "d" (port)
-		);	
+		);
 	} else
 		*port = val;
Index: kernel/arch/amd64/include/arch/atomic.h
===================================================================
--- kernel/arch/amd64/include/arch/atomic.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/atomic.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -232,7 +232,7 @@
 
 #ifndef local_atomic_exchange
-/* 
+/*
  * Issuing a xchg instruction always implies lock prefix semantics.
- * Therefore, it is cheaper to use a cmpxchg without a lock prefix 
+ * Therefore, it is cheaper to use a cmpxchg without a lock prefix
  * in a loop.
  */
Index: kernel/arch/amd64/include/arch/context_struct.ag
===================================================================
--- kernel/arch/amd64/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/amd64/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/amd64/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/amd64/include/arch/kseg.h
===================================================================
--- kernel/arch/amd64/include/arch/kseg.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/kseg.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup amd64 
+/** @addtogroup amd64
  * @{
  */
Index: kernel/arch/amd64/include/arch/kseg_struct.ag
===================================================================
--- kernel/arch/amd64/include/arch/kseg_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/kseg_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2016 Jakub Jermar 
+# Copyright (c) 2016 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/amd64/include/arch/pm.h
===================================================================
--- kernel/arch/amd64/include/arch/pm.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/pm.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -115,5 +115,5 @@
 	unsigned : 2;
 	unsigned granularity : 1;
-	unsigned base_24_31: 8;	
+	unsigned base_24_31: 8;
 	unsigned base_32_63 : 32;
 	unsigned  : 32;
Index: kernel/arch/amd64/include/arch/vreg.h
===================================================================
--- kernel/arch/amd64/include/arch/vreg.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/include/arch/vreg.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup amd64 
+/** @addtogroup amd64
  * @{
  */
Index: kernel/arch/amd64/src/asm.S
===================================================================
--- kernel/arch/amd64/src/asm.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/asm.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -263,5 +263,5 @@
 SYMBOL(interrupt_handlers)
 .irp cnt, LIST_0_63
-	handler \cnt 
+	handler \cnt
 .endr
 
@@ -307,5 +307,5 @@
 	movq %rcx, ISTATE_OFFSET_RCX(%rsp)  /* userspace RIP */
 	movq %rdx, ISTATE_OFFSET_RDX(%rsp)  /* 3rd argument, observability */
-	movq %rsi, ISTATE_OFFSET_RSI(%rsp)  /* 2nd argument, observability */ 
+	movq %rsi, ISTATE_OFFSET_RSI(%rsp)  /* 2nd argument, observability */
 	movq %rdi, ISTATE_OFFSET_RDI(%rsp)  /* 1st argument, observability */
 	movq %rbp, ISTATE_OFFSET_RBP(%rsp)  /* need to preserve userspace RBP */
@@ -361,5 +361,5 @@
 	 */
 	testw $0xffff, ISTATE_OFFSET_RIP+6(%rsp)
-	jnz bad_rip 
+	jnz bad_rip
 
 	cli
Index: kernel/arch/amd64/src/cpu/cpu.c
===================================================================
--- kernel/arch/amd64/src/cpu/cpu.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/cpu/cpu.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -81,5 +81,5 @@
 /** Set the TS flag to 1.
  *
- * If a thread accesses coprocessor, exception is run, which 
+ * If a thread accesses coprocessor, exception is run, which
  * does a lazy fpu context switch.
  *
Index: kernel/arch/amd64/src/interrupt.c
===================================================================
--- kernel/arch/amd64/src/interrupt.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/interrupt.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -230,5 +230,5 @@
 	exc_register(VECTOR_TLB_SHOOTDOWN_IPI, "tlb_shootdown", true,
 	    (iroutine_t) tlb_shootdown_ipi);
-	exc_register(VECTOR_SMP_CALL_IPI, "smp_call", true, 
+	exc_register(VECTOR_SMP_CALL_IPI, "smp_call", true,
 		(iroutine_t) arch_smp_call_ipi_recv);
 #endif
Index: kernel/arch/amd64/src/kseg.c
===================================================================
--- kernel/arch/amd64/src/kseg.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/kseg.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup amd64 
+/** @addtogroup amd64
  * @{
  */
Index: kernel/arch/amd64/src/proc/scheduler.c
===================================================================
--- kernel/arch/amd64/src/proc/scheduler.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/proc/scheduler.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -58,5 +58,5 @@
 	CPU->arch.tss->rsp0 = (uintptr_t) &THREAD->kstack[STACK_SIZE];
 
-	kseg_t *kseg = (kseg_t *) read_msr(AMD_MSR_GS_KERNEL);	
+	kseg_t *kseg = (kseg_t *) read_msr(AMD_MSR_GS_KERNEL);
 	kseg->kstack_rsp = THREAD->arch.kstack_rsp;
 }
Index: kernel/arch/amd64/src/syscall.c
===================================================================
--- kernel/arch/amd64/src/syscall.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/syscall.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -60,5 +60,5 @@
 	    ((uint64_t) (GDT_SELECTOR(KTEXT_DES) | PL_KERNEL) << 32));
 	write_msr(AMD_MSR_LSTAR, (uint64_t)syscall_entry);
-	/* Mask RFLAGS on syscall 
+	/* Mask RFLAGS on syscall
 	 * - disable interrupts, until we exchange the stack register
 	 *   (mask the IF bit)
Index: kernel/arch/amd64/src/vreg.c
===================================================================
--- kernel/arch/amd64/src/vreg.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/amd64/src/vreg.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup amd64 
+/** @addtogroup amd64
  * @{
  */
@@ -71,5 +71,5 @@
 	write_msr(AMD_MSR_FS, (uintptr_t) page);
 
-	vreg_ptr = NULL; 
+	vreg_ptr = NULL;
 }
 
Index: kernel/arch/arm32/include/arch/asm.h
===================================================================
--- kernel/arch/arm32/include/arch/asm.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/asm.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -107,5 +107,5 @@
 	
 	asm volatile (
-		"and %[v], sp, %[size]\n" 
+		"and %[v], sp, %[size]\n"
 		: [v] "=r" (v)
 		: [size] "r" (~(STACK_SIZE - 1))
Index: kernel/arch/arm32/include/arch/barrier.h
===================================================================
--- kernel/arch/arm32/include/arch/barrier.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/barrier.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -78,5 +78,5 @@
 #define memory_barrier()  CP15DSB_write(0)
 #endif
-#define read_barrier()    CP15DSB_write(0) 
+#define read_barrier()    CP15DSB_write(0)
 #define write_barrier()   read_barrier()
 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a)
Index: kernel/arch/arm32/include/arch/context_struct.ag
===================================================================
--- kernel/arch/arm32/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/arm32/include/arch/fpu_context.h
===================================================================
--- kernel/arch/arm32/include/arch/fpu_context.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/fpu_context.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup arm32	
+/** @addtogroup arm32
  * @{
  */
Index: kernel/arch/arm32/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/arm32/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/arm32/include/arch/mm/as.h
===================================================================
--- kernel/arch/arm32/include/arch/mm/as.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/mm/as.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup arm32mm	
+/** @addtogroup arm32mm
  * @{
  */
Index: kernel/arch/arm32/include/arch/mm/asid.h
===================================================================
--- kernel/arch/arm32/include/arch/mm/asid.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/mm/asid.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup arm32mm	
+/** @addtogroup arm32mm
  * @{
  */
@@ -51,5 +51,5 @@
 #define asid_get()		(ASID_START + 1)
 
-#define asid_put(asid) 
+#define asid_put(asid)
 
 #endif
Index: kernel/arch/arm32/include/arch/stack.h
===================================================================
--- kernel/arch/arm32/include/arch/stack.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/include/arch/stack.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup arm32	
+/** @addtogroup arm32
  * @{
  */
Index: kernel/arch/arm32/src/atomic.c
===================================================================
--- kernel/arch/arm32/src/atomic.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/atomic.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -46,5 +46,5 @@
 void * __sync_val_compare_and_swap_4(void **ptr, void *expected, void *new_val)
 {
-	/* 
+	/*
 	 * Using an interrupt disabling spinlock might still lead to deadlock
 	 * if CAS() is used in an exception handler. Eg. if a CAS() results
Index: kernel/arch/arm32/src/context.S
===================================================================
--- kernel/arch/arm32/src/context.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/context.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -29,5 +29,5 @@
 #include <abi/asmtool.h>
 
-.text   
+.text
 
 FUNCTION_BEGIN(context_save_arch)
Index: kernel/arch/arm32/src/exc_handler.S
===================================================================
--- kernel/arch/arm32/src/exc_handler.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/exc_handler.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -29,5 +29,5 @@
 #include <abi/asmtool.h>
 
-.text   
+.text
 
 # Switches to kernel stack and saves all registers there.
Index: kernel/arch/arm32/src/interrupt.c
===================================================================
--- kernel/arch/arm32/src/interrupt.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/interrupt.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -73,5 +73,5 @@
 {
 	current_status_reg_control_write(
-	    (current_status_reg_read() & ~STATUS_REG_IRQ_DISABLED_BIT) | 
+	    (current_status_reg_read() & ~STATUS_REG_IRQ_DISABLED_BIT) |
 	    (ipl & STATUS_REG_IRQ_DISABLED_BIT));
 }
Index: kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
===================================================================
--- kernel/arch/arm32/src/mach/integratorcp/integratorcp.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/mach/integratorcp/integratorcp.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -113,5 +113,5 @@
 
 /** Masks interrupt.
- * 
+ *
  * @param irq interrupt number
  */
@@ -123,5 +123,5 @@
 
 /** Unmasks interrupt.
- * 
+ *
  * @param irq interrupt number
  */
Index: kernel/arch/arm32/src/mm/as.c
===================================================================
--- kernel/arch/arm32/src/mm/as.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/mm/as.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -43,5 +43,5 @@
 
 /** Architecture dependent address space init.
- *  
+ *
  *  Since ARM supports page tables, #as_pt_operations are used.
  */
Index: kernel/arch/arm32/src/mm/tlb.c
===================================================================
--- kernel/arch/arm32/src/mm/tlb.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/mm/tlb.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup arm32mm	
+/** @addtogroup arm32mm
  * @{
  */
Index: kernel/arch/arm32/src/ras.c
===================================================================
--- kernel/arch/arm32/src/ras.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/arm32/src/ras.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -59,5 +59,5 @@
 	    PAGE_SIZE, PAGE_READ | PAGE_WRITE | PAGE_USER | PAGE_CACHEABLE);
 	
-	memsetb(ras_page, PAGE_SIZE, 0); 
+	memsetb(ras_page, PAGE_SIZE, 0);
 	ras_page[RAS_START] = 0;
 	ras_page[RAS_END] = 0xffffffff;
Index: kernel/arch/ia32/include/arch/asm.h
===================================================================
--- kernel/arch/ia32/include/arch/asm.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/asm.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -119,5 +119,5 @@
 			"outb %b[val], %w[port]\n"
 			:: [val] "a" (val), [port] "d" (port)
-		);	
+		);
 	} else
 		*port = val;
@@ -417,5 +417,5 @@
 {
 	asm volatile (
-		"lidtl %[idtr_reg]\n" 
+		"lidtl %[idtr_reg]\n"
 		:: [idtr_reg] "m" (*idtr_reg)
 	);
Index: kernel/arch/ia32/include/arch/atomic.h
===================================================================
--- kernel/arch/ia32/include/arch/atomic.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/atomic.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -220,7 +220,7 @@
 
 #ifndef local_atomic_exchange
-/* 
+/*
  * Issuing a xchg instruction always implies lock prefix semantics.
- * Therefore, it is cheaper to use a cmpxchg without a lock prefix 
+ * Therefore, it is cheaper to use a cmpxchg without a lock prefix
  * in a loop.
  */
Index: kernel/arch/ia32/include/arch/boot/memmap_struct.ag
===================================================================
--- kernel/arch/ia32/include/arch/boot/memmap_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/boot/memmap_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2016 Jakub Jermar 
+# Copyright (c) 2016 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ia32/include/arch/context_struct.ag
===================================================================
--- kernel/arch/ia32/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ia32/include/arch/cpu.h
===================================================================
--- kernel/arch/ia32/include/arch/cpu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/cpu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -43,5 +43,5 @@
 #define EFLAGS_ID	(1 << 21)
 
-#define CR0_PE		(1 << 0) 
+#define CR0_PE		(1 << 0)
 #define CR0_TS		(1 << 3)
 #define CR0_AM		(1 << 18)
Index: kernel/arch/ia32/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/ia32/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ia32/include/arch/mm/page.h
===================================================================
--- kernel/arch/ia32/include/arch/mm/page.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/include/arch/mm/page.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -161,5 +161,5 @@
 #define PFERR_CODE_US		(1 << 2)
 
-/** When bit on this position is 1, a reserved bit was set in page directory. */ 
+/** When bit on this position is 1, a reserved bit was set in page directory. */
 #define PFERR_CODE_RSVD		(1 << 3)
 
Index: kernel/arch/ia32/src/asm.S
===================================================================
--- kernel/arch/ia32/src/asm.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/asm.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -139,5 +139,5 @@
  * and without the error word.
  */
-#define ISTATE_SOFT_SIZE	ISTATE_SIZE - (6 * 4) 
+#define ISTATE_SOFT_SIZE	ISTATE_SIZE - (6 * 4)
 
 /*
@@ -329,5 +329,5 @@
 	.else
 		/*
-		 * Interrupt: fake up an error word 
+		 * Interrupt: fake up an error word
 		 */
 		subl $(ISTATE_SOFT_SIZE + 4), %esp
@@ -433,5 +433,5 @@
 
 interrupt_handlers:
-.irp cnt, LIST_0_63 
+.irp cnt, LIST_0_63
 	handler \cnt
 .endr
Index: kernel/arch/ia32/src/atomic.S
===================================================================
--- kernel/arch/ia32/src/atomic.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/atomic.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -34,5 +34,5 @@
 
 #
-# This is a bus-and-hyperthreading-friendly implementation of spinlock 
+# This is a bus-and-hyperthreading-friendly implementation of spinlock
 #
 FUNCTION_BEGIN(spinlock_arch)
@@ -42,5 +42,5 @@
 	movl 12(%esp),%ebx
 
-0:	
+0:
 	pause			# Pentium 4's with HT love this instruction
 	movl (%ebx),%eax
Index: kernel/arch/ia32/src/context.S
===================================================================
--- kernel/arch/ia32/src/context.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/context.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -39,6 +39,6 @@
 #
 FUNCTION_BEGIN(context_save_arch)
-	movl 0(%esp), %eax	# save pc value into eax	
-	movl 4(%esp), %edx	# address of the context variable to save context to 
+	movl 0(%esp), %eax	# save pc value into eax
+	movl 4(%esp), %edx	# address of the context variable to save context to
 
 	# save registers to given structure
Index: kernel/arch/ia32/src/cpu/cpu.c
===================================================================
--- kernel/arch/ia32/src/cpu/cpu.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/cpu/cpu.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -72,10 +72,10 @@
 void fpu_disable(void)
 {
-	write_cr0(read_cr0() & ~CR0_TS); 
+	write_cr0(read_cr0() & ~CR0_TS);
 }
 
 void fpu_enable(void)
 {
-	write_cr0(read_cr0() | CR0_TS); 
+	write_cr0(read_cr0() | CR0_TS);
 }
 
@@ -150,5 +150,5 @@
 void cpu_print_report(cpu_t* cpu)
 {
-	printf("cpu%u: (%s family=%u model=%u stepping=%u apicid=%u) %" PRIu16 
+	printf("cpu%u: (%s family=%u model=%u stepping=%u apicid=%u) %" PRIu16
 		" MHz\n", cpu->id, vendor_str[cpu->arch.vendor], cpu->arch.family,
 		cpu->arch.model, cpu->arch.stepping, cpu->arch.id, cpu->frequency_mhz);
Index: kernel/arch/ia32/src/smp/ap.S
===================================================================
--- kernel/arch/ia32/src/smp/ap.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/smp/ap.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -47,5 +47,5 @@
 KDATA=16
 
-/* 
+/*
  * This piece of code is real-mode and is meant to be aligned at 4K boundary.
  * The requirement for such an alignment comes from MP Specification's
Index: kernel/arch/ia32/src/smp/smp.c
===================================================================
--- kernel/arch/ia32/src/smp/smp.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/smp/smp.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -106,5 +106,5 @@
 
 	/*
-	 * SMP initialized, cpus array allocated. Assign each CPU its 
+	 * SMP initialized, cpus array allocated. Assign each CPU its
 	 * physical APIC ID.
 	 */
Index: kernel/arch/ia32/src/vreg.c
===================================================================
--- kernel/arch/ia32/src/vreg.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia32/src/vreg.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -75,5 +75,5 @@
 	gs_load(GDT_SELECTOR(VREG_DES));
 
-	vreg_ptr = NULL; 
+	vreg_ptr = NULL;
 }
 
Index: kernel/arch/ia64/include/arch/barrier.h
===================================================================
--- kernel/arch/ia64/include/arch/barrier.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/barrier.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64	
+/** @addtogroup ia64
  * @{
  */
@@ -52,5 +52,5 @@
 
 #define fc_i(a)			\
-	asm volatile ("fc.i %0\n" :: "r" ((a)) : "memory")  
+	asm volatile ("fc.i %0\n" :: "r" ((a)) : "memory")
 #define sync_i()		\
 	asm volatile (";; sync.i\n" ::: "memory")
Index: kernel/arch/ia64/include/arch/context_struct.ag
===================================================================
--- kernel/arch/ia64/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ia64/include/arch/drivers/it.h
===================================================================
--- kernel/arch/ia64/include/arch/drivers/it.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/drivers/it.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64	
+/** @addtogroup ia64
  * @{
  */
Index: kernel/arch/ia64/include/arch/drivers/kbd.h
===================================================================
--- kernel/arch/ia64/include/arch/drivers/kbd.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/drivers/kbd.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia6464	
+/** @addtogroup ia6464
  * @{
  */
Index: kernel/arch/ia64/include/arch/fpu_context.h
===================================================================
--- kernel/arch/ia64/include/arch/fpu_context.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/fpu_context.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64	
+/** @addtogroup ia64
  * @{
  */
Index: kernel/arch/ia64/include/arch/interrupt.h
===================================================================
--- kernel/arch/ia64/include/arch/interrupt.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/interrupt.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -58,5 +58,5 @@
 #define INR_COUNT  256
 
-#define IVT_ITEMS  128 
+#define IVT_ITEMS  128
 #define IVT_FIRST  0
 
Index: kernel/arch/ia64/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/ia64/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ia64/include/arch/legacyio.h
===================================================================
--- kernel/arch/ia64/include/arch/legacyio.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/legacyio.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -41,5 +41,5 @@
 
 /* Legacy I/O space - static uspace address, FIXME */
-#define LEGACYIO_USER_BASE	0x0001000000000000ULL 
+#define LEGACYIO_USER_BASE	0x0001000000000000ULL
 
 #define LEGACYIO_PAGE_WIDTH		26	/* 64M */
Index: kernel/arch/ia64/include/arch/mm/asid.h
===================================================================
--- kernel/arch/ia64/include/arch/mm/asid.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/mm/asid.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64mm	
+/** @addtogroup ia64mm
  * @{
  */
@@ -48,5 +48,5 @@
  * Number of ia64 RIDs (Region Identifiers) per kernel ASID.
  * Note that some architectures may support more bits,
- * but those extra bits are not used by the kernel. 
+ * but those extra bits are not used by the kernel.
  */
 #define RIDS_PER_ASID		8
Index: kernel/arch/ia64/include/arch/mm/vhpt.h
===================================================================
--- kernel/arch/ia64/include/arch/mm/vhpt.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/mm/vhpt.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64mm	
+/** @addtogroup ia64mm
  * @{
  */
@@ -41,5 +41,5 @@
 uintptr_t vhpt_set_up(void);
 
-static inline vhpt_entry_t tlb_entry_t2vhpt_entry_t(tlb_entry_t tentry) 
+static inline vhpt_entry_t tlb_entry_t2vhpt_entry_t(tlb_entry_t tentry)
 {
 	vhpt_entry_t ventry;
Index: kernel/arch/ia64/include/arch/pal/pal.h
===================================================================
--- kernel/arch/ia64/include/arch/pal/pal.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/pal/pal.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64	
+/** @addtogroup ia64
  * @{
  */
Index: kernel/arch/ia64/include/arch/stack.h
===================================================================
--- kernel/arch/ia64/include/arch/stack.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/include/arch/stack.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64	
+/** @addtogroup ia64
  * @{
  */
Index: kernel/arch/ia64/src/asm.S
===================================================================
--- kernel/arch/ia64/src/asm.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/asm.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -65,5 +65,5 @@
 	1:
 	
-		add r14 = r16, in1 
+		add r14 = r16, in1
 		add r15 = r16, in0
 		adds r17 = 1, r17 ;;
@@ -113,5 +113,5 @@
 		add in0 = r14, in0
 		adds r15 = -1, r15
-		add r17 = r14, in1 
+		add r17 = r14, in1
 		(p6) br.cond.dpnt 2b ;;
 		mov ar.lc = r15
Index: kernel/arch/ia64/src/context.S
===================================================================
--- kernel/arch/ia64/src/context.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/context.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -44,5 +44,5 @@
 	 */
 	flushrs
-	mov loc4 = ar.bsp	
+	mov loc4 = ar.bsp
 	
 	/*
@@ -240,5 +240,5 @@
 	ld8 loc6 = [loc15]	/* load ar.lc */
 	
-	.auto	
+	.auto
 
 	/*
@@ -286,5 +286,5 @@
 	ld8.fill r13 = [loc22] ;;
 
-	/* 
+	/*
 	 * Restore branch registers
 	 */
Index: kernel/arch/ia64/src/fpu_context.c
===================================================================
--- kernel/arch/ia64/src/fpu_context.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/fpu_context.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia64	
+/** @addtogroup ia64
  * @{
  */
@@ -71,5 +71,5 @@
 		"stf.spill %[f60] = f60\n"
 		"stf.spill %[f61] = f61\n"
-		: 
+		:
 		[f32] "=m" (fctx->fr[0]),
 		[f33] "=m" (fctx->fr[1]),
@@ -102,5 +102,5 @@
 		[f60] "=m" (fctx->fr[28]),
 		[f61] "=m" (fctx->fr[29])
-	); 
+	);
 	
 	asm volatile (
@@ -313,5 +313,5 @@
 		[f60] "m" (fctx->fr[28]),
 		[f61] "m" (fctx->fr[29])
-	); 
+	);
 	
 	asm volatile (
Index: kernel/arch/ia64/src/ia64.c
===================================================================
--- kernel/arch/ia64/src/ia64.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/ia64.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -114,5 +114,5 @@
 	myeid = ia64_get_cpu_eid();
 
-	for (i = 0; i < 16; i++) { 
+	for (i = 0; i < 16; i++) {
 		if (i == 2)
 			continue;	 /* Disable Cascade interrupt */
@@ -140,5 +140,5 @@
 		irq_init(INR_COUNT, INR_COUNT);
 	}
-	it_init();	
+	it_init();
 }
 
Index: kernel/arch/ia64/src/interrupt.c
===================================================================
--- kernel/arch/ia64/src/interrupt.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/interrupt.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -320,5 +320,5 @@
 	    vector_to_string(EXC_INST_A_BIT_FAULT), true,
 	    instruction_access_bit_fault);
-	exc_register(EXC_DATA_A_BIT_FAULT, 
+	exc_register(EXC_DATA_A_BIT_FAULT,
 	    vector_to_string(EXC_DATA_A_BIT_FAULT), true,
 	    data_access_bit_fault);
Index: kernel/arch/ia64/src/ivt.S
===================================================================
--- kernel/arch/ia64/src/ivt.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/ivt.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -48,5 +48,5 @@
 
 /* Speculation vector handler */
-.macro SPECULATION_VECTOR_HANDLER vector 
+.macro SPECULATION_VECTOR_HANDLER vector
     .org ivt + \vector * 0x100
 
@@ -111,5 +111,5 @@
 	/* Set up FPU as in interrupted context. */
 	mov r24 = psr
-	mov r25 = cr.ipsr 
+	mov r25 = cr.ipsr
 	mov r26 = PSR_DFH_MASK
 	mov r27 = ~PSR_DFH_MASK ;;
@@ -175,5 +175,5 @@
 (p6)	st8 [r31] = r38, -STACK_ITEM_SIZE ;;	/* save in6 */
 (p6)	st8 [r31] = r37, -STACK_ITEM_SIZE ;;	/* save in5 */
-(p6)	st8 [r31] = r36, -STACK_ITEM_SIZE ;;	/* save in4 */	
+(p6)	st8 [r31] = r36, -STACK_ITEM_SIZE ;;	/* save in4 */
 (p6)	st8 [r31] = r35, -STACK_ITEM_SIZE ;;	/* save in3 */
 (p6) 	st8 [r31] = r34, -STACK_ITEM_SIZE ;;	/* save in2 */
@@ -182,5 +182,5 @@
 (p5)	add r31 = -(7 * STACK_ITEM_SIZE), r31 ;;
     
-	st8 [r31] = r30, -STACK_ITEM_SIZE ;;	/* save old stack pointer */ 
+	st8 [r31] = r30, -STACK_ITEM_SIZE ;;	/* save old stack pointer */
 	
 	st8 [r31] = r29, -STACK_ITEM_SIZE ;;	/* save predicate registers */
@@ -250,5 +250,5 @@
 	mov r24 = ar.rsc ;;
 	and r30 = ~3, r24 ;;
-	or  r24 = r30 , r27 ;;     
+	or  r24 = r30 , r27 ;;
 	mov ar.rsc = r24 ;;		/* place RSE in enforced lazy mode */
 
@@ -264,10 +264,10 @@
 
 	mov ar.pfs = r25		/* (step 6) */
-	mov cr.ifs = r26	
+	mov cr.ifs = r26
 
 	mov ar.rsc = r24		/* (step 7) */
 
     /* 17. restore interruption state from memory stack */
-	ld8 r28 = [r31], +STACK_ITEM_SIZE ;;	/* load cr.ifa */		
+	ld8 r28 = [r31], +STACK_ITEM_SIZE ;;	/* load cr.ifa */
 	ld8 r27 = [r31], +STACK_ITEM_SIZE ;;	/* load cr.isr */
 	ld8 r26 = [r31], +STACK_ITEM_SIZE ;;	/* load cr.iipa */
@@ -294,5 +294,5 @@
 	
     /* 19. return from interruption */
-    	ld8 r12 = [r31]				/* load stack pointer */ 
+    	ld8 r12 = [r31]				/* load stack pointer */
 	rfi ;;
 
@@ -391,5 +391,5 @@
 	stf.spill [r31] = f15, 8 * FLOAT_ITEM_SIZE ;;
 
-	stf.spill [r24] = f16, 8 * FLOAT_ITEM_SIZE 
+	stf.spill [r24] = f16, 8 * FLOAT_ITEM_SIZE
 	stf.spill [r25] = f17, 8 * FLOAT_ITEM_SIZE
 	stf.spill [r26] = f18, 8 * FLOAT_ITEM_SIZE
@@ -503,5 +503,5 @@
 	mov r24 = loc39
 	mov r25 = loc40
-	mov r26 = loc41 
+	mov r26 = loc41
 	mov r27 = loc42
 	mov r28 = loc43
@@ -575,5 +575,5 @@
 	HEAVYWEIGHT_HANDLER 0x5b
 	HEAVYWEIGHT_HANDLER 0x5c
-	HEAVYWEIGHT_HANDLER 0x5d 
+	HEAVYWEIGHT_HANDLER 0x5d
 	HEAVYWEIGHT_HANDLER 0x5e
 	HEAVYWEIGHT_HANDLER 0x5f
Index: kernel/arch/ia64/src/mm/km.c
===================================================================
--- kernel/arch/ia64/src/mm/km.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/mm/km.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -40,5 +40,5 @@
 {
 	config.identity_base = KM_IA64_IDENTITY_START;
-	config.identity_size = KM_IA64_IDENTITY_SIZE;	
+	config.identity_size = KM_IA64_IDENTITY_SIZE;
 }
 
Index: kernel/arch/ia64/src/mm/page.c
===================================================================
--- kernel/arch/ia64/src/mm/page.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/mm/page.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -85,5 +85,5 @@
 	}
 
-#ifdef CONFIG_VHPT	
+#ifdef CONFIG_VHPT
 	vhpt_base = vhpt_set_up();
 #endif
@@ -193,5 +193,5 @@
 	srlz_d();
 
-	return match;		
+	return match;
 }
 
@@ -247,5 +247,5 @@
 	v->present.pl = (flags & PAGE_USER) ? PL_USER : PL_KERNEL;
 	v->present.ar = (flags & PAGE_WRITE) ? AR_WRITE : AR_READ;
-	v->present.ar |= (flags & PAGE_EXEC) ? AR_EXECUTE : 0; 
+	v->present.ar |= (flags & PAGE_EXEC) ? AR_EXECUTE : 0;
 	v->present.ppn = frame >> PPN_SHIFT;
 	v->present.ed = false;  /* exception not deffered */
Index: kernel/arch/ia64/src/mm/tlb.c
===================================================================
--- kernel/arch/ia64/src/mm/tlb.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/mm/tlb.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -593,5 +593,5 @@
 		if (va < end_of_identity) {
 			/*
-			 * Create kernel identity mapping for low memory. 
+			 * Create kernel identity mapping for low memory.
 			 */
 			dtlb_kernel_mapping_insert(va, KA2PA(va), false, 0);
Index: kernel/arch/ia64/src/start.S
===================================================================
--- kernel/arch/ia64/src/start.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ia64/src/start.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -122,7 +122,7 @@
 	# (i.e. location of interruption vector table)
 	#
-	movl r8 = ivt ;; 
+	movl r8 = ivt ;;
 	mov cr.iva = r8
-	srlz.d ;;	
+	srlz.d ;;
 
 	
Index: kernel/arch/mips32/include/arch/cache.h
===================================================================
--- kernel/arch/mips32/include/arch/cache.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/cache.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32	
+/** @addtogroup mips32
  * @{
  */
Index: kernel/arch/mips32/include/arch/context_struct.ag
===================================================================
--- kernel/arch/mips32/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/mips32/include/arch/fpu_context.h
===================================================================
--- kernel/arch/mips32/include/arch/fpu_context.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/fpu_context.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32	
+/** @addtogroup mips32
  * @{
  */
Index: kernel/arch/mips32/include/arch/fpu_context_struct.ag
===================================================================
--- kernel/arch/mips32/include/arch/fpu_context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/fpu_context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/mips32/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/mips32/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/mips32/include/arch/mach/malta/malta.h
===================================================================
--- kernel/arch/mips32/include/arch/mach/malta/malta.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/mach/malta/malta.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2013 Jakub Jermar 
+ * Copyright (c) 2013 Jakub Jermar
  * All rights reserved.
  *
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32 
+/** @addtogroup mips32
  * @{
  */
Index: kernel/arch/mips32/include/arch/mach/msim/msim.h
===================================================================
--- kernel/arch/mips32/include/arch/mach/msim/msim.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/mach/msim/msim.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2013 Jakub Jermar 
+ * Copyright (c) 2013 Jakub Jermar
  * All rights reserved.
  *
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32 
+/** @addtogroup mips32
  * @{
  */
Index: kernel/arch/mips32/include/arch/mm/asid.h
===================================================================
--- kernel/arch/mips32/include/arch/mm/asid.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/mm/asid.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32mm	
+/** @addtogroup mips32mm
  * @{
  */
Index: kernel/arch/mips32/include/arch/mm/page.h
===================================================================
--- kernel/arch/mips32/include/arch/mm/page.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/mm/page.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -52,5 +52,5 @@
 /*
  * Implementation of generic 4-level page table interface.
- * 
+ *
  * Page table layout:
  * - 32-bit virtual addresses
Index: kernel/arch/mips32/include/arch/mm/tlb.h
===================================================================
--- kernel/arch/mips32/include/arch/mm/tlb.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/include/arch/mm/tlb.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -52,5 +52,5 @@
 #endif
 
-#define TLB_WIRED              	0 
+#define TLB_WIRED              	0
 
 #define TLB_PAGE_MASK_4K    (0x000 << 13)
Index: kernel/arch/mips32/src/cpu/cpu.c
===================================================================
--- kernel/arch/mips32/src/cpu/cpu.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/cpu/cpu.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -125,5 +125,5 @@
 
 	printf("cpu%u: %s %s (rev=%d.%d, imp=%d)\n",
-		m->id, data->vendor, data->model, m->arch.rev_num >> 4, 
+		m->id, data->vendor, data->model, m->arch.rev_num >> 4,
 		m->arch.rev_num & 0x0f, m->arch.imp_num);
 }
Index: kernel/arch/mips32/src/debug/stacktrace.c
===================================================================
--- kernel/arch/mips32/src/debug/stacktrace.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/debug/stacktrace.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -36,5 +36,5 @@
  * This stack tracing code is based on the suggested algorithm described on page
  * 3-27 and 3-28 of:
- * 
+ *
  * SYSTEM V
  * APPLICATION BINARY INTERFACE
@@ -88,5 +88,5 @@
 #define BASE_MASK	RS_MASK
 #define IMM_MASK	(0xffff << IMM_SHIFT)
-#define OFFSET_MASK	IMM_MASK	
+#define OFFSET_MASK	IMM_MASK
 
 #define RS_GET(inst)		(((inst) & RS_MASK) >> RS_SHIFT)
@@ -94,5 +94,5 @@
 #define IMM_GET(inst)		(int16_t)(((inst) & IMM_MASK) >> IMM_SHIFT)
 #define BASE_GET(inst)		RS_GET(inst)
-#define OFFSET_GET(inst)	IMM_GET(inst)	
+#define OFFSET_GET(inst)	IMM_GET(inst)
 
 #define ADDU_R_SP_R0_TEMPL \
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/debugger.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -386,5 +386,5 @@
 			((uint32_t *)cur->address)[1] = 0x0d;
 			cur->flags |= BKPOINT_REINST;
-		} 
+		}
 		cur->flags |= BKPOINT_INPROG;
 	} else {
Index: kernel/arch/mips32/src/exception.c
===================================================================
--- kernel/arch/mips32/src/exception.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/exception.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -132,5 +132,5 @@
 	debugger_bpoint(istate);
 #else
-	/* it is necessary to not re-execute BREAK instruction after 
+	/* it is necessary to not re-execute BREAK instruction after
 	   returning from Exception handler
 	   (see page 138 in R4000 Manual for more information) */
Index: kernel/arch/mips32/src/mach/malta/malta.c
===================================================================
--- kernel/arch/mips32/src/mach/malta/malta.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/mach/malta/malta.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32 
+/** @addtogroup mips32
  * @{
  */
@@ -54,5 +54,5 @@
 	.machine_output_init = malta_output_init,
 	.machine_input_init = malta_input_init,
-	.machine_get_platform_name = malta_get_platform_name	
+	.machine_get_platform_name = malta_get_platform_name
 };
 
Index: kernel/arch/mips32/src/mach/msim/msim.c
===================================================================
--- kernel/arch/mips32/src/mach/msim/msim.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/mach/msim/msim.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32 
+/** @addtogroup mips32
  * @{
  */
@@ -57,5 +57,5 @@
 	.machine_output_init = msim_output_init,
 	.machine_input_init = msim_input_init,
-	.machine_get_platform_name = msim_get_platform_name	
+	.machine_get_platform_name = msim_get_platform_name
 };
 
Index: kernel/arch/mips32/src/mm/frame.c
===================================================================
--- kernel/arch/mips32/src/mm/frame.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/mm/frame.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -141,5 +141,5 @@
 
 	if (!frame_adjust_zone_bounds(low, &base, &size))
-		return; 
+		return;
 
 	pfn_t first = ADDR2PFN(base);
@@ -291,5 +291,5 @@
 		printf("%#010x %10u\n",
 			PFN2ADDR(phys_regions[i].start), PFN2ADDR(phys_regions[i].count));
-	}	
+	}
 }
 
Index: kernel/arch/mips32/src/mm/tlb.c
===================================================================
--- kernel/arch/mips32/src/mm/tlb.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/mips32/src/mm/tlb.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -219,5 +219,5 @@
 	 * We do not assert on this because this could be a manifestation of
 	 * an emulator bug, such as QEMU Bug #1128935:
-	 * https://bugs.launchpad.net/qemu/+bug/1128935  
+	 * https://bugs.launchpad.net/qemu/+bug/1128935
 	 */
 	if (index.p) {
Index: kernel/arch/ppc32/include/arch/context_struct.ag
===================================================================
--- kernel/arch/ppc32/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ppc32/include/arch/fpu_context.h
===================================================================
--- kernel/arch/ppc32/include/arch/fpu_context.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/include/arch/fpu_context.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_FPU_CONTEXT_H_
 
-#define FPU_CONTEXT_ALIGN	8	
+#define FPU_CONTEXT_ALIGN	8
 
 #include <arch/fpu_context_struct.h>
Index: kernel/arch/ppc32/include/arch/fpu_context_struct.ag
===================================================================
--- kernel/arch/ppc32/include/arch/fpu_context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/include/arch/fpu_context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ppc32/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/ppc32/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/ppc32/src/drivers/pic.c
===================================================================
--- kernel/arch/ppc32/src/drivers/pic.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/src/drivers/pic.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -71,5 +71,5 @@
 {
 	if (pic) {
-		if (intnum < 32) 
+		if (intnum < 32)
 			pic[PIC_ACK_LOW] = 1 << intnum;
 		else
Index: kernel/arch/ppc32/src/exception.S
===================================================================
--- kernel/arch/ppc32/src/exception.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/src/exception.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -49,5 +49,5 @@
 	
 	mfsrr1 sp # use sp as a temporary register to hold SRR1
-	andi. sp, sp, MSR_PR 
+	andi. sp, sp, MSR_PR
 	bne 1f
 		# previous mode was kernel
Index: kernel/arch/ppc32/src/ppc32.c
===================================================================
--- kernel/arch/ppc32/src/ppc32.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/ppc32/src/ppc32.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -123,5 +123,5 @@
 	cpu_node = cpus_node->child;
 	if (!cpu_node)
-		panic("Could not find first cpu.");	
+		panic("Could not find first cpu.");
 
 	freq_prop = ofw_tree_getprop(cpu_node, "timebase-frequency");
Index: kernel/arch/sparc64/include/arch/console.h
===================================================================
--- kernel/arch/sparc64/include/arch/console.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/console.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/context_struct.ag
===================================================================
--- kernel/arch/sparc64/include/arch/context_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/context_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/sparc64/include/arch/cpu.h
===================================================================
--- kernel/arch/sparc64/include/arch/cpu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/cpu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -65,5 +65,5 @@
 
 
-#endif	
+#endif
 
 #endif
Index: kernel/arch/sparc64/include/arch/cpu_family.h
===================================================================
--- kernel/arch/sparc64/include/arch/cpu_family.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/cpu_family.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -43,5 +43,5 @@
 /**
  * Find the processor (sub)family.
- * 
+ *
  * @return 	true iff the CPU belongs to the US family
  */
@@ -55,5 +55,5 @@
 /**
  * Find the processor (sub)family.
- * 
+ *
  * @return 	true iff the CPU belongs to the US-III subfamily
  */
@@ -68,5 +68,5 @@
 /**
  * Find the processor (sub)family.
- * 
+ *
  * @return 	true iff the CPU belongs to the US-IV subfamily
  */
Index: kernel/arch/sparc64/include/arch/cpu_node.h
===================================================================
--- kernel/arch/sparc64/include/arch/cpu_node.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/cpu_node.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -43,5 +43,5 @@
  *  Depending on the machine type (and possibly the OFW version), CPUs can be
  *  at "/" or at "/ssm@0,0".
- */ 
+ */
 static inline ofw_tree_node_t *cpus_parent(void)
 {
Index: kernel/arch/sparc64/include/arch/drivers/fb.h
===================================================================
--- kernel/arch/sparc64/include/arch/drivers/fb.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/drivers/fb.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/drivers/niagara.h
===================================================================
--- kernel/arch/sparc64/include/arch/drivers/niagara.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/drivers/niagara.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/drivers/pci.h
===================================================================
--- kernel/arch/sparc64/include/arch/drivers/pci.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/drivers/pci.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/fpu_context.h
===================================================================
--- kernel/arch/sparc64/include/arch/fpu_context.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/fpu_context.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/arch/interrupt.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/interrupt.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -40,5 +40,5 @@
 
 #define IVT_ITEMS  512
-#define IVT_FIRST  0 
+#define IVT_FIRST  0
 
 /* This needs to be defined for inter-architecture API portability. */
Index: kernel/arch/sparc64/include/arch/istate_struct.ag
===================================================================
--- kernel/arch/sparc64/include/arch/istate_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/istate_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2014 Jakub Jermar 
+# Copyright (c) 2014 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/arch/sparc64/include/arch/mm/asid.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/asid.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/asid.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/mmu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/mmu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/page.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/page.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/page.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/pagesize.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/pagesize.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/pagesize.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
@@ -43,5 +43,5 @@
 /* I-MMU ASIs. */
 #define ASI_IMMU			0x50
-#define ASI_IMMU_TSB_8KB_PTR_REG	0x51	
+#define ASI_IMMU_TSB_8KB_PTR_REG	0x51
 #define ASI_IMMU_TSB_64KB_PTR_REG	0x52
 #define ASI_ITLB_DATA_IN_REG		0x54
@@ -63,5 +63,5 @@
 /* D-MMU ASIs. */
 #define ASI_DMMU			0x58
-#define ASI_DMMU_TSB_8KB_PTR_REG	0x59	
+#define ASI_DMMU_TSB_8KB_PTR_REG	0x59
 #define ASI_DMMU_TSB_64KB_PTR_REG	0x5a
 #define ASI_DMMU_TSB_DIRECT_PTR_REG	0x5b
@@ -106,5 +106,5 @@
 		unsigned vw : 1;
 		unsigned : 1;
-		unsigned fm : 16;	
+		unsigned fm : 16;
 		unsigned dm : 1;	/**< D-MMU enable. */
 		unsigned im : 1;	/**< I-MMU enable. */
Index: kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
@@ -143,5 +143,5 @@
  * behind this is to prevent careless mistakes in the code
  * caused by setting only the entry number and not the TLB
- * number in the US3 code (when taking the code from US). 
+ * number in the US3 code (when taking the code from US).
  */
 
@@ -241,5 +241,5 @@
 
 /**
- * Determine the number of entries in the DMMU's small TLB. 
+ * Determine the number of entries in the DMMU's small TLB.
  */
 NO_TRACE static inline uint16_t tlb_dsmall_size(void)
@@ -249,5 +249,5 @@
 
 /**
- * Determine the number of entries in each DMMU's big TLB. 
+ * Determine the number of entries in each DMMU's big TLB.
  */
 NO_TRACE static inline uint16_t tlb_dbig_size(void)
@@ -257,5 +257,5 @@
 
 /**
- * Determine the number of entries in the IMMU's small TLB. 
+ * Determine the number of entries in the IMMU's small TLB.
  */
 NO_TRACE static inline uint16_t tlb_ismall_size(void)
@@ -265,5 +265,5 @@
 
 /**
- * Determine the number of entries in the IMMU's big TLB. 
+ * Determine the number of entries in the IMMU's big TLB.
  */
 NO_TRACE static inline uint16_t tlb_ibig_size(void)
@@ -449,5 +449,5 @@
 /** Read DMMU TLB Data Access Register.
  *
- * @param tlb		TLB number (one of TLB_DSMALL, TLB_DBIG, TLB_DBIG) 
+ * @param tlb		TLB number (one of TLB_DSMALL, TLB_DBIG, TLB_DBIG)
  * @param entry		TLB Entry index.
  *
@@ -467,5 +467,5 @@
 /** Write DMMU TLB Data Access Register.
  *
- * @param tlb		TLB number (one of TLB_DSMALL, TLB_DBIG_0, TLB_DBIG_1)  
+ * @param tlb		TLB number (one of TLB_DSMALL, TLB_DBIG_0, TLB_DBIG_1)
  * @param entry		TLB Entry index.
  * @param value		Value to be written.
@@ -485,5 +485,5 @@
 /** Read IMMU TLB Tag Read Register.
  *
- * @param tlb		TLB number (one of TLB_ISMALL or TLB_IBIG) 
+ * @param tlb		TLB number (one of TLB_ISMALL or TLB_IBIG)
  * @param entry		TLB Entry index.
  *
@@ -646,5 +646,5 @@
 	da.vpn = pg.vpn;
 	
-	/* da.value is the address within the ASI */ 
+	/* da.value is the address within the ASI */
 	asi_u64_write(ASI_IMMU_DEMAP, da.value, 0);
 
@@ -672,5 +672,5 @@
 	da.vpn = pg.vpn;
 	
-	/* da.value is the address within the ASI */ 
+	/* da.value is the address within the ASI */
 	asi_u64_write(ASI_DMMU_DEMAP, da.value, 0);
 
Index: kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/sun4u/tte.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/tte.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/tte.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/sun4v/as.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4v/as.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/sun4v/as.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
@@ -54,5 +54,5 @@
  * Even though for sun4v the format of the TSB Tag states that the context
  * field has 16 bits, the T1 CPU still only supports 13-bit contexts and the
- * three most significant bits are always zero. 
+ * three most significant bits are always zero.
  */
 typedef union tte_tag {
Index: kernel/arch/sparc64/include/arch/mm/sun4v/page.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4v/page.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/sun4v/page.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/tsb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/tsb.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/tsb.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/mm/tte.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/tte.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/mm/tte.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
Index: kernel/arch/sparc64/include/arch/regdef.h
===================================================================
--- kernel/arch/sparc64/include/arch/regdef.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/regdef.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
@@ -58,5 +58,5 @@
 /*
  * The following definitions concern the UPA_CONFIG register on US and the
- * FIREPLANE_CONFIG register on US3. 
+ * FIREPLANE_CONFIG register on US3.
  */
 #define ICBUS_CONFIG_MID_SHIFT    17
Index: kernel/arch/sparc64/include/arch/register.h
===================================================================
--- kernel/arch/sparc64/include/arch/register.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/register.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
@@ -98,5 +98,5 @@
 	uint64_t value;
 	struct {
-		uint64_t : 47; 
+		uint64_t : 47;
 		unsigned stick_int : 1;
 		unsigned int_level : 15;
Index: kernel/arch/sparc64/include/arch/smp/sun4u/ipi.h
===================================================================
--- kernel/arch/sparc64/include/arch/smp/sun4u/ipi.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/smp/sun4u/ipi.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/smp/sun4v/smp.h
===================================================================
--- kernel/arch/sparc64/include/arch/smp/sun4v/smp.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/smp/sun4v/smp.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/stack.h
===================================================================
--- kernel/arch/sparc64/include/arch/stack.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/stack.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/sun4u/arch.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4u/arch.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/sun4u/arch.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/sun4v/arch.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4v/arch.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/sun4v/arch.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
@@ -47,5 +47,5 @@
 
 /* register where the address of the MMU fault status area will be stored */
-#define SCRATCHPAD_MMU_FSA	0x00	
+#define SCRATCHPAD_MMU_FSA	0x00
 
 /* register where the CPUID will be stored */
Index: kernel/arch/sparc64/include/arch/sun4v/ipi.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4v/ipi.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/sun4v/ipi.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/sun4v/register.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4v/register.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/sun4v/register.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/include/arch/trap/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/interrupt.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/interrupt.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -30,5 +30,5 @@
  * @{
  */
-/** 
+/**
  * @file
  * @brief This file contains level N interrupt and inter-processor interrupt
Index: kernel/arch/sparc64/include/arch/trap/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/regwin.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/regwin.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -84,5 +84,5 @@
  */
 .macro SPILL_NORMAL_HANDLER_KERNEL
-	stx %l0, [%sp + STACK_BIAS + L0_OFFSET]	
+	stx %l0, [%sp + STACK_BIAS + L0_OFFSET]
 	stx %l1, [%sp + STACK_BIAS + L1_OFFSET]
 	stx %l2, [%sp + STACK_BIAS + L2_OFFSET]
Index: kernel/arch/sparc64/include/arch/trap/sun4u/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4u/interrupt.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/sun4u/interrupt.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -30,5 +30,5 @@
  * @{
  */
-/** 
+/**
  * @file
  * @brief This file contains interrupt vector trap handler.
Index: kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -77,5 +77,5 @@
 	mov VA_IMMU_TAG_ACCESS, %g5
 	ldxa [%g5] ASI_IMMU, %g5			! read the faulting Context and VPN
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
 
@@ -143,5 +143,5 @@
 	mov TT_FAST_DATA_ACCESS_MMU_MISS, %g2
 	ldxa [VA_DMMU_TAG_ACCESS] %asi, %g5		! read the faulting Context and VPN
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
 
@@ -163,5 +163,5 @@
 	mov VA_DMMU_TAG_ACCESS, %g5
 	ldxa [%g5] ASI_DMMU, %g5			! read the faulting Context and VPN
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
 
Index: kernel/arch/sparc64/include/arch/trap/sun4u/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4u/regwin.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/sun4u/regwin.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -42,5 +42,5 @@
  */
 .macro SPILL_TO_USPACE_WINDOW_BUFFER
-	stx %l0, [%g7 + L0_OFFSET]	
+	stx %l0, [%g7 + L0_OFFSET]
 	stx %l1, [%g7 + L1_OFFSET]
 	stx %l2, [%g7 + L2_OFFSET]
Index: kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -30,5 +30,5 @@
  * @{
  */
-/** 
+/**
  * @file
  * @brief This file contains interrupt vector trap handler.
Index: kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -75,5 +75,5 @@
 	mov TT_FAST_INSTRUCTION_ACCESS_MMU_MISS, %g2
 	clr %g5		! XXX
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
 
@@ -179,5 +179,5 @@
 	or %g1, %g3, %g5
 
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
 #endif /* __ASM__ */
Index: kernel/arch/sparc64/include/arch/trap/sun4v/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4v/regwin.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/include/arch/trap/sun4v/regwin.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -48,5 +48,5 @@
 	set SCRATCHPAD_WBUF, \tmpreg2
 	ldxa [\tmpreg2] ASI_SCRATCHPAD, \tmpreg1
-	stx %l0, [\tmpreg1 + L0_OFFSET]	
+	stx %l0, [\tmpreg1 + L0_OFFSET]
 	stx %l1, [\tmpreg1 + L1_OFFSET]
 	stx %l2, [\tmpreg1 + L2_OFFSET]
Index: kernel/arch/sparc64/src/console.c
===================================================================
--- kernel/arch/sparc64/src/console.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/console.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -56,5 +56,5 @@
  * Called on UltraSPARC machines with standard keyboard and framebuffer.
  *
- * @param aliases	the "/aliases" OBP node 
+ * @param aliases	the "/aliases" OBP node
  */
 static void standard_console_init(ofw_tree_node_t *aliases)
@@ -89,5 +89,5 @@
 /**
  * Initialize input/output. Auto-detects the type of machine
- * and calls the appropriate I/O init routine. 
+ * and calls the appropriate I/O init routine.
  */
 void standalone_sparc64_console_init(void)
Index: kernel/arch/sparc64/src/context.S
===================================================================
--- kernel/arch/sparc64/src/context.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/context.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -32,5 +32,5 @@
 #include <arch/regdef.h>
 
-.text   
+.text
 
 /*
Index: kernel/arch/sparc64/src/cpu/sun4u/cpu.c
===================================================================
--- kernel/arch/sparc64/src/cpu/sun4u/cpu.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/cpu/sun4u/cpu.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -86,9 +86,9 @@
 	 * Detect processor frequency.
 	 */
-	if (is_us() || is_us_iii()) { 
+	if (is_us() || is_us_iii()) {
 		node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu");
 		while (node) {
 			int f = find_cpu_frequency(node);
-			if (f != -1) 
+			if (f != -1)
 				clock_frequency = (uint32_t) f;
 			node = ofw_tree_find_peer_by_device_type(node, "cpu");
@@ -100,9 +100,9 @@
 			f = find_cpu_frequency(
 				ofw_tree_find_child(node, "cpu@0"));
-			if (f != -1) 
+			if (f != -1)
 				clock_frequency = (uint32_t) f;
 			f = find_cpu_frequency(
 				ofw_tree_find_child(node, "cpu@1"));
-			if (f != -1) 
+			if (f != -1)
 				clock_frequency = (uint32_t) f;
 			node = ofw_tree_find_peer_by_name(node, "cmp");
Index: kernel/arch/sparc64/src/drivers/pci.c
===================================================================
--- kernel/arch/sparc64/src/drivers/pci.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/drivers/pci.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -79,5 +79,5 @@
  *
  * @return		Address of the initialized PCI structure.
- */ 
+ */
 pci_t *pci_sabre_init(ofw_tree_node_t *node)
 {
@@ -121,5 +121,5 @@
  *
  * @return		Address of the initialized PCI structure.
- */ 
+ */
 pci_t *pci_psycho_init(ofw_tree_node_t *node)
 {
Index: kernel/arch/sparc64/src/drivers/scr.c
===================================================================
--- kernel/arch/sparc64/src/drivers/scr.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/drivers/scr.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
@@ -209,5 +209,5 @@
 		
 		break;
-	case SCR_FFB:	
+	case SCR_FFB:
 		fb_scanline = 8192;
 		visual = VISUAL_BGR_0_8_8_8;
Index: kernel/arch/sparc64/src/mm/sun4u/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -322,5 +322,5 @@
 		 * Forward the page fault to the address space page fault
 		 * handler.
-		 */		
+		 */
 		as_page_fault(page_16k, PF_ACCESS_WRITE, istate);
 	}
@@ -330,9 +330,9 @@
  *
  * The diag field has been left out in order to make this function more generic
- * (there is no diag field in US3 architeture). 
- *
- * @param i		TLB entry number 
+ * (there is no diag field in US3 architeture).
+ *
+ * @param i		TLB entry number
  * @param t		TLB entry tag
- * @param d		TLB entry data 
+ * @param d		TLB entry data
  */
 static void print_tlb_entry(int i, tlb_tag_read_reg_t t, tlb_data_t d)
Index: kernel/arch/sparc64/src/mm/sun4v/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -282,5 +282,5 @@
 		 * Forward the page fault to the address space page fault
 		 * handler.
-		 */		
+		 */
 		as_page_fault(va, PF_ACCESS_READ, istate);
 	}
@@ -323,5 +323,5 @@
 		 * Forward the page fault to the address space page fault
 		 * handler.
-		 */		
+		 */
 		as_page_fault(va, PF_ACCESS_WRITE, istate);
 	}
Index: kernel/arch/sparc64/src/mm/sun4v/tsb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tsb.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/mm/sun4v/tsb.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -28,5 +28,5 @@
  */
 
-/** @addtogroup sparc64mm	
+/** @addtogroup sparc64mm
  * @{
  */
@@ -86,5 +86,5 @@
 
 	as = t->as;
-	index = (t->page >> MMU_PAGE_WIDTH) & TSB_ENTRY_MASK; 
+	index = (t->page >> MMU_PAGE_WIDTH) & TSB_ENTRY_MASK;
 	
 	tsb = (tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base);
Index: kernel/arch/sparc64/src/smp/sun4u/ipi.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4u/ipi.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/smp/sun4u/ipi.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
@@ -122,5 +122,5 @@
 			/*
 			 * Prevent deadlock.
-			 */			
+			 */
 			(void) interrupts_enable();
 			delay(20 + (tick_read() & 0xff));
@@ -180,5 +180,5 @@
  * Interrupts must be disabled.
  *
- * @param cpu_id Destination cpu id (index into cpus array). Must not 
+ * @param cpu_id Destination cpu id (index into cpus array). Must not
  *               be the current cpu.
  * @param ipi    IPI number.
Index: kernel/arch/sparc64/src/smp/sun4u/smp.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
@@ -83,5 +83,5 @@
  * Wakes up the CPU which is represented by the "node" OFW tree node.
  * If "node" represents the current CPU, calling the function has
- * no effect. 
+ * no effect.
  */
 static void wakeup_cpu(ofw_tree_node_t *node)
Index: kernel/arch/sparc64/src/smp/sun4u/smp_call.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4u/smp_call.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/smp/sun4u/smp_call.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -42,5 +42,5 @@
 void arch_smp_call_ipi(unsigned int cpu_id)
 {
-	/* 
+	/*
 	 * Required by ipi_unicast_arch(). That functions resolves a potential
 	 * deadlock should both the destination and source cpus be sending
Index: kernel/arch/sparc64/src/smp/sun4v/ipi.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4v/ipi.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/smp/sun4v/ipi.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup sparc64	
+/** @addtogroup sparc64
  * @{
  */
Index: kernel/arch/sparc64/src/smp/sun4v/smp.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4v/smp.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/smp/sun4v/smp.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -254,5 +254,5 @@
 			exec_unit_assign_error = 1;
 		}
-	}		
+	}
 
 	/* save the number of CPUs to a globally accessible variable */
Index: kernel/arch/sparc64/src/sun4u/start.S
===================================================================
--- kernel/arch/sparc64/src/sun4u/start.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/sun4u/start.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -88,5 +88,5 @@
 	! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13]
 	sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5
-	srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5	
+	srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5
 
 	/*
@@ -118,5 +118,5 @@
 	wrpr %g1, %lo(trap_table), %tba
 
-	/* 
+	/*
 	 * Take over the DMMU by installing locked TTE entry identically
 	 * mapping the first 4M of memory.
@@ -135,5 +135,5 @@
 	! demap context 0
 	SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_NUCLEUS)
-	stxa %g0, [%g1] ASI_DMMU_DEMAP			
+	stxa %g0, [%g1] ASI_DMMU_DEMAP
 	membar #Sync
 
@@ -143,5 +143,5 @@
 	! write DTLB tag
 	SET_TLB_TAG(g1, MEM_CONTEXT_KERNEL)
-	stxa %g1, [VA_DMMU_TAG_ACCESS] %asi			
+	stxa %g1, [VA_DMMU_TAG_ACCESS] %asi
 	membar #Sync
 
@@ -164,5 +164,5 @@
 	! write DTLB data and install the kernel mapping
 	SET_TLB_DATA(g1, g2, TTE_L | TTE_W)	! use non-global mapping
-	stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG		
+	stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG
 	membar #Sync
 
@@ -175,10 +175,10 @@
 	! write DTLB tag of context 1 (i.e. MEM_CONTEXT_TEMP)
 	SET_TLB_TAG(g1, MEM_CONTEXT_TEMP)
-	stxa %g1, [VA_DMMU_TAG_ACCESS] %asi			
+	stxa %g1, [VA_DMMU_TAG_ACCESS] %asi
 	membar #Sync
 
 	! write DTLB data and install the kernel mapping in context 1
 	SET_TLB_DATA(g1, g2, TTE_W)			! use non-global mapping
-	stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG		
+	stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG
 	membar #Sync
 	
@@ -213,5 +213,5 @@
 	! write ITLB data and install the temporary mapping in context 1
 	SET_TLB_DATA(g1, g2, 0)			! use non-global mapping
-	stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG		
+	stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG
 	flush %g5
 	
@@ -223,5 +223,5 @@
 	! demap context 0
 	SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_NUCLEUS)
-	stxa %g0, [%g1] ASI_IMMU_DEMAP			
+	stxa %g0, [%g1] ASI_IMMU_DEMAP
 	flush %g5
 	
@@ -234,5 +234,5 @@
 	! write ITLB data and install the permanent kernel mapping in context 0
 	SET_TLB_DATA(g1, g2, TTE_L)		! use non-global mapping
-	stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG		
+	stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG
 	flush %g5
 
@@ -242,5 +242,5 @@
 	! demap context 1
 	SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_PRIMARY)
-	stxa %g0, [%g1] ASI_IMMU_DEMAP			
+	stxa %g0, [%g1] ASI_IMMU_DEMAP
 	flush %g5
 	
@@ -406,5 +406,5 @@
  */
 
-.align 32 
+.align 32
 /*
  * This label is used by the fast_data_access_MMU_miss trap handler.
@@ -417,5 +417,5 @@
  */
 SYMBOL(end_of_identity)
-	.quad -1 
+	.quad -1
 /*
  * This variable is used by the fast_data_access_MMU_miss trap handler.
Index: kernel/arch/sparc64/src/sun4v/md.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/md.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/sun4v/md.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -126,10 +126,10 @@
  * Returns the value of the integer property of the given node.
  *
- * @param 
+ * @param
  */
 bool md_get_integer_property(md_node_t node, const char *key,
 	uint64_t *result)
 {
-	element_idx_t idx = node;	
+	element_idx_t idx = node;
 
 	while (get_element(idx)->tag != NODE_END) {
@@ -149,5 +149,5 @@
  * Returns the value of the string property of the given node.
  *
- * @param 
+ * @param
  */
 bool md_get_string_property(md_node_t node, const char *key,
@@ -278,5 +278,5 @@
 /**
  * Moves "node" to the node following "node" in the list of all the existing
- * nodes of the MD whose name is "name". 
+ * nodes of the MD whose name is "name".
  */
 bool md_next_node(md_node_t *node, const char *name)
Index: kernel/arch/sparc64/src/sun4v/start.S
===================================================================
--- kernel/arch/sparc64/src/sun4v/start.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/sun4v/start.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -118,5 +118,5 @@
 	! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13]
 	sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5
-	srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5	
+	srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5
 
 	/*
@@ -225,5 +225,5 @@
 	 * Save physmem_base for use by the mm subsystem.
 	 * %l6 contains starting physical address
-	 */	
+	 */
 	sethi %hi(physmem_base), %l4
 	stx %l6, [%l4 + %lo(physmem_base)]
Index: kernel/arch/sparc64/src/trap/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/interrupt.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/trap/interrupt.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -112,5 +112,5 @@
 	exc_register(TT_TAG_OVERFLOW,
 	    "tag_overflow", false,
-	    tag_overflow);	
+	    tag_overflow);
 	exc_register(TT_DIVISION_BY_ZERO,
 	    "division_by_zero", false,
@@ -145,5 +145,5 @@
 	    tick_interrupt);
 
-#ifdef SUN4U 
+#ifdef SUN4U
 	exc_register(TT_INTERRUPT_VECTOR_TRAP,
 	    "interrupt_vector_trap", true,
@@ -159,5 +159,5 @@
 	exc_register(TT_FAST_DATA_ACCESS_PROTECTION,
 	    "fast_data_access_protection", true,
-	    fast_data_access_protection);	
+	    fast_data_access_protection);
 
 #ifdef SUN4V
Index: kernel/arch/sparc64/src/trap/sun4u/trap_table.S
===================================================================
--- kernel/arch/sparc64/src/trap/sun4u/trap_table.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/trap/sun4u/trap_table.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -64,5 +64,5 @@
 	mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x0a, TL = 0, instruction_access_error */
@@ -71,5 +71,5 @@
 	mov TT_INSTRUCTION_ACCESS_ERROR, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x10, TL = 0, illegal_instruction */
@@ -78,5 +78,5 @@
 	mov TT_ILLEGAL_INSTRUCTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x11, TL = 0, privileged_opcode */
@@ -85,5 +85,5 @@
 	mov TT_PRIVILEGED_OPCODE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x12, TL = 0, unimplemented_LDD */
@@ -92,5 +92,5 @@
 	mov TT_UNIMPLEMENTED_LDD, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x13, TL = 0, unimplemented_STD */
@@ -106,5 +106,5 @@
 	mov TT_FP_DISABLED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x21, TL = 0, fb_exception_ieee_754 handler */
@@ -168,5 +168,5 @@
 	mov TT_LDDF_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x36, TL = 0, STDF_mem_address_not_aligned */
@@ -382,5 +382,5 @@
 	mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x0a, TL > 0, instruction_access_error */
@@ -489,5 +489,5 @@
  * TL1: preemptible trap handler started after a tick interrupt
  * TL2: preemptible trap handler did SAVE
- * TL3: spill handler touched the kernel stack  
+ * TL3: spill handler touched the kernel stack
  * TL4: hardware or software failure
  *
@@ -510,5 +510,5 @@
 	 * trap is resolved. However, because we are in the wrong window from the
 	 * perspective of the MMU trap, we need to synchronize CWP with CWP from TL=0.
-	 */ 
+	 */
 	and %g3, TSTATE_CWP_MASK, %g4
 	wrpr %g4, 0, %cwp			! resynchronize CWP
@@ -566,5 +566,5 @@
 
 	/*
-	 * At this moment, we are using the kernel stack 
+	 * At this moment, we are using the kernel stack
 	 * and have successfully allocated a register window.
 	 */
@@ -585,5 +585,5 @@
 .else
 	! store the syscall number on the stack as 7th argument
-	stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6] 
+	stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6]
 .endif
 
Index: kernel/arch/sparc64/src/trap/sun4v/trap_table.S
===================================================================
--- kernel/arch/sparc64/src/trap/sun4v/trap_table.S	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/arch/sparc64/src/trap/sun4v/trap_table.S	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -67,5 +67,5 @@
 	mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x09, TL = 0, instruction_access_mmu_miss */
@@ -86,5 +86,5 @@
 	mov TT_IAE_UNAUTH_ACCESS, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x0c, TL = 0, IAE_nfo_page */
@@ -93,5 +93,5 @@
 	mov TT_IAE_NFO_PAGE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x10, TL = 0, illegal_instruction */
@@ -100,5 +100,5 @@
 	mov TT_ILLEGAL_INSTRUCTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x11, TL = 0, privileged_opcode */
@@ -107,5 +107,5 @@
 	mov TT_PRIVILEGED_OPCODE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x12, TL = 0, unimplemented_LDD */
@@ -114,5 +114,5 @@
 	mov TT_UNIMPLEMENTED_LDD, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x13, TL = 0, unimplemented_STD */
@@ -121,5 +121,5 @@
 	mov TT_UNIMPLEMENTED_STD, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x14, TL = 0, DAE_invalid_asi */
@@ -128,5 +128,5 @@
 	mov TT_DAE_INVALID_ASI, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x15, TL = 0, DAE_privilege_violation */
@@ -135,5 +135,5 @@
 	mov TT_DAE_PRIVILEGE_VIOLATION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x16, TL = 0, DAE_nc_page */
@@ -142,5 +142,5 @@
 	mov TT_DAE_NC_PAGE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x17, TL = 0, DAE_nfo_page */
@@ -149,5 +149,5 @@
 	mov TT_DAE_NFO_PAGE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x20, TL = 0, fb_disabled handler */
@@ -156,5 +156,5 @@
 	mov TT_FP_DISABLED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x21, TL = 0, fb_exception_ieee_754 handler */
@@ -163,5 +163,5 @@
 	mov TT_FP_EXCEPTION_IEEE_754, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x22, TL = 0, fb_exception_other handler */
@@ -170,5 +170,5 @@
 	mov TT_FP_EXCEPTION_OTHER, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x23, TL = 0, tag_overflow */
@@ -177,5 +177,5 @@
 	mov TT_TAG_OVERFLOW, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x24, TL = 0, clean_window handler */
@@ -189,5 +189,5 @@
 	mov TT_DIVISION_BY_ZERO, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x30, TL = 0, data_access_exception */
@@ -197,5 +197,5 @@
 	mov TT_DATA_ACCESS_EXCEPTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x31, TL = 0, data_access_mmu_miss */
@@ -209,5 +209,5 @@
 	mov TT_DATA_ACCESS_ERROR, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x34, TL = 0, mem_address_not_aligned */
@@ -216,5 +216,5 @@
 	mov TT_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x35, TL = 0, LDDF_mem_address_not_aligned */
@@ -223,5 +223,5 @@
 	mov TT_LDDF_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x36, TL = 0, STDF_mem_address_not_aligned */
@@ -230,5 +230,5 @@
 	mov TT_STDF_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x37, TL = 0, privileged_action */
@@ -237,5 +237,5 @@
 	mov TT_PRIVILEGED_ACTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x38, TL = 0, LDQF_mem_address_not_aligned */
@@ -244,5 +244,5 @@
 	mov TT_LDQF_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x39, TL = 0, STQF_mem_address_not_aligned */
@@ -251,5 +251,5 @@
 	mov TT_STQF_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x41, TL = 0, interrupt_level_1 handler */
@@ -378,5 +378,5 @@
 	mov TT_CPU_MONDO, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x80, TL = 0, spill_0_normal handler */
@@ -437,5 +437,5 @@
 	mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x09, TL > 0, instruction_access_mmu_miss */
@@ -451,5 +451,5 @@
 	mov TT_INSTRUCTION_ACCESS_ERROR, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x0b, TL > 0, IAE_unauth_access */
@@ -459,5 +459,5 @@
 	mov TT_IAE_UNAUTH_ACCESS, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x0c, TL > 0, IAE_nfo_page */
@@ -467,5 +467,5 @@
 	mov TT_IAE_NFO_PAGE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x10, TL > 0, illegal_instruction */
@@ -475,5 +475,5 @@
 	mov TT_ILLEGAL_INSTRUCTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x14, TL > 0, DAE_invalid_asi */
@@ -483,5 +483,5 @@
 	mov TT_DAE_INVALID_ASI, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x15, TL > 0, DAE_privilege_violation */
@@ -491,5 +491,5 @@
 	mov TT_DAE_PRIVILEGE_VIOLATION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x16, TL > 0, DAE_nc_page */
@@ -499,5 +499,5 @@
 	mov TT_DAE_NC_PAGE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x17, TL > 0, DAE_nfo_page */
@@ -507,5 +507,5 @@
 	mov TT_DAE_NFO_PAGE, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x24, TL > 0, clean_window handler */
@@ -520,5 +520,5 @@
 	mov TT_DIVISION_BY_ZERO, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x30, TL > 0, data_access_exception */
@@ -528,5 +528,5 @@
 	mov TT_DATA_ACCESS_EXCEPTION, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x31, TL > 0, data_access_mmu_miss */
@@ -541,5 +541,5 @@
 	mov TT_DATA_ACCESS_ERROR, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x34, TL > 0, mem_address_not_aligned */
@@ -549,5 +549,5 @@
 	mov TT_MEM_ADDRESS_NOT_ALIGNED, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x68, TL > 0, fast_data_access_MMU_miss */
@@ -567,5 +567,5 @@
 	mov TT_CPU_MONDO, %g2
 	clr %g5
-	PREEMPTIBLE_HANDLER exc_dispatch 
+	PREEMPTIBLE_HANDLER exc_dispatch
 
 /* TT = 0x80, TL > 0, spill_0_normal handler */
@@ -595,5 +595,5 @@
  * Spills the window at CWP + 2 to the kernel stack. This macro is to be
  * used before doing SAVE when the spill trap is undesirable.
- * 
+ *
  * Parameters:
  * 	tmpreg1		global register to be used for scratching purposes
@@ -608,5 +608,5 @@
 	
 	! spill to kernel stack
-	stx %l0, [%sp + STACK_BIAS + L0_OFFSET]	
+	stx %l0, [%sp + STACK_BIAS + L0_OFFSET]
 	stx %l1, [%sp + STACK_BIAS + L1_OFFSET]
 	stx %l2, [%sp + STACK_BIAS + L2_OFFSET]
@@ -634,5 +634,5 @@
  * Fill the window at CWP - 1 from the kernel stack. This macro is to be
  * used before doing RESTORE when the fill trap is undesirable.
- * 
+ *
  * Parameters:
  * 	tmpreg1		global register to be used for scratching purposes
@@ -689,5 +689,5 @@
 .else
 	! store the syscall number on the stack as 7th argument
-	stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6] 
+	stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6]
 .endif
 
@@ -859,5 +859,5 @@
  * Spills the window at CWP + 2 to the userspace window buffer. This macro
  * is to be used before doing SAVE when the spill trap is undesirable.
- * 
+ *
  * Parameters:
  * 	tmpreg1		global register to be used for scratching purposes
@@ -892,5 +892,5 @@
 	 * trap is resolved. However, because we are in the wrong window from the
 	 * perspective of the MMU trap, we need to synchronize CWP with CWP from TL=0.
-	 */ 
+	 */
 .if NOT(\is_syscall)
 	rdpr %tstate, %g3
@@ -927,5 +927,5 @@
 .endif
 
-	mov VA_PRIMARY_CONTEXT_REG, %l0 
+	mov VA_PRIMARY_CONTEXT_REG, %l0
 	stxa %g0, [%l0] ASI_PRIMARY_CONTEXT_REG
 	rd %pc, %l0
Index: kernel/doc/doxygroups.h
===================================================================
--- kernel/doc/doxygroups.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/doc/doxygroups.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -107,5 +107,5 @@
 	/**
 	 * @cond amd64
-	 * @defgroup amd64mm amd64	
+	 * @defgroup amd64mm amd64
 	 * @ingroup mm
 	 * @endcond
@@ -114,5 +114,5 @@
 	/**
 	 * @cond arm32
-	 * @defgroup arm32mm arm32	
+	 * @defgroup arm32mm arm32
 	 * @ingroup mm
 	 * @endcond
@@ -128,5 +128,5 @@
 	/**
 	 * @cond ia64
-	 * @defgroup ia64mm ia64	
+	 * @defgroup ia64mm ia64
 	 * @ingroup mm
 	 * @endcond
@@ -149,12 +149,12 @@
 	/**
 	 * @cond ppc64
-	 * @defgroup ppc64mm ppc64	
-	 * @ingroup mm
-	 * @endcond
-	 */
-	
-	/**
-	 * @cond sparc64
-	 * @defgroup sparc64mm sparc64	
+	 * @defgroup ppc64mm ppc64
+	 * @ingroup mm
+	 * @endcond
+	 */
+	
+	/**
+	 * @cond sparc64
+	 * @defgroup sparc64mm sparc64
 	 * @ingroup mm
 	 * @endcond
@@ -369,5 +369,5 @@
  * @ingroup kernel
  */
-	/** @defgroup generic generic	
+	/** @defgroup generic generic
 	* @ingroup others
 	*/
Index: kernel/genarch/include/genarch/drivers/legacy/ia32/io.h
===================================================================
--- kernel/genarch/include/genarch/drivers/legacy/ia32/io.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/include/genarch/drivers/legacy/ia32/io.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2009 Jakub Jermar 
+ * Copyright (c) 2009 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/genarch/include/genarch/kbrd/scanc_at.h
===================================================================
--- kernel/genarch/include/genarch/kbrd/scanc_at.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/include/genarch/kbrd/scanc_at.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
Index: kernel/genarch/include/genarch/multiboot/multiboot_info_struct.ag
===================================================================
--- kernel/genarch/include/genarch/multiboot/multiboot_info_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/include/genarch/multiboot/multiboot_info_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2016 Jakub Jermar 
+# Copyright (c) 2016 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/genarch/include/genarch/multiboot/multiboot_memmap_struct.ag
===================================================================
--- kernel/genarch/include/genarch/multiboot/multiboot_memmap_struct.ag	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/include/genarch/multiboot/multiboot_memmap_struct.ag	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,3 +1,3 @@
-# Copyright (c) 2016 Jakub Jermar 
+# Copyright (c) 2016 Jakub Jermar
 # All rights reserved.
 #
Index: kernel/genarch/src/acpi/acpi.c
===================================================================
--- kernel/genarch/src/acpi/acpi.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/acpi/acpi.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -104,5 +104,5 @@
 	/* Start with mapping the header only. */
 	vhdr = (struct acpi_sdt_header *) km_map((uintptr_t) psdt,
-	    sizeof(struct acpi_sdt_header), PAGE_READ | PAGE_NOT_CACHEABLE); 
+	    sizeof(struct acpi_sdt_header), PAGE_READ | PAGE_NOT_CACHEABLE);
 
 	/* Now we can map the entire structure. */
@@ -112,5 +112,5 @@
 	// TODO: do not leak vtmp
 
-	return vsdt; 
+	return vsdt;
 }
 
Index: kernel/genarch/src/ddi/ddi-bitmap.c
===================================================================
--- kernel/genarch/src/ddi/ddi-bitmap.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/ddi/ddi-bitmap.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -127,5 +127,5 @@
 	
 	if (ioaddr >= task->arch.iomap.elements)
-		return EINVAL;	
+		return EINVAL;
 
 	if (task->arch.iomap.elements < elements)
Index: kernel/genarch/src/ddi/ddi-dummy.c
===================================================================
--- kernel/genarch/src/ddi/ddi-dummy.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/ddi/ddi-dummy.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch 
+/** @addtogroup genarch
  * @{
  */
Index: kernel/genarch/src/drivers/pl050/pl050.c
===================================================================
--- kernel/genarch/src/drivers/pl050/pl050.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/drivers/pl050/pl050.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -81,5 +81,5 @@
 	pl050 = dev;
 
-	if (instance) {	
+	if (instance) {
 		instance->pl050 = dev;
 		instance->kbrdin = NULL;
@@ -106,5 +106,5 @@
 	pio_write_8(pl050->ctrl, val);
 
-	/* reset the data buffer */	
+	/* reset the data buffer */
 	pio_read_8(pl050->data);
 	
Index: kernel/genarch/src/drivers/via-cuda/cuda.c
===================================================================
--- kernel/genarch/src/drivers/via-cuda/cuda.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/drivers/via-cuda/cuda.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -320,5 +320,5 @@
 	/* The packet contains one or two scancodes. */
 	if (data[3] != 0xff)
-		indev_push_character(instance->kbrdin, data[3]);		
+		indev_push_character(instance->kbrdin, data[3]);
 	if (data[4] != 0xff)
 		indev_push_character(instance->kbrdin, data[4]);
Index: kernel/genarch/src/kbrd/scanc_at.c
===================================================================
--- kernel/genarch/src/kbrd/scanc_at.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/kbrd/scanc_at.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
Index: kernel/genarch/src/mm/asid_fifo.c
===================================================================
--- kernel/genarch/src/mm/asid_fifo.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/mm/asid_fifo.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -38,5 +38,5 @@
  * in FIFO queue. The queue can be statically (e.g. mips32) or
  * dynamically allocated (e.g ia64 and sparc64).
- */ 
+ */
 
 #include <genarch/mm/asid_fifo.h>
@@ -49,5 +49,5 @@
 
 /**
- * FIFO queue containing unassigned ASIDs. 
+ * FIFO queue containing unassigned ASIDs.
  * Can be only accessed when asidlock is held.
  */
Index: kernel/genarch/src/mm/page_pt.c
===================================================================
--- kernel/genarch/src/mm/page_pt.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/mm/page_pt.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -357,5 +357,5 @@
 	pte_t *t = pt_mapping_find_internal(as, page, nolock);
 	if (!t)
-		panic("Updating non-existent PTE");	
+		panic("Updating non-existent PTE");
 
 	assert(PTE_VALID(t) == PTE_VALID(pte));
Index: kernel/genarch/src/softint/division.c
===================================================================
--- kernel/genarch/src/softint/division.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/softint/division.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -42,5 +42,5 @@
 {
 	unsigned int result;
-	int steps = sizeof(unsigned int) * 8; 
+	int steps = sizeof(unsigned int) * 8;
 	
 	*remainder = 0;
Index: kernel/genarch/src/softint/multiplication.c
===================================================================
--- kernel/genarch/src/softint/multiplication.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/genarch/src/softint/multiplication.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -48,5 +48,5 @@
 
 /**
- * Multiply two integers and return long long as result. 
+ * Multiply two integers and return long long as result.
  * This function is overflow safe.
  * @param a
@@ -56,5 +56,5 @@
 static unsigned long long mul(unsigned int a, unsigned int b) {
 	unsigned int a1, a2, b1, b2;
-	unsigned long long t1, t2, t3;	
+	unsigned long long t1, t2, t3;
 
 	a1 = a >> 16;
@@ -68,5 +68,5 @@
 	t3 = a2*b2;
 
-	t3 = (((t1 << 16) + t2) << 16) + t3; 
+	t3 = (((t1 << 16) + t2) << 16) + t3;
 
 	return t3;
@@ -105,5 +105,5 @@
 
 	// (if OF checked) a1 or b1 is zero => result fits in 64 bits, no need to another overflow check
-	t1 = mul(a1,b2) + mul(b1,a2);	
+	t1 = mul(a1,b2) + mul(b1,a2);
 
 	if (SOFTINT_CHECK_OF && t1 > MAX_UINT32) {
Index: kernel/generic/include/adt/avl.h
===================================================================
--- kernel/generic/include/adt/avl.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/avl.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -62,5 +62,5 @@
 struct avltree_node
 {
-	/** 
+	/**
 	 * Pointer to the left descendant of this node.
 	 *
@@ -70,5 +70,5 @@
 	struct avltree_node *lft;
 	
-	/** 
+	/**
 	 * Pointer to the right descendant of this node.
 	 *
@@ -82,5 +82,5 @@
 	
 	/** Node's key. */
-	avltree_key_t key; 
+	avltree_key_t key;
 	
 	/**
@@ -97,13 +97,13 @@
 	struct avltree_node *root;
 
-	/** 
+	/**
 	 * Base of the tree is a value that is smaller or equal than every value
 	 * in the tree (valid for positive keys otherwise ignore this atribute).
-	 *  
+	 *
 	 * The base is added to the current key when a new node is inserted into
 	 * the tree. The base is changed to the key of the node which is deleted
 	 * with avltree_delete_min().
 	 */
-	avltree_key_t base; 
+	avltree_key_t base;
 };
 
Index: kernel/generic/include/adt/btree.h
===================================================================
--- kernel/generic/include/adt/btree.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/btree.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -55,5 +55,5 @@
 	btree_key_t key[BTREE_MAX_KEYS + 1];
 
-	/** 
+	/**
 	 * Pointers to values. Sorted according to the key array. Defined only in
 	 * leaf-level. There is room for storing value for the extra key.
Index: kernel/generic/include/adt/cht.h
===================================================================
--- kernel/generic/include/adt/cht.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/cht.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -46,9 +46,9 @@
 /** Concurrent hash table node link. */
 typedef struct cht_link {
-	/* Must be placed first. 
-	 * 
-	 * The function pointer (rcu_link.func) is used to store the item's 
-	 * mixed memoized hash. If in use by RCU (ie waiting for deferred 
-	 * destruction) the hash will contain the value of 
+	/* Must be placed first.
+	 *
+	 * The function pointer (rcu_link.func) is used to store the item's
+	 * mixed memoized hash. If in use by RCU (ie waiting for deferred
+	 * destruction) the hash will contain the value of
 	 * cht_t.op->remove_callback.
 	 */
@@ -64,5 +64,5 @@
 typedef struct cht_ops {
 	/** Returns the hash of the item.
-	 * 
+	 *
 	 * Applicable also to items that were logically deleted from the table
 	 * but have yet to be physically removed by means of remove_callback().
@@ -80,5 +80,5 @@
 
 /** Groups hash table buckets with their count.
- * 
+ *
  * It allows both the number of buckets as well as the bucket array
  * to be swapped atomically when resing the table.
@@ -100,9 +100,9 @@
 	/** Resized table buckets that will replace b once resize is complete. */
 	cht_buckets_t *new_b;
-	/** Invalid memoized hash value. 
-	 * 
+	/** Invalid memoized hash value.
+	 *
 	 * If cht_link.hash contains this value the item had been logically
 	 * removed and is waiting to be freed. Such hashes (and the associated
-	 * items) are disregarded and skipped or the actual hash must be 
+	 * items) are disregarded and skipped or the actual hash must be
 	 * determined via op->hash().
 	 */
@@ -116,5 +116,5 @@
 	work_t resize_work;
 	/** If positive the table should grow or shrink.
-	 * 
+	 *
 	 * If not 0 resize work had already been posted to the system work queue.
 	 */
@@ -133,5 +133,5 @@
 
 extern bool cht_create_simple(cht_t *h, cht_ops_t *op);
-extern bool cht_create(cht_t *h, size_t init_size, size_t min_size, 
+extern bool cht_create(cht_t *h, size_t init_size, size_t min_size,
 	size_t max_load, bool can_block, cht_ops_t *op);
 extern void cht_destroy(cht_t *h);
Index: kernel/generic/include/adt/fifo.h
===================================================================
--- kernel/generic/include/adt/fifo.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/fifo.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -72,5 +72,5 @@
  *
  * FIFO is allocated dynamically.
- * This macro is suitable for creating larger FIFOs. 
+ * This macro is suitable for creating larger FIFOs.
  *
  * @param name Name of FIFO.
Index: kernel/generic/include/adt/hash.h
===================================================================
--- kernel/generic/include/adt/hash.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/hash.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -75,5 +75,5 @@
 
 /** Produces a uniform hash affecting all output bits from the skewed input. */
-static inline size_t hash_mix(size_t hash) 
+static inline size_t hash_mix(size_t hash)
 {
 #ifdef __32_BITS__
@@ -87,5 +87,5 @@
 
 /** Use to create a hash from multiple values.
- * 
+ *
  * Typical usage:
  * @code
@@ -101,5 +101,5 @@
 static inline size_t hash_combine(size_t seed, size_t hash)
 {
-	/* 
+	/*
 	 * todo: use Bob Jenkin's proper mixing hash pass:
 	 * http://burtleburtle.net/bob/c/lookup3.c
Index: kernel/generic/include/adt/hash_table.h
===================================================================
--- kernel/generic/include/adt/hash_table.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/hash_table.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -2,5 +2,5 @@
  * Copyright (c) 2006 Jakub Jermar
  * Copyright (c) 2012 Adam Hraska
- * 
+ *
  * All rights reserved.
  *
@@ -62,5 +62,5 @@
 
 	/** Hash table item removal callback.
-	 * 
+	 *
 	 * Must not invoke any mutating functions of the hash table.
 	 *
Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/adt/list.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -66,12 +66,12 @@
 
 /** Initializer for statically allocated list.
- * 
+ *
  * @code
  * struct named_list {
  *     const char *name;
  *     list_t list;
- * } var = { 
- *     .name = "default name", 
- *     .list = LIST_INITIALIZER(name_list.list) 
+ * } var = {
+ *     .name = "default name",
+ *     .list = LIST_INITIALIZER(name_list.list)
  * };
  * @endcode
@@ -111,7 +111,7 @@
  *     link_t item_link;
  * } item_t;
- * 
+ *
  * //..
- * 
+ *
  * // Print each list element's value and remove the element from the list.
  * list_foreach_safe(mylist, cur_link, next_link) {
@@ -121,5 +121,5 @@
  * }
  * @endcode
- * 
+ *
  * @param list List to traverse.
  * @param iterator Iterator to the current element of the list.
Index: kernel/generic/include/arch.h
===================================================================
--- kernel/generic/include/arch.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/arch.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -71,5 +71,5 @@
 #ifdef RCU_PREEMPT_A
 	size_t rcu_nesting;    /**< RCU nesting count and flag. */
-#endif 
+#endif
 	struct thread *thread; /**< Current thread. */
 	struct task *task;     /**< Current task. */
Index: kernel/generic/include/cpu/cpu_mask.h
===================================================================
--- kernel/generic/include/cpu/cpu_mask.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/cpu/cpu_mask.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -39,11 +39,11 @@
 #include <lib/memfnc.h>
 
-/** Iterates over all cpu id's whose bit is included in the cpu mask. 
- * 
+/** Iterates over all cpu id's whose bit is included in the cpu mask.
+ *
  * Example usage:
  * @code
  * DEFINE_CPU_MASK(cpu_mask);
  * cpu_mask_active(&cpu_mask);
- * 
+ *
  * cpu_mask_for_each(cpu_mask, cpu_id) {
  *     printf("Cpu with logical id %u is active.\n", cpu_id);
@@ -53,5 +53,5 @@
 #define cpu_mask_for_each(mask, cpu_id) \
 	for (unsigned int (cpu_id) = 0; (cpu_id) < config.cpu_count; ++(cpu_id)) \
-		if (cpu_mask_is_set(&(mask), (cpu_id))) 
+		if (cpu_mask_is_set(&(mask), (cpu_id)))
 
 /** Allocates a cpu_mask_t on stack. */
@@ -74,5 +74,5 @@
 extern bool cpu_mask_is_none(cpu_mask_t *);
 
-#endif /* KERN_CPU_CPU_MASK_H_ */ 
+#endif /* KERN_CPU_CPU_MASK_H_ */
 
 /** @}
Index: kernel/generic/include/ddi/irq.h
===================================================================
--- kernel/generic/include/ddi/irq.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/ddi/irq.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -126,5 +126,5 @@
 	
 	/** Notification configuration structure. */
-	ipc_notif_cfg_t notif_cfg; 
+	ipc_notif_cfg_t notif_cfg;
 } irq_t;
 
Index: kernel/generic/include/fpu_context.h
===================================================================
--- kernel/generic/include/fpu_context.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/fpu_context.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2005 Jakub Vana 
+ * Copyright (c) 2005 Jakub Vana
  * All rights reserved.
  *
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
Index: kernel/generic/include/ipc/sysipc_ops.h
===================================================================
--- kernel/generic/include/ipc/sysipc_ops.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/ipc/sysipc_ops.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
@@ -84,5 +84,5 @@
 	/**
 	 * This callback is called from request_preprocess().
-	 * 
+	 *
 	 * Context:		caller
 	 * Caller alive:	guaranteed
Index: kernel/generic/include/ipc/sysipc_priv.h
===================================================================
--- kernel/generic/include/ipc/sysipc_priv.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/ipc/sysipc_priv.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/include/mm/as.h
===================================================================
--- kernel/generic/include/mm/as.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/mm/as.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -72,5 +72,5 @@
 
 /** The page fault was resolved by as_page_fault(). */
-#define AS_PF_OK     0 
+#define AS_PF_OK     0
 
 /** The page fault was caused by memcpy_from_uspace() or memcpy_to_uspace(). */
Index: kernel/generic/include/mm/page.h
===================================================================
--- kernel/generic/include/mm/page.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/mm/page.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -42,5 +42,5 @@
 
 #define P2SZ(pages) \
-	((pages) << PAGE_WIDTH)	
+	((pages) << PAGE_WIDTH)
 
 /** Operations to manipulate page mappings. */
Index: kernel/generic/include/mm/tlb.h
===================================================================
--- kernel/generic/include/mm/tlb.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/mm/tlb.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -73,5 +73,5 @@
 extern void tlb_shootdown_ipi_recv(void);
 #else
-#define tlb_shootdown_start(w, x, y, z)	interrupts_disable()	
+#define tlb_shootdown_start(w, x, y, z)	interrupts_disable()
 #define tlb_shootdown_finalize(i)	(interrupts_restore(i));
 #define tlb_shootdown_ipi_recv()
Index: kernel/generic/include/proc/thread.h
===================================================================
--- kernel/generic/include/proc/thread.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/proc/thread.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -190,5 +190,5 @@
 	struct work_queue *workq;
 	/** Links work queue threads. Protected by workq->lock. */
-	link_t workq_link; 
+	link_t workq_link;
 	/** True if the worker was blocked and is not running. Use thread->lock. */
 	bool workq_blocked;
Index: kernel/generic/include/security/perm.h
===================================================================
--- kernel/generic/include/security/perm.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/security/perm.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -40,5 +40,5 @@
  * holder to perform certain security sensitive tasks.
  *
- * Each task can have arbitrary combination of the permissions 
+ * Each task can have arbitrary combination of the permissions
  * defined in this file. Therefore, they are required to be powers
  * of two.
Index: kernel/generic/include/synch/rcu.h
===================================================================
--- kernel/generic/include/synch/rcu.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/synch/rcu.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -41,7 +41,7 @@
 
 
-/** Use to assign a pointer to newly initialized data to a rcu reader 
+/** Use to assign a pointer to newly initialized data to a rcu reader
  * accessible pointer.
- * 
+ *
  * Example:
  * @code
@@ -50,8 +50,8 @@
  *     int grade;
  * } exam_t;
- * 
+ *
  * exam_t *exam_list;
  * // ..
- * 
+ *
  * // Insert at the beginning of the list.
  * exam_t *my_exam = malloc(sizeof(exam_t), 0);
@@ -59,5 +59,5 @@
  * my_exam->next = exam_list;
  * rcu_assign(exam_list, my_exam);
- * 
+ *
  * // Changes properly propagate. Every reader either sees
  * // the old version of exam_list or the new version with
@@ -65,5 +65,5 @@
  * rcu_synchronize();
  * // Now we can be sure every reader sees my_exam.
- * 
+ *
  * @endcode
  */
@@ -75,13 +75,13 @@
 
 /** Use to access RCU protected data in a reader section.
- * 
+ *
  * Example:
  * @code
  * exam_t *exam_list;
  * // ...
- * 
+ *
  * rcu_read_lock();
  * exam_t *first_exam = rcu_access(exam_list);
- * // We can now safely use first_exam, it won't change 
+ * // We can now safely use first_exam, it won't change
  * // under us while we're using it.
  *
@@ -131,6 +131,6 @@
 void _rcu_preempted_unlock(void);
 
-/** Delimits the start of an RCU reader critical section. 
- * 
+/** Delimits the start of an RCU reader critical section.
+ *
  * Reader sections may be nested and are preemptible. You must not
  * however block/sleep within reader sections.
@@ -165,12 +165,12 @@
 	assert(PREEMPTION_DISABLED || interrupts_disabled());
 	
-	/* 
-	 * A new GP was started since the last time we passed a QS. 
+	/*
+	 * A new GP was started since the last time we passed a QS.
 	 * Notify the detector we have reached a new QS.
 	 */
 	if (CPU->rcu.last_seen_gp != _rcu_cur_gp) {
 		rcu_gp_t cur_gp = ACCESS_ONCE(_rcu_cur_gp);
-		/* 
-		 * Contain memory accesses within a reader critical section. 
+		/*
+		 * Contain memory accesses within a reader critical section.
 		 * If we are in rcu_lock() it also makes changes prior to the
 		 * start of the GP visible in the reader section.
@@ -180,19 +180,19 @@
 		 * Acknowledge we passed a QS since the beginning of rcu.cur_gp.
 		 * Cache coherency will lazily transport the value to the
-		 * detector while it sleeps in gp_sleep(). 
-		 * 
+		 * detector while it sleeps in gp_sleep().
+		 *
 		 * Note that there is a theoretical possibility that we
-		 * overwrite a more recent/greater last_seen_gp here with 
+		 * overwrite a more recent/greater last_seen_gp here with
 		 * an older/smaller value. If this cpu is interrupted here
-		 * while in rcu_lock() reader sections in the interrupt handler 
-		 * will update last_seen_gp to the same value as is currently 
-		 * in local cur_gp. However, if the cpu continues processing 
-		 * interrupts and the detector starts a new GP immediately, 
-		 * local interrupt handlers may update last_seen_gp again (ie 
-		 * properly ack the new GP) with a value greater than local cur_gp. 
-		 * Resetting last_seen_gp to a previous value here is however 
-		 * benign and we only have to remember that this reader may end up 
+		 * while in rcu_lock() reader sections in the interrupt handler
+		 * will update last_seen_gp to the same value as is currently
+		 * in local cur_gp. However, if the cpu continues processing
+		 * interrupts and the detector starts a new GP immediately,
+		 * local interrupt handlers may update last_seen_gp again (ie
+		 * properly ack the new GP) with a value greater than local cur_gp.
+		 * Resetting last_seen_gp to a previous value here is however
+		 * benign and we only have to remember that this reader may end up
 		 * in cur_preempted even after the GP ends. That is why we
-		 * append next_preempted to cur_preempted rather than overwriting 
+		 * append next_preempted to cur_preempted rather than overwriting
 		 * it as if cur_preempted were empty.
 		 */
@@ -201,6 +201,6 @@
 }
 
-/** Delimits the start of an RCU reader critical section. 
- * 
+/** Delimits the start of an RCU reader critical section.
+ *
  * Reader sections may be nested and are preemptable. You must not
  * however block/sleep within reader sections.
@@ -229,7 +229,7 @@
 		_rcu_record_qs();
 		
-		/* 
-		 * The thread was preempted while in a critical section or 
-		 * the detector is eagerly waiting for this cpu's reader to finish. 
+		/*
+		 * The thread was preempted while in a critical section or
+		 * the detector is eagerly waiting for this cpu's reader to finish.
 		 */
 		if (CPU->rcu.signal_unlock) {
Index: kernel/generic/include/synch/rcu_types.h
===================================================================
--- kernel/generic/include/synch/rcu_types.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/synch/rcu_types.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -72,12 +72,12 @@
 	
 	/** True if we should signal the detector that we exited a reader section.
-	 * 
+	 *
 	 * Equal to (THREAD->rcu.was_preempted || CPU->rcu.is_delaying_gp).
 	 */
 	bool signal_unlock;
 
-	/** The number of times an RCU reader section is nested on this cpu. 
-	 * 
-	 * If positive, it is definitely executing reader code. If zero, 
+	/** The number of times an RCU reader section is nested on this cpu.
+	 *
+	 * If positive, it is definitely executing reader code. If zero,
 	 * the thread might already be executing reader code thanks to
 	 * cpu instruction reordering.
@@ -92,5 +92,5 @@
 	/** Number of callbacks in cur_cbs. */
 	size_t cur_cbs_cnt;
-	/** Callbacks to invoke once the next grace period ends, ie next_cbs_gp. 
+	/** Callbacks to invoke once the next grace period ends, ie next_cbs_gp.
 	 * Accessed by the local reclaimer only.
 	 */
@@ -102,5 +102,5 @@
 	/** Tail of arriving_cbs list. Disable interrupts to access. */
 	rcu_item_t **parriving_cbs_tail;
-	/** Number of callbacks currently in arriving_cbs. 
+	/** Number of callbacks currently in arriving_cbs.
 	 * Disable interrupts to access.
 	 */
@@ -110,9 +110,9 @@
 	rcu_gp_t cur_cbs_gp;
 	/** At the end of this grace period callbacks in next_cbs will be invoked.
-	 * 
-	 * Should be the next grace period but it allows the reclaimer to 
+	 *
+	 * Should be the next grace period but it allows the reclaimer to
 	 * notice if it missed a grace period end announcement. In that
 	 * case it can execute next_cbs without waiting for another GP.
-	 * 
+	 *
 	 * Invariant: next_cbs_gp >= cur_cbs_gp
 	 */
@@ -143,6 +143,6 @@
 /** RCU related per-thread data. */
 typedef struct rcu_thread_data {
-	/** 
-	 * Nesting count of the thread's RCU read sections when the thread 
+	/**
+	 * Nesting count of the thread's RCU read sections when the thread
 	 * is not running.
 	 */
@@ -151,9 +151,9 @@
 #ifdef RCU_PREEMPT_PODZIMEK
 	
-	/** True if the thread was preempted in a reader section. 
+	/** True if the thread was preempted in a reader section.
 	 *
 	 * The thread is placed into rcu.cur_preempted or rcu.next_preempted
-	 * and must remove itself in rcu_read_unlock(). 
-	 * 
+	 * and must remove itself in rcu_read_unlock().
+	 *
 	 * Access with interrupts disabled.
 	 */
Index: kernel/generic/include/synch/workqueue.h
===================================================================
--- kernel/generic/include/synch/workqueue.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/synch/workqueue.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -53,5 +53,5 @@
 	/* Magic number for integrity checks. */
 	uint32_t cookie;
-#endif 
+#endif
 } work_t;
 
Index: kernel/generic/include/userspace.h
===================================================================
--- kernel/generic/include/userspace.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/include/userspace.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -40,5 +40,5 @@
 
 /** Switch to user-space (CPU user priviledge level) */
-extern void userspace(uspace_arg_t *uarg) __attribute__ ((noreturn)); 
+extern void userspace(uspace_arg_t *uarg) __attribute__ ((noreturn));
 
 #endif
Index: kernel/generic/src/adt/avl.c
===================================================================
--- kernel/generic/src/adt/avl.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/adt/avl.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -76,5 +76,5 @@
 		else if (p->key < key)
 			p = p->rgt;
-		else 
+		else
 			return p;
 	}
@@ -102,5 +102,5 @@
 	 * Iteratively descend to the leftmost leaf in the tree.
 	 */
-	while (p->lft != NULL) 
+	while (p->lft != NULL)
 		p = p->lft;
 	
@@ -156,8 +156,8 @@
  * @param t AVL tree.
  * @param newnode New node to be inserted.
- */ 
+ */
 void avltree_insert(avltree_t *t, avltree_node_t *newnode)
-{	
-	avltree_node_t *par; 
+{
+	avltree_node_t *par;
 	avltree_node_t *gpa;
 	avltree_node_t *top;
@@ -170,5 +170,5 @@
 	/*
 	 * Creating absolute key.
-	 */	
+	 */
 	key = newnode->key + t->base;
 	
@@ -223,5 +223,5 @@
 	if (top->par == NULL) {
 		dpc = &t->root;
-	} else { 
+	} else {
 		if (top->par->lft == top)
 			dpc = &top->par->lft;
@@ -255,5 +255,5 @@
 			 */
 			REBALANCE_INSERT_LL();
-		} else { 
+		} else {
 			/*
 			 * LR rotation.
@@ -263,5 +263,5 @@
 			REBALANCE_INSERT_LR();
 		}
-	} else if (top->balance == 2) { 
+	} else if (top->balance == 2) {
 		par = top->rgt;
 		if (par->balance == 1) {
@@ -278,5 +278,5 @@
 			REBALANCE_INSERT_RL();
 		}
-	} else { 
+	} else {
 		/*
 		 * Balance is not broken, insertion is finised.
@@ -303,5 +303,5 @@
  * @param ro	Read only operation; do not modify any tree pointers. This is
  *		useful for tracking direction via the dir pointer.
- * 
+ *
  * @return	Zero if w became the new root of the tree, otherwise return
  * 		non-zero.
@@ -313,7 +313,7 @@
 	if (u->par == NULL) {
 		if (!ro)
-			t->root = w;	
+			t->root = w;
 		return 0;
-	} else {	
+	} else {
 		if (u->par->lft == v) {
 			if (!ro)
@@ -362,5 +362,5 @@
  * Because multiple identical keys are allowed, the parent pointers are
  * essential during deletion.
- * 
+ *
  * @param t AVL tree structure.
  * @param node Address of the node which will be deleted.
@@ -379,5 +379,5 @@
 		if (node->rgt) {
 			/*
-			 * Replace the node with its only right son. 
+			 * Replace the node with its only right son.
 			 *
 			 * Balance of the right son will be repaired in the
@@ -388,5 +388,5 @@
 			gpa = cur;
 			dir = RIGHT;
-			cur->balance = node->balance; 
+			cur->balance = node->balance;
 		} else {
 			if (node->par == NULL) {
@@ -421,5 +421,5 @@
 			 * Cutting off of the found node has two cases that
 			 * depend on its left son.
-			 */ 
+			 */
 			if (cur->lft) {
 				/*
@@ -429,5 +429,5 @@
 				gpa->par = cur->par;
 				dir = LEFT;
-				gpa->balance = cur->balance; 
+				gpa->balance = cur->balance;
 			} else {
 				dir = RIGHT;
@@ -436,6 +436,6 @@
 			cur->par->rgt = cur->lft;
 			cur->lft = node->lft;
-			cur->lft->par = cur; 
-		} else { 
+			cur->lft->par = cur;
+		} else {
 			/*
 			 * The left son of the node hasn't got a right son. The
@@ -443,8 +443,8 @@
 			 */
 			dir = LEFT;
-			gpa = cur; 
+			gpa = cur;
 		}
 		if (node->rgt)
-			node->rgt->par = cur; 
+			node->rgt->par = cur;
 		cur->rgt = node->rgt;
 		cur->balance = node->balance;
@@ -473,5 +473,5 @@
 				 */
 				break;
-			} else if (gpa->balance == 2) { 
+			} else if (gpa->balance == 2) {
 				/*
 				 * Bad balance, heights of left and right
@@ -538,5 +538,5 @@
 						(void) repair(t, par, gpa, par,
 						    NULL, false);
-						break; 
+						break;
 					} else {
 						par->balance = 0;
@@ -559,5 +559,5 @@
 				gpa = gpa->par;
 			}
-		} else { 
+		} else {
 			/*
 			 * Deletion was made in the right subtree.
@@ -605,5 +605,5 @@
 						break;
 					gpa = cur->par;
-				} else { 
+				} else {
 					/*
 					 * LL rotation.
@@ -681,5 +681,5 @@
 		node = node->lft;
 	
-	avltree_delete(t, node); 
+	avltree_delete(t, node);
 
 	return true;
Index: kernel/generic/src/adt/btree.c
===================================================================
--- kernel/generic/src/adt/btree.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/adt/btree.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -124,5 +124,5 @@
 	
 	if (root->keys) {
-		for (i = 0; i < root->keys + 1; i++) { 
+		for (i = 0; i < root->keys + 1; i++) {
 			if (root->subtree[i])
 				btree_destroy_subtree(root->subtree[i]);
Index: kernel/generic/src/adt/cht.c
===================================================================
--- kernel/generic/src/adt/cht.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/adt/cht.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -35,5 +35,5 @@
  * @file
  * @brief Scalable resizable concurrent lock-free hash table.
- * 
+ *
  * CHT is a concurrent hash table that is scalable resizable and lock-free.
  * resizable = the number of buckets of the table increases or decreases
@@ -48,10 +48,10 @@
  * fraction of updates (insert/remove) increases. Other data structures
  * significantly outperform CHT if the fraction of updates exceeds ~40%.
- * 
+ *
  * CHT tolerates hardware exceptions and may be accessed from exception
  * handlers as long as the underlying RCU implementation is exception safe.
- * 
+ *
  * @par Caveats
- * 
+ *
  * 0) Never assume an item is still in the table.
  * The table may be accessed concurrently; therefore, other threads may
@@ -59,20 +59,20 @@
  * in the table if cht_find() just returned it to you. Similarly, an
  * item may have already been inserted by the time cht_find() returns NULL.
- * 
+ *
  * 1) Always use RCU read locks when searching the table.
  * Holding an RCU lock guarantees that an item found in the table remains
  * valid (eg is not freed) even if the item was removed from the table
  * in the meantime by another thread.
- * 
+ *
  * 2) Never update values in place.
  * Do not update items in the table in place, ie directly. The changes
  * will not propagate to other readers (on other cpus) immediately or even
  * correctly. Some readers may then encounter items that have only some
- * of their fields changed or are completely inconsistent. 
- * 
- * Instead consider inserting an updated/changed copy of the item and 
+ * of their fields changed or are completely inconsistent.
+ *
+ * Instead consider inserting an updated/changed copy of the item and
  * removing the original item. Or contact the maintainer to provide
  * you with a function that atomically replaces an item with a copy.
- * 
+ *
  * 3) Use cht_insert_unique() instead of checking for duplicates with cht_find()
  * The following code is prone to race conditions:
@@ -84,41 +84,41 @@
  * @endcode
  * See cht_insert_unique() on how to correctly fix this.
- * 
+ *
  *
  * @par Semantics
- * 
+ *
  * Lazy readers = cht_find_lazy(), cht_find_next_lazy()
  * Readers = lazy readers, cht_find(), cht_find_next()
- * Updates = cht_insert(), cht_insert_unique(), cht_remove_key(), 
+ * Updates = cht_insert(), cht_insert_unique(), cht_remove_key(),
  *     cht_remove_item()
- * 
- * Readers (but not lazy readers) are guaranteed to see the effects 
- * of @e completed updates. In other words, if cht_find() is invoked 
- * after a cht_insert() @e returned eg on another cpu, cht_find() is 
- * guaranteed to see the inserted item. 
- * 
+ *
+ * Readers (but not lazy readers) are guaranteed to see the effects
+ * of @e completed updates. In other words, if cht_find() is invoked
+ * after a cht_insert() @e returned eg on another cpu, cht_find() is
+ * guaranteed to see the inserted item.
+ *
  * Similarly, updates see the effects of @e completed updates. For example,
- * issuing cht_remove() after a cht_insert() for that key returned (even 
+ * issuing cht_remove() after a cht_insert() for that key returned (even
  * on another cpu) is guaranteed to remove the inserted item.
- * 
+ *
  * Reading or updating the table concurrently with other updates
  * always returns consistent data and never corrupts the table.
  * However the effects of concurrent updates may or may not be
  * visible to all other concurrent readers or updaters. Eg, not
- * all readers may see that an item has already been inserted 
- * if cht_insert() has not yet returned. 
- * 
+ * all readers may see that an item has already been inserted
+ * if cht_insert() has not yet returned.
+ *
  * Lazy readers are guaranteed to eventually see updates but it
  * may take some time (possibly milliseconds) after the update
  * completes for the change to propagate to lazy readers on all
  * cpus.
- * 
+ *
  * @par Implementation
- * 
+ *
  * Collisions in CHT are resolved with chaining. The number of buckets
- * is always a power of 2. Each bucket is represented with a single linked 
- * lock-free list [1]. Items in buckets are sorted by their mixed hashes 
- * in ascending order. All buckets are terminated with a single global 
- * sentinel node whose mixed hash value is the greatest possible. 
+ * is always a power of 2. Each bucket is represented with a single linked
+ * lock-free list [1]. Items in buckets are sorted by their mixed hashes
+ * in ascending order. All buckets are terminated with a single global
+ * sentinel node whose mixed hash value is the greatest possible.
  *
  * CHT with 2^k buckets uses the k most significant bits of a hash value
@@ -127,32 +127,32 @@
  * hash function does not produce uniform hashes, hash values are
  * mixed first so that the top bits of a mixed hash change even if hash
- * values differ only in the least significant bits. The mixed hash 
- * values are cached in cht_link.hash (which is overwritten once the 
+ * values differ only in the least significant bits. The mixed hash
+ * values are cached in cht_link.hash (which is overwritten once the
  * item is scheduled for removal via rcu_call).
- * 
+ *
  * A new item is inserted before all other existing items in the bucket
  * with the same hash value as the newly inserted item (a la the original
- * lock-free list [2]). Placing new items at the start of a same-hash 
- * sequence of items (eg duplicates) allows us to easily check for duplicates 
- * in cht_insert_unique(). The function can first check that there are 
- * no duplicates of the newly inserted item amongst the items with the 
- * same hash as the new item. If there were no duplicates the new item 
- * is linked before the same-hash items. Inserting a duplicate while 
- * the function is checking for duplicates is detected as a change of 
- * the link to the first checked same-hash item (and the search for 
+ * lock-free list [2]). Placing new items at the start of a same-hash
+ * sequence of items (eg duplicates) allows us to easily check for duplicates
+ * in cht_insert_unique(). The function can first check that there are
+ * no duplicates of the newly inserted item amongst the items with the
+ * same hash as the new item. If there were no duplicates the new item
+ * is linked before the same-hash items. Inserting a duplicate while
+ * the function is checking for duplicates is detected as a change of
+ * the link to the first checked same-hash item (and the search for
  * duplicates can be restarted).
- * 
+ *
  * @par Table resize algorithm
- * 
+ *
  * Table resize is based on [3] and [5]. First, a new bucket head array
  * is allocated and initialized. Second, old bucket heads are moved
- * to the new bucket head array with the protocol mentioned in [5]. 
+ * to the new bucket head array with the protocol mentioned in [5].
  * At this point updaters start using the new bucket heads. Third,
  * buckets are split (or joined) so that the table can make use of
  * the extra bucket head slots in the new array (or stop wasting space
  * with the unnecessary extra slots in the old array). Splitting
- * or joining buckets employs a custom protocol. Last, the new array 
+ * or joining buckets employs a custom protocol. Last, the new array
  * replaces the original bucket array.
- * 
+ *
  * A single background work item (of the system work queue) guides
  * resizing of the table. If an updater detects that the bucket it
@@ -160,51 +160,51 @@
  * or it needs to be split/joined), it helps out and completes the
  * head move or the bucket split/join.
- * 
- * The table always grows or shrinks by a factor of 2. Because items 
- * are assigned a bucket based on the top k bits of their mixed hash 
- * values, when growing the table each bucket is split into two buckets 
- * and all items of the two new buckets come from the single bucket in the 
+ *
+ * The table always grows or shrinks by a factor of 2. Because items
+ * are assigned a bucket based on the top k bits of their mixed hash
+ * values, when growing the table each bucket is split into two buckets
+ * and all items of the two new buckets come from the single bucket in the
  * original table. Ie items from separate buckets in the original table
- * never intermix in the new buckets. Moreover 
- * since the buckets are sorted by their mixed hash values the items 
- * at the beginning of the old bucket will end up in the first new 
+ * never intermix in the new buckets. Moreover
+ * since the buckets are sorted by their mixed hash values the items
+ * at the beginning of the old bucket will end up in the first new
  * bucket while all the remaining items of the old bucket will end up
- * in the second new bucket. Therefore, there is a single point where 
- * to split the linked list of the old bucket into two correctly sorted 
+ * in the second new bucket. Therefore, there is a single point where
+ * to split the linked list of the old bucket into two correctly sorted
  * linked lists of the new buckets:
  *                            .- bucket split
- *                            | 
- *             <-- first -->  v  <-- second --> 
+ *                            |
+ *             <-- first -->  v  <-- second -->
  *   [old] --> [00b] -> [01b] -> [10b] -> [11b] -> sentinel
- *              ^                 ^    
- *   [new0] -- -+                 |  
+ *              ^                 ^
+ *   [new0] -- -+                 |
  *   [new1] -- -- -- -- -- -- -- -+
- * 
+ *
  * Resize in greater detail:
- * 
- * a) First, a resizer (a single background system work queue item 
- * in charge of resizing the table) allocates and initializes a new 
- * bucket head array. New bucket heads are pointed to the sentinel 
- * and marked Invalid (in the lower order bits of the pointer to the 
+ *
+ * a) First, a resizer (a single background system work queue item
+ * in charge of resizing the table) allocates and initializes a new
+ * bucket head array. New bucket heads are pointed to the sentinel
+ * and marked Invalid (in the lower order bits of the pointer to the
  * next item, ie the sentinel in this case):
- * 
+ *
  *   [old, N] --> [00b] -> [01b] -> [10b] -> [11b] -> sentinel
  *                                                    ^ ^
  *   [new0, Inv] -------------------------------------+ |
  *   [new1, Inv] ---------------------------------------+
- * 
- * 
- * b) Second, the resizer starts moving old bucket heads with the following 
- * lock-free protocol (from [5]) where cas(variable, expected_val, new_val) 
+ *
+ *
+ * b) Second, the resizer starts moving old bucket heads with the following
+ * lock-free protocol (from [5]) where cas(variable, expected_val, new_val)
  * is short for compare-and-swap:
- * 
+ *
  *   old head     new0 head      transition to next state
  *   --------     ---------      ------------------------
  *   addr, N      sentinel, Inv  cas(old, (addr, N), (addr, Const))
- *                               .. mark the old head as immutable, so that 
- *                                  updaters do not relink it to other nodes 
+ *                               .. mark the old head as immutable, so that
+ *                                  updaters do not relink it to other nodes
  *                                  until the head move is done.
  *   addr, Const  sentinel, Inv  cas(new0, (sentinel, Inv), (addr, N))
- *                               .. move the address to the new head and mark 
+ *                               .. move the address to the new head and mark
  *                                  the new head normal so updaters can start
  *                                  using it.
@@ -213,20 +213,20 @@
  *                                  the head move is done.
  *   addr, Inv    addr, N
- * 
+ *
  * Notice that concurrent updaters may step in at any point and correctly
  * complete the head move without disrupting the resizer. At worst, the
- * resizer or other concurrent updaters will attempt a number of CAS() that 
+ * resizer or other concurrent updaters will attempt a number of CAS() that
  * will correctly fail.
- * 
+ *
  *   [old, Inv] -> [00b] -> [01b] -> [10b] -> [11b] -> sentinel
  *                 ^                                   ^
  *   [new0, N] ----+                                   |
  *   [new1, Inv] --------------------------------------+
- * 
- *  
- * c) Third, buckets are split if the table is growing; or joined if 
- * shrinking (by the resizer or updaters depending on whoever accesses 
+ *
+ *
+ * c) Third, buckets are split if the table is growing; or joined if
+ * shrinking (by the resizer or updaters depending on whoever accesses
  * the bucket first). See split_bucket() and join_buckets() for details.
- * 
+ *
  *  1) Mark the last item of new0 with JOIN_FOLLOWS:
  *   [old, Inv] -> [00b] -> [01b, JF] -> [10b] -> [11b] -> sentinel
@@ -234,5 +234,5 @@
  *   [new0, N] ----+                                       |
  *   [new1, Inv] ------------------------------------------+
- * 
+ *
  *  2) Mark the first item of new1 with JOIN_NODE:
  *   [old, Inv] -> [00b] -> [01b, JF] -> [10b, JN] -> [11b] -> sentinel
@@ -240,5 +240,5 @@
  *   [new0, N] ----+                                           |
  *   [new1, Inv] ----------------------------------------------+
- * 
+ *
  *  3) Point new1 to the join-node and mark new1 NORMAL.
  *   [old, Inv] -> [00b] -> [01b, JF] -> [10b, JN] -> [11b] -> sentinel
@@ -246,12 +246,12 @@
  *   [new0, N] ----+                     |
  *   [new1, N] --------------------------+
- * 
- * 
- * d) Fourth, the resizer cleans up extra marks added during bucket 
+ *
+ *
+ * d) Fourth, the resizer cleans up extra marks added during bucket
  * splits/joins but only when it is sure all updaters are accessing
  * the table via the new bucket heads only (ie it is certain there
- * are no delayed updaters unaware of the resize and accessing the 
+ * are no delayed updaters unaware of the resize and accessing the
  * table via the old bucket head).
- * 
+ *
  *   [old, Inv] ---+
  *                 v
@@ -259,16 +259,16 @@
  *                                      v
  *   [new1, N] --> [10b, N] -> [11b] -> sentinel
- * 
- * 
+ *
+ *
  * e) Last, the resizer publishes the new bucket head array for everyone
  * to see and use. This signals the end of the resize and the old bucket
- * array is freed. 
- * 
- * 
+ * array is freed.
+ *
+ *
  * To understand details of how the table is resized, read [1, 3, 5]
  * and comments in join_buckets(), split_bucket().
- *  
- * 
- * [1] High performance dynamic lock-free hash tables and list-based sets, 
+ *
+ *
+ * [1] High performance dynamic lock-free hash tables and list-based sets,
  *     Michael, 2002
  *     http://www.research.ibm.com/people/m/michael/spaa-2002.pdf
@@ -311,11 +311,11 @@
 #define CHT_MIN_BUCKET_CNT (1 << CHT_MIN_ORDER)
 /* Does not have to be a power of 2. */
-#define CHT_MAX_LOAD 2 
+#define CHT_MAX_LOAD 2
 
 typedef cht_ptr_t marked_ptr_t;
 typedef bool (*equal_pred_t)(void *arg, const cht_link_t *item);
 
-/** The following mark items and bucket heads. 
- * 
+/** The following mark items and bucket heads.
+ *
  * They are stored in the two low order bits of the next item pointers.
  * Some marks may be combined. Some marks share the same binary value and
@@ -327,22 +327,22 @@
 	N_NORMAL = 0,
 	/** Logically deleted item that might have already been unlinked.
-	 * 
-	 * May be combined with N_JOIN and N_JOIN_FOLLOWS. Applicable only 
-	 * to items; never to bucket heads. 
-	 * 
-	 * Once marked deleted an item remains marked deleted.	 
+	 *
+	 * May be combined with N_JOIN and N_JOIN_FOLLOWS. Applicable only
+	 * to items; never to bucket heads.
+	 *
+	 * Once marked deleted an item remains marked deleted.
 	 */
 	N_DELETED = 1,
-	/** Immutable bucket head. 
-	 * 
-	 * The bucket is being moved or joined with another and its (old) head 
+	/** Immutable bucket head.
+	 *
+	 * The bucket is being moved or joined with another and its (old) head
 	 * must not be modified.
-	 * 
+	 *
 	 * May be combined with N_INVALID. Applicable only to old bucket heads,
 	 * ie cht_t.b and not cht_t.new_b.
 	 */
 	N_CONST = 1,
-	/** Invalid bucket head. The bucket head must not be modified. 
-	 * 
+	/** Invalid bucket head. The bucket head must not be modified.
+	 *
 	 * Old bucket heads (ie cht_t.b) are marked invalid if they have
 	 * already been moved to cht_t.new_b or if the bucket had already
@@ -354,12 +354,12 @@
 	N_INVALID = 3,
 	/** The item is a join node, ie joining two buckets
-	 * 
+	 *
 	 * A join node is either the first node of the second part of
 	 * a bucket to be split; or it is the first node of the bucket
 	 * to be merged into/appended to/joined with another bucket.
-	 * 
-	 * May be combined with N_DELETED. Applicable only to items, never 
+	 *
+	 * May be combined with N_DELETED. Applicable only to items, never
 	 * to bucket heads.
-	 * 
+	 *
 	 * Join nodes are referred to from two different buckets and may,
 	 * therefore, not be safely/atomically unlinked from both buckets.
@@ -369,12 +369,12 @@
 	 */
 	N_JOIN = 2,
-	/** The next node is a join node and will soon be marked so. 
-	 * 
+	/** The next node is a join node and will soon be marked so.
+	 *
 	 * A join-follows node is the last node of the first part of bucket
 	 * that is to be split, ie it is the last node that will remain
 	 * in the same bucket after splitting it.
-	 * 
+	 *
 	 * May be combined with N_DELETED. Applicable to items as well
-	 * as to bucket heads of the bucket to be split (but only in cht_t.new_b). 
+	 * as to bucket heads of the bucket to be split (but only in cht_t.new_b).
 	 */
 	N_JOIN_FOLLOWS = 2,
@@ -413,31 +413,31 @@
 
 static size_t size_to_order(size_t bucket_cnt, size_t min_order);
-static cht_buckets_t *alloc_buckets(size_t order, bool set_invalid, 
+static cht_buckets_t *alloc_buckets(size_t order, bool set_invalid,
 	bool can_block);
 static inline cht_link_t *find_lazy(cht_t *h, void *key);
-static cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key, 
+static cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key,
 	size_t search_hash);
-static cht_link_t *find_resizing(cht_t *h, void *key, size_t hash, 
+static cht_link_t *find_resizing(cht_t *h, void *key, size_t hash,
 	marked_ptr_t old_head, size_t old_idx);
 static bool insert_impl(cht_t *h, cht_link_t *item, cht_link_t **dup_item);
 static bool insert_at(cht_link_t *item, const wnd_t *wnd, walk_mode_t walk_mode,
 	bool *resizing);
-static bool has_duplicate(cht_t *h, const cht_link_t *item, size_t hash, 
+static bool has_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
 	cht_link_t *cur, cht_link_t **dup_item);
-static cht_link_t *find_duplicate(cht_t *h, const cht_link_t *item, size_t hash, 
+static cht_link_t *find_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
 	cht_link_t *start);
 static bool remove_pred(cht_t *h, size_t hash, equal_pred_t pred, void *pred_arg);
-static bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode, 
+static bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode,
 	bool *deleted_but_gc, bool *resizing);
 static bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode, bool *resizing);
 static bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode, bool *resizing);
-static bool find_wnd_and_gc_pred(cht_t *h, size_t hash, walk_mode_t walk_mode, 
+static bool find_wnd_and_gc_pred(cht_t *h, size_t hash, walk_mode_t walk_mode,
 	equal_pred_t pred, void *pred_arg, wnd_t *wnd, bool *resizing);
-static bool find_wnd_and_gc(cht_t *h, size_t hash, walk_mode_t walk_mode, 
+static bool find_wnd_and_gc(cht_t *h, size_t hash, walk_mode_t walk_mode,
 	wnd_t *wnd, bool *resizing);
 static bool gc_deleted_node(cht_t *h, walk_mode_t walk_mode, wnd_t *wnd,
 	bool *resizing);
 static bool join_completed(cht_t *h, const wnd_t *wnd);
-static void upd_resizing_head(cht_t *h, size_t hash, marked_ptr_t **phead, 
+static void upd_resizing_head(cht_t *h, size_t hash, marked_ptr_t **phead,
 	bool *join_finishing,  walk_mode_t *walk_mode);
 static void item_removed(cht_t *h);
@@ -448,12 +448,12 @@
 static void mark_const(marked_ptr_t *psrc_head);
 static void complete_head_move(marked_ptr_t *psrc_head, marked_ptr_t *pdest_head);
-static void split_bucket(cht_t *h, marked_ptr_t *psrc_head, 
+static void split_bucket(cht_t *h, marked_ptr_t *psrc_head,
 	marked_ptr_t *pdest_head, size_t split_hash);
-static void mark_join_follows(cht_t *h, marked_ptr_t *psrc_head, 
+static void mark_join_follows(cht_t *h, marked_ptr_t *psrc_head,
 	size_t split_hash, wnd_t *wnd);
 static void mark_join_node(cht_link_t *join_node);
-static void join_buckets(cht_t *h, marked_ptr_t *psrc_head, 
+static void join_buckets(cht_t *h, marked_ptr_t *psrc_head,
 	marked_ptr_t *pdest_head, size_t split_hash);
-static void link_to_join_node(cht_t *h, marked_ptr_t *pdest_head, 
+static void link_to_join_node(cht_t *h, marked_ptr_t *pdest_head,
 	cht_link_t *join_node, size_t split_hash);
 static void resize_table(work_t *arg);
@@ -461,5 +461,5 @@
 static void shrink_table(cht_t *h);
 static void cleanup_join_node(cht_t *h, marked_ptr_t *new_head);
-static void clear_join_and_gc(cht_t *h, cht_link_t *join_node, 
+static void clear_join_and_gc(cht_t *h, cht_link_t *join_node,
 	marked_ptr_t *new_head);
 static void cleanup_join_follows(cht_t *h, marked_ptr_t *new_head);
@@ -478,7 +478,7 @@
 static size_t grow_idx(size_t idx);
 static size_t shrink_idx(size_t idx);
-static marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next, 
+static marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next,
 	mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark);
-static marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur, 
+static marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur,
 	marked_ptr_t new);
 static void cas_order_barrier(void);
@@ -490,5 +490,5 @@
 
 /** Creates a concurrent hash table.
- * 
+ *
  * @param h         Valid pointer to a cht_t instance.
  * @param op        Item specific operations. All operations are compulsory.
@@ -497,9 +497,9 @@
 bool cht_create_simple(cht_t *h, cht_ops_t *op)
 {
-	return cht_create(h, 0, 0, 0, false, op); 
+	return cht_create(h, 0, 0, 0, false, op);
 }
 
 /** Creates a concurrent hash table.
- * 
+ *
  * @param h         Valid pointer to a cht_t instance.
  * @param init_size The initial number of buckets the table should contain.
@@ -513,11 +513,11 @@
  *                  before the table grows.
  * @param can_block If true creating the table blocks until enough memory
- *                  is available (possibly indefinitely). Otherwise, 
+ *                  is available (possibly indefinitely). Otherwise,
  *                  table creation does not block and returns immediately
- *                  even if not enough memory is available. 
+ *                  even if not enough memory is available.
  * @param op        Item specific operations. All operations are compulsory.
  * @return True if successfully created the table. False otherwise.
  */
-bool cht_create(cht_t *h, size_t init_size, size_t min_size, size_t max_load, 
+bool cht_create(cht_t *h, size_t init_size, size_t min_size, size_t max_load,
 	bool can_block, cht_ops_t *op)
 {
@@ -551,5 +551,5 @@
 	}
 	
-	/* 
+	/*
 	 * Cached item hashes are stored in item->rcu_link.func. Once the item
 	 * is deleted rcu_link.func will contain the value of invalid_hash.
@@ -564,13 +564,13 @@
 
 /** Allocates and initializes 2^order buckets.
- * 
+ *
  * All bucket heads are initialized to point to the sentinel node.
- * 
+ *
  * @param order       The number of buckets to allocate is 2^order.
  * @param set_invalid Bucket heads are marked invalid if true; otherwise
  *                    they are marked N_NORMAL.
  * @param can_block   If true memory allocation blocks until enough memory
- *                    is available (possibly indefinitely). Otherwise, 
- *                    memory allocation does not block. 
+ *                    is available (possibly indefinitely). Otherwise,
+ *                    memory allocation does not block.
  * @return Newly allocated and initialized buckets or NULL if not enough memory.
  */
@@ -578,5 +578,5 @@
 {
 	size_t bucket_cnt = (1 << order);
-	size_t bytes = 
+	size_t bytes =
 		sizeof(cht_buckets_t) + (bucket_cnt - 1) * sizeof(marked_ptr_t);
 	cht_buckets_t *b = malloc(bytes, can_block ? 0 : FRAME_ATOMIC);
@@ -587,6 +587,6 @@
 	b->order = order;
 	
-	marked_ptr_t head_link = set_invalid 
-		? make_link(&sentinel, N_INVALID) 
+	marked_ptr_t head_link = set_invalid
+		? make_link(&sentinel, N_INVALID)
 		: make_link(&sentinel, N_NORMAL);
 	
@@ -615,5 +615,5 @@
 
 /** Destroys a CHT successfully created via cht_create().
- * 
+ *
  * Waits for all outstanding concurrent operations to complete and
  * frees internal allocated resources. The table is however not cleared
@@ -644,16 +644,16 @@
 
 /** Returns the first item equal to the search key or NULL if not found.
- * 
- * The call must be enclosed in a rcu_read_lock() unlock() pair. The 
+ *
+ * The call must be enclosed in a rcu_read_lock() unlock() pair. The
  * returned item is guaranteed to be allocated until rcu_read_unlock()
  * although the item may be concurrently removed from the table by another
  * cpu.
- * 
+ *
  * Further items matching the key may be retrieved via cht_find_next().
- * 
+ *
  * cht_find() sees the effects of any completed cht_remove(), cht_insert().
  * If a concurrent remove or insert had not yet completed cht_find() may
  * or may not see the effects of it (eg it may find an item being removed).
- * 
+ *
  * @param h   CHT to operate on.
  * @param key Search key as defined by cht_ops_t.key_equal() and .key_hash().
@@ -668,11 +668,11 @@
 
 /** Returns the first item equal to the search key or NULL if not found.
- * 
- * Unlike cht_find(), cht_find_lazy() may not see the effects of 
+ *
+ * Unlike cht_find(), cht_find_lazy() may not see the effects of
  * cht_remove() or cht_insert() even though they have already completed.
  * It may take a couple of milliseconds for those changes to propagate
- * and become visible to cht_find_lazy(). On the other hand, cht_find_lazy() 
+ * and become visible to cht_find_lazy(). On the other hand, cht_find_lazy()
  * operates a bit faster than cht_find().
- * 
+ *
  * See cht_find() for more details.
  */
@@ -693,6 +693,6 @@
 	cht_buckets_t *b = rcu_access(h->b);
 	size_t idx = calc_bucket_idx(hash, b->order);
-	/* 
-	 * No need for access_once. b->head[idx] will point to an allocated node 
+	/*
+	 * No need for access_once. b->head[idx] will point to an allocated node
 	 * even if marked invalid until we exit rcu read section.
 	 */
@@ -706,11 +706,11 @@
 }
 
-/** Returns the next item matching \a item. 
- * 
- * Must be enclosed in a rcu_read_lock()/unlock() pair. Effects of 
+/** Returns the next item matching \a item.
+ *
+ * Must be enclosed in a rcu_read_lock()/unlock() pair. Effects of
  * completed cht_remove(), cht_insert() are guaranteed to be visible
  * to cht_find_next().
- * 
- * See cht_find() for more details.  
+ *
+ * See cht_find() for more details.
  */
 cht_link_t *cht_find_next(cht_t *h, const cht_link_t *item)
@@ -721,11 +721,11 @@
 }
 
-/** Returns the next item matching \a item. 
- * 
- * Must be enclosed in a rcu_read_lock()/unlock() pair. Effects of 
+/** Returns the next item matching \a item.
+ *
+ * Must be enclosed in a rcu_read_lock()/unlock() pair. Effects of
  * completed cht_remove(), cht_insert() may or may not be visible
  * to cht_find_next_lazy().
- * 
- * See cht_find_lazy() for more details.  
+ *
+ * See cht_find_lazy() for more details.
  */
 cht_link_t *cht_find_next_lazy(cht_t *h, const cht_link_t *item)
@@ -739,10 +739,10 @@
 
 /** Searches the bucket at head for key using search_hash. */
-static inline cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key, 
+static inline cht_link_t *search_bucket(cht_t *h, marked_ptr_t head, void *key,
 	size_t search_hash)
 {
-	/* 
+	/*
 	 * It is safe to access nodes even outside of this bucket (eg when
-	 * splitting the bucket). The resizer makes sure that any node we 
+	 * splitting the bucket). The resizer makes sure that any node we
 	 * may find by following the next pointers is allocated.
 	 */
@@ -759,7 +759,7 @@
 	} while (node_hash(h, cur) < search_hash);
 	
-	/* 
+	/*
 	 * Only search for an item with an equal key if cur is not the sentinel
-	 * node or a node with a different hash. 
+	 * node or a node with a different hash.
 	 */
 	while (node_hash(h, cur) == search_hash) {
@@ -771,7 +771,7 @@
 		cur = get_next(cur->link);
 		assert(cur);
-	} 
-	
-	/* 
+	}
+	
+	/*
 	 * In the unlikely case that we have encountered a node whose cached
 	 * hash has been overwritten due to a pending rcu_call for it, skip
@@ -787,8 +787,8 @@
 
 /** Searches for the key while the table is undergoing a resize. */
-static cht_link_t *find_resizing(cht_t *h, void *key, size_t hash, 
+static cht_link_t *find_resizing(cht_t *h, void *key, size_t hash,
 	marked_ptr_t old_head, size_t old_idx)
 {
-	assert(N_INVALID == get_mark(old_head)); 
+	assert(N_INVALID == get_mark(old_head));
 	assert(h->new_b);
 	
@@ -799,5 +799,5 @@
 	/* Growing. */
 	if (h->b->order < h->new_b->order) {
-		/* 
+		/*
 		 * Old bucket head is invalid, so it must have been already
 		 * moved. Make the new head visible if still not visible, ie
@@ -805,11 +805,11 @@
 		 */
 		if (N_INVALID == get_mark(new_head)) {
-			/* 
+			/*
 			 * We should be searching a newly added bucket but the old
-			 * moved bucket has not yet been split (its marked invalid) 
-			 * or we have not yet seen the split. 
+			 * moved bucket has not yet been split (its marked invalid)
+			 * or we have not yet seen the split.
 			 */
 			if (grow_idx(old_idx) != new_idx) {
-				/* 
+				/*
 				 * Search the moved bucket. It is guaranteed to contain
 				 * items of the newly added bucket that were present
@@ -821,5 +821,5 @@
 			/* new_head is now the moved bucket, either valid or invalid. */
 			
-			/* 
+			/*
 			 * The old bucket was definitely moved to new_head but the
 			 * change of new_head had not yet propagated to this cpu.
@@ -829,9 +829,9 @@
 				 * We could issue a read_barrier() and make the now valid
 				 * moved bucket head new_head visible, but instead fall back
-				 * on using the old bucket. Although the old bucket head is 
-				 * invalid, it points to a node that is allocated and in the 
+				 * on using the old bucket. Although the old bucket head is
+				 * invalid, it points to a node that is allocated and in the
 				 * right bucket. Before the node can be freed, it must be
 				 * unlinked from the head (or another item after that item
-				 * modified the new_head) and a grace period must elapse. 
+				 * modified the new_head) and a grace period must elapse.
 				 * As a result had the node been already freed the grace
 				 * period preceeding the free() would make the unlink and
@@ -855,17 +855,17 @@
 		
 		/*
-		 * h->b->head[move_src_idx] had already been moved to new_head 
+		 * h->b->head[move_src_idx] had already been moved to new_head
 		 * but the change to new_head had not yet propagated to us.
 		 */
 		if (N_INVALID == get_mark(new_head)) {
 			/*
-			 * new_head is definitely valid and we could make it visible 
-			 * to this cpu with a read_barrier(). Instead, use the bucket 
-			 * in the old table that was moved even though it is now marked 
+			 * new_head is definitely valid and we could make it visible
+			 * to this cpu with a read_barrier(). Instead, use the bucket
+			 * in the old table that was moved even though it is now marked
 			 * as invalid. The node it points to must be allocated because
 			 * a grace period would have to elapse before it could be freed;
-			 * and the grace period would make the now valid new_head 
-			 * visible to all cpus. 
-			 * 
+			 * and the grace period would make the now valid new_head
+			 * visible to all cpus.
+			 *
 			 * Note that move_src_idx may not be the same as old_idx.
 			 * If move_src_idx != old_idx then old_idx is the bucket
@@ -873,8 +873,8 @@
 			 * appended to the moved bucket, ie it is added at the tail
 			 * of new_head. In that case an invalid old_head notes that
-			 * it had already been merged into (the moved) new_head. 
+			 * it had already been merged into (the moved) new_head.
 			 * We will try to search that bucket first because it
-			 * may contain some newly added nodes after the bucket 
-			 * join. Moreover, the bucket joining link may already be 
+			 * may contain some newly added nodes after the bucket
+			 * join. Moreover, the bucket joining link may already be
 			 * visible even if new_head is not. Therefore, if we're
 			 * lucky we'll find the item via moved_old_head. In any
@@ -895,6 +895,6 @@
 		if (move_src_idx != old_idx && get_next(old_head) != &sentinel) {
 			/*
-			 * Note that old_head (the bucket to be merged into new_head) 
-			 * points to an allocated join node (if non-null) even if marked 
+			 * Note that old_head (the bucket to be merged into new_head)
+			 * points to an allocated join node (if non-null) even if marked
 			 * invalid. Before the resizer lets join nodes to be unlinked
 			 * (and freed) it sets old_head to NULL and waits for a grace period.
@@ -909,10 +909,10 @@
 		return NULL;
 	} else {
-		/* 
+		/*
 		 * Resize is almost done. The resizer is waiting to make
 		 * sure all cpus see that the new table replaced the old one.
 		 */
 		assert(h->b->order == h->new_b->order);
-		/* 
+		/*
 		 * The resizer must ensure all new bucket heads are visible before
 		 * replacing the old table.
@@ -929,10 +929,10 @@
 }
 
-/** Inserts a unique item. Returns false if an equal item was already present. 
- * 
+/** Inserts a unique item. Returns false if an equal item was already present.
+ *
  * Use this function to atomically check if an equal/duplicate item had
- * not yet been inserted into the table and to insert this item into the 
+ * not yet been inserted into the table and to insert this item into the
  * table.
- * 
+ *
  * The following is @e NOT thread-safe, so do not use:
  * @code
@@ -944,5 +944,5 @@
  * }
  * @endcode
- * 
+ *
  * Replace such code with:
  * @code
@@ -951,5 +951,5 @@
  *     // Whoops, someone beat us to it - an equal item 'dup_item'
  *     // had already been inserted.
- *     free(item); 
+ *     free(item);
  * } else {
  *     // Successfully inserted the item and we are guaranteed that
@@ -957,5 +957,5 @@
  * }
  * @endcode
- * 
+ *
  */
 bool cht_insert_unique(cht_t *h, cht_link_t *item, cht_link_t **dup_item)
@@ -1007,5 +1007,5 @@
 		}
 		
-		inserted = insert_at(item, &wnd, walk_mode, &resizing);		
+		inserted = insert_at(item, &wnd, walk_mode, &resizing);
 	} while (!inserted);
 	
@@ -1016,11 +1016,11 @@
 }
 
-/** Inserts item between wnd.ppred and wnd.cur. 
- * 
+/** Inserts item between wnd.ppred and wnd.cur.
+ *
  * @param item      Item to link to wnd.ppred and wnd.cur.
  * @param wnd       The item will be inserted before wnd.cur. Wnd.ppred
  *                  must be N_NORMAL.
- * @param walk_mode 
- * @param resizing  Set to true only if the table is undergoing resize 
+ * @param walk_mode
+ * @param resizing  Set to true only if the table is undergoing resize
  *         and it was not expected (ie walk_mode == WM_NORMAL).
  * @return True if the item was successfully linked to wnd.ppred. False
@@ -1028,5 +1028,5 @@
  *         of wnd.cur has changed.
  */
-inline static bool insert_at(cht_link_t *item, const wnd_t *wnd, 
+inline static bool insert_at(cht_link_t *item, const wnd_t *wnd,
 	walk_mode_t walk_mode, bool *resizing)
 {
@@ -1076,5 +1076,5 @@
 
 /** Returns true if the chain starting at cur has an item equal to \a item.
- * 
+ *
  * @param h    CHT to operate on.
  * @param item Item whose duplicates the function looks for.
@@ -1084,5 +1084,5 @@
  * @return True if a non-deleted item equal to \a item exists in the table.
  */
-static inline bool has_duplicate(cht_t *h, const cht_link_t *item, size_t hash, 
+static inline bool has_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
 	cht_link_t *cur, cht_link_t **dup_item)
 {
@@ -1095,7 +1095,7 @@
 		return false;
 
-	/* 
-	 * Load the most recent node marks. Otherwise we might pronounce a 
-	 * logically deleted node for a duplicate of the item just because 
+	/*
+	 * Load the most recent node marks. Otherwise we might pronounce a
+	 * logically deleted node for a duplicate of the item just because
 	 * the deleted node's DEL mark had not yet propagated to this cpu.
 	 */
@@ -1107,5 +1107,5 @@
 
 /** Returns an item that is equal to \a item starting in a chain at \a start. */
-static cht_link_t *find_duplicate(cht_t *h, const cht_link_t *item, size_t hash, 
+static cht_link_t *find_duplicate(cht_t *h, const cht_link_t *item, size_t hash,
 	cht_link_t *start)
 {
@@ -1114,5 +1114,5 @@
 	cht_link_t *cur = start;
 	
-try_again:	
+try_again:
 	assert(cur);
 
@@ -1128,5 +1128,5 @@
 		cur = get_next(cur->link);
 		assert(cur);
-	} 
+	}
 
 	/* Skip logically deleted nodes with rcu_call() in progress. */
@@ -1147,5 +1147,5 @@
 	size_t removed = 0;
 	
-	while (remove_pred(h, hash, h->op->key_equal, key)) 
+	while (remove_pred(h, hash, h->op->key_equal, key))
 		++removed;
 	
@@ -1153,11 +1153,11 @@
 }
 
-/** Removes a specific item from the table. 
- * 
- * The called must hold rcu read lock. 
- * 
+/** Removes a specific item from the table.
+ *
+ * The called must hold rcu read lock.
+ *
  * @param item Item presumably present in the table and to be removed.
  * @return True if the item was removed successfully; or false if it had
- *     already been deleted. 
+ *     already been deleted.
  */
 bool cht_remove_item(cht_t *h, cht_link_t *item)
@@ -1168,7 +1168,7 @@
 	assert(rcu_read_locked());
 
-	/* 
+	/*
 	 * Even though we know the node we want to delete we must unlink it
-	 * from the correct bucket and from a clean/normal predecessor. Therefore, 
+	 * from the correct bucket and from a clean/normal predecessor. Therefore,
 	 * we search for it again from the beginning of the correct bucket.
 	 */
@@ -1213,12 +1213,12 @@
 		}
 		
-		/* 
+		/*
 		 * The item lookup is affected by a bucket join but effects of
 		 * the bucket join have not been seen while searching for the item.
 		 */
 		if (join_finishing && !join_completed(h, &wnd)) {
-			/* 
-			 * Bucket was appended at the end of another but the next 
-			 * ptr linking them together was not visible on this cpu. 
+			/*
+			 * Bucket was appended at the end of another but the next
+			 * ptr linking them together was not visible on this cpu.
 			 * join_completed() makes this appended bucket visible.
 			 */
@@ -1237,5 +1237,5 @@
 		}
 		
-		deleted = delete_at(h, &wnd, walk_mode, &deleted_but_gc, &resizing);		
+		deleted = delete_at(h, &wnd, walk_mode, &deleted_but_gc, &resizing);
 	} while (!deleted || deleted_but_gc);
 	
@@ -1245,13 +1245,13 @@
 
 /** Unlinks wnd.cur from wnd.ppred and schedules a deferred free for the item.
- * 
+ *
  * Ignores nodes marked N_JOIN if walk mode is WM_LEAVE_JOIN.
- * 
+ *
  * @param h   CHT to operate on.
  * @param wnd Points to the item to delete and its N_NORMAL predecessor.
  * @param walk_mode Bucket chaing walk mode.
- * @param deleted_but_gc Set to true if the item had been logically deleted, 
+ * @param deleted_but_gc Set to true if the item had been logically deleted,
  *         but a garbage collecting walk of the bucket is in order for
- *         it to be fully unlinked.         
+ *         it to be fully unlinked.
  * @param resizing Set to true if the table is undergoing an unexpected
  *         resize (ie walk_mode == WM_NORMAL).
@@ -1259,5 +1259,5 @@
  *         delete operation must be retried.
  */
-static inline bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode, 
+static inline bool delete_at(cht_t *h, wnd_t *wnd, walk_mode_t walk_mode,
 	bool *deleted_but_gc, bool *resizing)
 {
@@ -1289,12 +1289,12 @@
 
 /** Marks cur logically deleted. Returns false to request a retry. */
-static inline bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode, 
+static inline bool mark_deleted(cht_link_t *cur, walk_mode_t walk_mode,
 	bool *resizing)
 {
 	assert(cur && cur != &sentinel);
 	
-	/* 
+	/*
 	 * Btw, we could loop here if the cas fails but let's not complicate
-	 * things and let's retry from the head of the bucket. 
+	 * things and let's retry from the head of the bucket.
 	 */
 	
@@ -1315,10 +1315,10 @@
 		mark_t cur_mark = get_mark(cur->link) & N_JOIN_FOLLOWS;
 		
-		marked_ptr_t ret = 
+		marked_ptr_t ret =
 			cas_link(&cur->link, next, cur_mark, next, cur_mark | N_DELETED);
 		
 		if (ret != make_link(next, cur_mark))
 			return false;
-	} 
+	}
 	
 	return true;
@@ -1326,5 +1326,5 @@
 
 /** Unlinks wnd.cur from wnd.ppred. Returns false if it should be retried. */
-static inline bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode, 
+static inline bool unlink_from_pred(wnd_t *wnd, walk_mode_t walk_mode,
 	bool *resizing)
 {
@@ -1355,5 +1355,5 @@
 		marked_ptr_t pred_link = make_link(wnd->cur, N_NORMAL);
 		/* Link to cur's successor keeping/copying cur's JF mark. */
-		marked_ptr_t next_link = make_link(next, cur_mark);		
+		marked_ptr_t next_link = make_link(next, cur_mark);
 		
 		marked_ptr_t ret = _cas_link(wnd->ppred, pred_link, next_link);
@@ -1361,5 +1361,5 @@
 		if (pred_link != ret) {
 			/* If we're not resizing the table there are no JF/JN nodes. */
-			*resizing = (walk_mode == WM_NORMAL) 
+			*resizing = (walk_mode == WM_NORMAL)
 				&& (N_JOIN_FOLLOWS & get_mark(ret));
 			return false;
@@ -1371,9 +1371,9 @@
 
 /** Finds the first non-deleted item equal to \a pred_arg according to \a pred.
- * 
+ *
  * The function returns the candidate item in \a wnd. Logically deleted
  * nodes are garbage collected so the predecessor will most likely not
- * be marked as deleted. 
- * 
+ * be marked as deleted.
+ *
  * Unlike find_wnd_and_gc(), this function never returns a node that
  * is known to have already been marked N_DELETED.
@@ -1382,5 +1382,5 @@
  * collected, ie free in the background via rcu_call (except for join-nodes
  * if walk_mode == WM_LEAVE_JOIN).
- * 
+ *
  * @param h         CHT to operate on.
  * @param hash      Hash the search for.
@@ -1392,8 +1392,8 @@
  * @param resizing  Set to true if the table is resizing but it was not
  *                  expected (ie walk_mode == WM_NORMAL).
- * @return False if the operation has to be retried. True otherwise 
+ * @return False if the operation has to be retried. True otherwise
  *        (even if an equal item had not been found).
  */
-static bool find_wnd_and_gc_pred(cht_t *h, size_t hash, walk_mode_t walk_mode, 
+static bool find_wnd_and_gc_pred(cht_t *h, size_t hash, walk_mode_t walk_mode,
 	equal_pred_t pred, void *pred_arg, wnd_t *wnd, bool *resizing)
 {
@@ -1403,6 +1403,6 @@
 		return true;
 	
-	/* 
-	 * A read barrier is not needed here to bring up the most recent 
+	/*
+	 * A read barrier is not needed here to bring up the most recent
 	 * node marks (esp the N_DELETED). At worst we'll try to delete
 	 * an already deleted node; fail in delete_at(); and retry.
@@ -1411,5 +1411,5 @@
 	size_t cur_hash;
 
-try_again:	
+try_again:
 	cur_hash = node_hash(h, wnd->cur);
 		
@@ -1445,25 +1445,25 @@
 
 /** Find the first item (deleted or not) with a hash greater or equal to \a hash.
- * 
- * The function returns the first item with a hash that is greater or 
+ *
+ * The function returns the first item with a hash that is greater or
  * equal to \a hash in \a wnd. Moreover it garbage collects logically
  * deleted node that have not yet been unlinked and freed. Therefore,
  * the returned node's predecessor will most likely be N_NORMAL.
- * 
+ *
  * Unlike find_wnd_and_gc_pred(), this function may return a node
  * that is known to had been marked N_DELETED.
- *  
+ *
  * @param h         CHT to operate on.
  * @param hash      Hash of the item to find.
  * @param walk_mode Bucket chain walk mode.
- * @param[in,out] wnd wnd.cur denotes the first node of the chain. If the 
- *                  the operation is successful, \a wnd points to the desired 
+ * @param[in,out] wnd wnd.cur denotes the first node of the chain. If the
+ *                  the operation is successful, \a wnd points to the desired
  *                  item.
  * @param resizing  Set to true if a table resize was detected but walk_mode
  *                  suggested the table was not undergoing a resize.
- * @return False indicates the operation must be retried. True otherwise 
+ * @return False indicates the operation must be retried. True otherwise
  *       (even if an item with exactly the same has was not found).
  */
-static bool find_wnd_and_gc(cht_t *h, size_t hash, walk_mode_t walk_mode, 
+static bool find_wnd_and_gc(cht_t *h, size_t hash, walk_mode_t walk_mode,
 	wnd_t *wnd, bool *resizing)
 {
@@ -1505,5 +1505,5 @@
 	} else {
 		/* Ordinary deleted node or a deleted JOIN_FOLLOWS. */
-		assert(walk_mode != WM_LEAVE_JOIN 
+		assert(walk_mode != WM_LEAVE_JOIN
 			|| !((N_JOIN | N_JOIN_FOLLOWS) & get_mark(wnd->cur->link)));
 
@@ -1525,8 +1525,8 @@
 
 /** Returns true if a bucket join had already completed.
- * 
- * May only be called if upd_resizing_head() indicates a bucket join 
+ *
+ * May only be called if upd_resizing_head() indicates a bucket join
  * may be in progress.
- * 
+ *
  * If it returns false, the search must be retried in order to guarantee
  * all item that should have been encountered have been seen.
@@ -1534,15 +1534,15 @@
 static bool join_completed(cht_t *h, const wnd_t *wnd)
 {
-	/* 
-	 * The table is shrinking and the searched for item is in a bucket 
-	 * appended to another. Check that the link joining these two buckets 
+	/*
+	 * The table is shrinking and the searched for item is in a bucket
+	 * appended to another. Check that the link joining these two buckets
 	 * is visible and if not, make it visible to this cpu.
 	 */
 	
-	/* 
-	 * Resizer ensures h->b->order stays the same for the duration of this 
+	/*
+	 * Resizer ensures h->b->order stays the same for the duration of this
 	 * func. We got here because there was an alternative head to search.
 	 * The resizer waits for all preexisting readers to finish after
-	 * it 
+	 * it
 	 */
 	assert(h->b->order > h->new_b->order);
@@ -1565,13 +1565,13 @@
 		size_t move_src_idx = grow_idx(shrink_idx(last_old_idx));
 		
-		/* 
-		 * Last node seen was in the joining bucket - if the searched 
-		 * for node is there we will find it. 
+		/*
+		 * Last node seen was in the joining bucket - if the searched
+		 * for node is there we will find it.
 		 */
-		if (move_src_idx != last_old_idx) 
+		if (move_src_idx != last_old_idx)
 			return true;
 	}
 	
-	/* 
+	/*
 	 * Reached the end of the bucket but no nodes from the joining bucket
 	 * were seen. There should have at least been a JOIN node so we have
@@ -1584,9 +1584,9 @@
 
 /** When resizing returns the bucket head to start the search with in \a phead.
- * 
+ *
  * If a resize had been detected (eg cht_t.b.head[idx] is marked immutable).
  * upd_resizing_head() moves the bucket for \a hash from the old head
  * to the new head. Moreover, it splits or joins buckets as necessary.
- * 
+ *
  * @param h     CHT to operate on.
  * @param hash  Hash of an item whose chain we would like to traverse.
@@ -1595,7 +1595,7 @@
  *              in progress and the bucket may have to traversed again
  *              as indicated by join_completed().
- * @param[out] walk_mode Specifies how to interpret node marks.  
- */
-static void upd_resizing_head(cht_t *h, size_t hash, marked_ptr_t **phead, 
+ * @param[out] walk_mode Specifies how to interpret node marks.
+ */
+static void upd_resizing_head(cht_t *h, size_t hash, marked_ptr_t **phead,
 	bool *join_finishing,  walk_mode_t *walk_mode)
 {
@@ -1621,6 +1621,6 @@
 		if (move_dest_idx == new_idx) {
 			assert(pmoved_head == pnew_head);
-			/* 
-			 * move_head() makes the new head of the moved bucket visible. 
+			/*
+			 * move_head() makes the new head of the moved bucket visible.
 			 * The new head may be marked with a JOIN_FOLLOWS
 			 */
@@ -1629,6 +1629,6 @@
 		} else {
 			assert(pmoved_head != pnew_head);
-			/* 
-			 * The hash belongs to the bucket that is the result of splitting 
+			/*
+			 * The hash belongs to the bucket that is the result of splitting
 			 * the old/moved bucket, ie the bucket that contains the second
 			 * half of the split/old/moved bucket.
@@ -1639,6 +1639,6 @@
 				size_t split_hash = calc_split_hash(new_idx, h->new_b->order);
 				split_bucket(h, pmoved_head, pnew_head, split_hash);
-				/* 
-				 * split_bucket() makes the new head visible. No 
+				/*
+				 * split_bucket() makes the new head visible. No
 				 * JOIN_FOLLOWS in this part of split bucket.
 				 */
@@ -1653,6 +1653,6 @@
 		size_t move_src_idx = grow_idx(new_idx);
 		
-		/* 
-		 * Complete moving the bucket from the old to the new table. 
+		/*
+		 * Complete moving the bucket from the old to the new table.
 		 * Makes a valid pnew_head visible if already moved.
 		 */
@@ -1667,5 +1667,5 @@
 			}
 			
-			/* 
+			/*
 			 * The resizer sets pold_head to &sentinel when all cpus are
 			 * guaranteed to see the bucket join.
@@ -1681,6 +1681,6 @@
 		*walk_mode = WM_LEAVE_JOIN;
 	} else {
-		/* 
-		 * Final stage of resize. The resizer is waiting for all 
+		/*
+		 * Final stage of resize. The resizer is waiting for all
 		 * readers to notice that the old table had been replaced.
 		 */
@@ -1700,13 +1700,13 @@
 #endif
 
-/** Moves an immutable head \a psrc_head of cht_t.b to \a pdest_head of cht_t.new_b. 
- * 
+/** Moves an immutable head \a psrc_head of cht_t.b to \a pdest_head of cht_t.new_b.
+ *
  * The function guarantees the move will be visible on this cpu once
  * it completes. In particular, *pdest_head will not be N_INVALID.
- * 
+ *
  * Unlike complete_head_move(), help_head_move() checks if the head had already
  * been moved and tries to avoid moving the bucket heads if possible.
  */
-static inline void help_head_move(marked_ptr_t *psrc_head, 
+static inline void help_head_move(marked_ptr_t *psrc_head,
 	marked_ptr_t *pdest_head)
 {
@@ -1729,6 +1729,6 @@
 
 /** Initiates the move of the old head \a psrc_head.
- * 
- * The move may be completed with help_head_move(). 
+ *
+ * The move may be completed with help_head_move().
  */
 static void start_head_move(marked_ptr_t *psrc_head)
@@ -1766,6 +1766,6 @@
 	cas_order_barrier();
 	
-	DBG(ret = ) 
-		cas_link(psrc_head, next, N_CONST, next, N_INVALID);	
+	DBG(ret = )
+		cas_link(psrc_head, next, N_CONST, next, N_INVALID);
 	assert(ret == make_link(next, N_CONST) || (N_INVALID == get_mark(ret)));
 	cas_order_barrier();
@@ -1773,17 +1773,17 @@
 
 /** Splits the bucket at psrc_head and links to the remainder from pdest_head.
- * 
+ *
  * Items with hashes greater or equal to \a split_hash are moved to bucket
- * with head at \a pdest_head. 
- * 
+ * with head at \a pdest_head.
+ *
  * @param h           CHT to operate on.
  * @param psrc_head   Head of the bucket to split (in cht_t.new_b).
  * @param pdest_head  Head of the bucket that points to the second part
  *                    of the split bucket in psrc_head. (in cht_t.new_b)
- * @param split_hash  Hash of the first possible item in the remainder of 
+ * @param split_hash  Hash of the first possible item in the remainder of
  *                    psrc_head, ie the smallest hash pdest_head is allowed
  *                    to point to..
  */
-static void split_bucket(cht_t *h, marked_ptr_t *psrc_head, 
+static void split_bucket(cht_t *h, marked_ptr_t *psrc_head,
 	marked_ptr_t *pdest_head, size_t split_hash)
 {
@@ -1794,9 +1794,9 @@
 	/*
 	 * L == Last node of the first part of the split bucket. That part
-	 *      remains in the original/src bucket. 
+	 *      remains in the original/src bucket.
 	 * F == First node of the second part of the split bucket. That part
 	 *      will be referenced from the dest bucket head.
 	 *
-	 * We want to first mark a clean L as JF so that updaters unaware of 
+	 * We want to first mark a clean L as JF so that updaters unaware of
 	 * the split (or table resize):
 	 * - do not insert a new node between L and F
@@ -1804,31 +1804,31 @@
 	 * - do not unlink F
 	 *
-	 * Then we can safely mark F as JN even if it has been marked deleted. 
-	 * Once F is marked as JN updaters aware of table resize will not 
+	 * Then we can safely mark F as JN even if it has been marked deleted.
+	 * Once F is marked as JN updaters aware of table resize will not
 	 * attempt to unlink it (JN will have two predecessors - we cannot
-	 * safely unlink from both at the same time). Updaters unaware of 
-	 * ongoing resize can reach F only via L and that node is already 
+	 * safely unlink from both at the same time). Updaters unaware of
+	 * ongoing resize can reach F only via L and that node is already
 	 * marked JF, so they won't unlink F.
-	 * 
+	 *
 	 * Last, link the new/dest head to F.
-	 * 
-	 * 
-	 * 0)                           ,-- split_hash, first hash of the dest bucket 
-	 *                              v  
+	 *
+	 *
+	 * 0)                           ,-- split_hash, first hash of the dest bucket
+	 *                              v
 	 *  [src_head | N] -> .. -> [L] -> [F]
 	 *  [dest_head | Inv]
-	 * 
+	 *
 	 * 1)                             ,-- split_hash
-	 *                                v  
+	 *                                v
 	 *  [src_head | N] -> .. -> [JF] -> [F]
 	 *  [dest_head | Inv]
-	 * 
+	 *
 	 * 2)                             ,-- split_hash
-	 *                                v  
+	 *                                v
 	 *  [src_head | N] -> .. -> [JF] -> [JN]
 	 *  [dest_head | Inv]
-	 * 
+	 *
 	 * 3)                             ,-- split_hash
-	 *                                v  
+	 *                                v
 	 *  [src_head | N] -> .. -> [JF] -> [JN]
 	 *                                   ^
@@ -1845,12 +1845,12 @@
 	/* There are nodes in the dest bucket, ie the second part of the split. */
 	if (wnd.cur != &sentinel) {
-		/* 
-		 * Mark the first node of the dest bucket as a join node so 
-		 * updaters do not attempt to unlink it if it is deleted. 
+		/*
+		 * Mark the first node of the dest bucket as a join node so
+		 * updaters do not attempt to unlink it if it is deleted.
 		 */
 		mark_join_node(wnd.cur);
 		cas_order_barrier();
 	} else {
-		/* 
+		/*
 		 * Second part of the split bucket is empty. There are no nodes
 		 * to mark as JOIN nodes and there never will be.
@@ -1868,14 +1868,14 @@
 
 /** Finds and marks the last node of psrc_head w/ hash less than split_hash.
- * 
- * Finds a node in psrc_head with the greatest hash that is strictly less 
- * than split_hash and marks it with N_JOIN_FOLLOWS. 
- * 
- * Returns a window pointing to that node. 
- * 
- * Any logically deleted nodes along the way are 
- * garbage collected; therefore, the predecessor node (if any) will most 
+ *
+ * Finds a node in psrc_head with the greatest hash that is strictly less
+ * than split_hash and marks it with N_JOIN_FOLLOWS.
+ *
+ * Returns a window pointing to that node.
+ *
+ * Any logically deleted nodes along the way are
+ * garbage collected; therefore, the predecessor node (if any) will most
  * likely not be marked N_DELETED.
- * 
+ *
  * @param h          CHT to operate on.
  * @param psrc_head  Bucket head.
@@ -1884,5 +1884,5 @@
  * @param[out] wnd   Points to the node marked with N_JOIN_FOLLOWS.
  */
-static void mark_join_follows(cht_t *h, marked_ptr_t *psrc_head, 
+static void mark_join_follows(cht_t *h, marked_ptr_t *psrc_head,
 	size_t split_hash, wnd_t *wnd)
 {
@@ -1896,8 +1896,8 @@
 		wnd->cur = get_next(*psrc_head);
 		
-		/* 
+		/*
 		 * Find the split window, ie the last node of the first part of
 		 * the split bucket and the its successor - the first node of
-		 * the second part of the split bucket. Retry if GC failed. 
+		 * the second part of the split bucket. Retry if GC failed.
 		 */
 		if (!find_wnd_and_gc(h, split_hash, WM_MOVE_JOIN_FOLLOWS, wnd, &resizing))
@@ -1906,6 +1906,6 @@
 		/* Must not report that the table is resizing if WM_MOVE_JOIN_FOLLOWS.*/
 		assert(!resizing);
-		/* 
-		 * Mark the last node of the first half of the split bucket 
+		/*
+		 * Mark the last node of the first half of the split bucket
 		 * that a join node follows. It must be clean/normal.
 		 */
@@ -1913,7 +1913,7 @@
 			= cas_link(wnd->ppred, wnd->cur, N_NORMAL, wnd->cur, N_JOIN_FOLLOWS);
 
-		/* 
-		 * Successfully marked as a JF node or already marked that way (even 
-		 * if also marked deleted - unlinking the node will move the JF mark). 
+		/*
+		 * Successfully marked as a JF node or already marked that way (even
+		 * if also marked deleted - unlinking the node will move the JF mark).
 		 */
 		done = (ret == make_link(wnd->cur, N_NORMAL))
@@ -1932,9 +1932,9 @@
 		mark_t mark = get_mark(join_node->link);
 		
-		/* 
-		 * May already be marked as deleted, but it won't be unlinked 
+		/*
+		 * May already be marked as deleted, but it won't be unlinked
 		 * because its predecessor is marked with JOIN_FOLLOWS or CONST.
 		 */
-		marked_ptr_t ret 
+		marked_ptr_t ret
 			= cas_link(&join_node->link, next, mark, next, mark | N_JOIN);
 		
@@ -1946,5 +1946,5 @@
 
 /** Appends the bucket at psrc_head to the bucket at pdest_head.
- * 
+ *
  * @param h          CHT to operate on.
  * @param psrc_head  Bucket to merge with pdest_head.
@@ -1952,5 +1952,5 @@
  * @param split_hash The smallest hash psrc_head may contain.
  */
-static void join_buckets(cht_t *h, marked_ptr_t *psrc_head, 
+static void join_buckets(cht_t *h, marked_ptr_t *psrc_head,
 	marked_ptr_t *pdest_head, size_t split_hash)
 {
@@ -1959,18 +1959,18 @@
 		return;
 	/*
-	 * F == First node of psrc_head, ie the bucket we want to append 
+	 * F == First node of psrc_head, ie the bucket we want to append
 	 *      to (ie join with) the bucket starting at pdest_head.
 	 * L == Last node of pdest_head, ie the bucket that psrc_head will
-	 *      be appended to. 
-	 *
-	 * (1) We first mark psrc_head immutable to signal that a join is 
-	 * in progress and so that updaters unaware of the join (or table 
+	 *      be appended to.
+	 *
+	 * (1) We first mark psrc_head immutable to signal that a join is
+	 * in progress and so that updaters unaware of the join (or table
 	 * resize):
 	 * - do not insert new nodes between the head psrc_head and F
 	 * - do not unlink F (it may already be marked deleted)
-	 * 
+	 *
 	 * (2) Next, F is marked as a join node. Updaters aware of table resize
-	 * will not attempt to unlink it. We cannot safely/atomically unlink 
-	 * the join node because it will be pointed to from two different 
+	 * will not attempt to unlink it. We cannot safely/atomically unlink
+	 * the join node because it will be pointed to from two different
 	 * buckets. Updaters unaware of resize will fail to unlink the join
 	 * node due to the head being marked immutable.
@@ -1978,48 +1978,48 @@
 	 * (3) Then the tail of the bucket at pdest_head is linked to the join
 	 * node. From now on, nodes in both buckets can be found via pdest_head.
-	 * 
+	 *
 	 * (4) Last, mark immutable psrc_head as invalid. It signals updaters
 	 * that the join is complete and they can insert new nodes (originally
-	 * destined for psrc_head) into pdest_head. 
-	 * 
+	 * destined for psrc_head) into pdest_head.
+	 *
 	 * Note that pdest_head keeps pointing at the join node. This allows
 	 * lookups and updaters to determine if they should see a link between
 	 * the tail L and F when searching for nodes originally in psrc_head
-	 * via pdest_head. If they reach the tail of pdest_head without 
+	 * via pdest_head. If they reach the tail of pdest_head without
 	 * encountering any nodes of psrc_head, either there were no nodes
 	 * in psrc_head to begin with or the link between L and F did not
 	 * yet propagate to their cpus. If psrc_head was empty, it remains
-	 * NULL. Otherwise psrc_head points to a join node (it will not be 
+	 * NULL. Otherwise psrc_head points to a join node (it will not be
 	 * unlinked until table resize completes) and updaters/lookups
 	 * should issue a read_barrier() to make the link [L]->[JN] visible.
-	 * 
-	 * 0)                           ,-- split_hash, first hash of the src bucket 
-	 *                              v  
+	 *
+	 * 0)                           ,-- split_hash, first hash of the src bucket
+	 *                              v
 	 *  [dest_head | N]-> .. -> [L]
-	 *  [src_head | N]--> [F] -> .. 
+	 *  [src_head | N]--> [F] -> ..
 	 *  ^
 	 *  ` split_hash, first hash of the src bucket
-	 * 
+	 *
 	 * 1)                            ,-- split_hash
-	 *                               v  
+	 *                               v
 	 *  [dest_head | N]-> .. -> [L]
-	 *  [src_head | C]--> [F] -> .. 
-	 * 
+	 *  [src_head | C]--> [F] -> ..
+	 *
 	 * 2)                            ,-- split_hash
-	 *                               v  
+	 *                               v
 	 *  [dest_head | N]-> .. -> [L]
-	 *  [src_head | C]--> [JN] -> .. 
-	 * 
+	 *  [src_head | C]--> [JN] -> ..
+	 *
 	 * 3)                            ,-- split_hash
-	 *                               v  
+	 *                               v
 	 *  [dest_head | N]-> .. -> [L] --+
 	 *                                v
-	 *  [src_head | C]-------------> [JN] -> .. 
-	 * 
+	 *  [src_head | C]-------------> [JN] -> ..
+	 *
 	 * 4)                            ,-- split_hash
-	 *                               v  
+	 *                               v
 	 *  [dest_head | N]-> .. -> [L] --+
 	 *                                v
-	 *  [src_head | Inv]-----------> [JN] -> .. 
+	 *  [src_head | Inv]-----------> [JN] -> ..
 	 */
 	
@@ -2038,5 +2038,5 @@
 		link_to_join_node(h, pdest_head, join_node, split_hash);
 		cas_order_barrier();
-	} 
+	}
 	
 	DBG(marked_ptr_t ret = )
@@ -2049,5 +2049,5 @@
 
 /** Links the tail of pdest_head to join_node.
- * 
+ *
  * @param h          CHT to operate on.
  * @param pdest_head Head of the bucket whose tail is to be linked to join_node.
@@ -2057,5 +2057,5 @@
  *                   (originally) in pdest_head.
  */
-static void link_to_join_node(cht_t *h, marked_ptr_t *pdest_head, 
+static void link_to_join_node(cht_t *h, marked_ptr_t *pdest_head,
 	cht_link_t *join_node, size_t split_hash)
 {
@@ -2077,5 +2077,5 @@
 		if (wnd.cur != &sentinel) {
 			/* Must be from the new appended bucket. */
-			assert(split_hash <= node_hash(h, wnd.cur) 
+			assert(split_hash <= node_hash(h, wnd.cur)
 				|| h->invalid_hash == node_hash(h, wnd.cur));
 			return;
@@ -2083,5 +2083,5 @@
 		
 		/* Reached the tail of pdest_head - link it to the join node. */
-		marked_ptr_t ret = 
+		marked_ptr_t ret =
 			cas_link(wnd.ppred, &sentinel, N_NORMAL, join_node, N_NORMAL);
 		
@@ -2090,6 +2090,6 @@
 }
 
-/** Instructs RCU to free the item once all preexisting references are dropped. 
- * 
+/** Instructs RCU to free the item once all preexisting references are dropped.
+ *
  * The item is freed via op->remove_callback().
  */
@@ -2098,5 +2098,5 @@
 	assert(item != &sentinel);
 	
-	/* 
+	/*
 	 * remove_callback only works as rcu_func_t because rcu_link is the first
 	 * field in cht_link_t.
@@ -2108,6 +2108,6 @@
 
 /** Notes that an item had been unlinked from the table and shrinks it if needed.
- * 
- * If the number of items in the table drops below 1/4 of the maximum 
+ *
+ * If the number of items in the table drops below 1/4 of the maximum
  * allowed load the table is shrunk in the background.
  */
@@ -2129,6 +2129,6 @@
 }
 
-/** Notes an item had been inserted and grows the table if needed. 
- * 
+/** Notes an item had been inserted and grows the table if needed.
+ *
  * The table is resized in the background.
  */
@@ -2192,5 +2192,5 @@
 
 	/* Failed to alloc a new table - try next time the resizer is run. */
-	if (!h->new_b) 
+	if (!h->new_b)
 		return;
 
@@ -2199,6 +2199,6 @@
 	size_t old_bucket_cnt = (1 << h->b->order);
 	
-	/* 
-	 * Give updaters a chance to help out with the resize. Do the minimum 
+	/*
+	 * Give updaters a chance to help out with the resize. Do the minimum
 	 * work needed to announce a resize is in progress, ie start moving heads.
 	 */
@@ -2227,8 +2227,8 @@
 	}
 	
-	/* 
+	/*
 	 * Wait for all updaters to notice the new heads. Once everyone sees
 	 * the invalid old bucket heads they will know a resize is in progress
-	 * and updaters will modify the correct new buckets. 
+	 * and updaters will modify the correct new buckets.
 	 */
 	rcu_synchronize();
@@ -2241,7 +2241,7 @@
 	}
 
-	/* 
+	/*
 	 * Wait for everyone to notice that buckets were split, ie link connecting
-	 * the join follows and join node has been cut. 
+	 * the join follows and join node has been cut.
 	 */
 	rcu_synchronize();
@@ -2278,5 +2278,5 @@
 
 	/* Failed to alloc a new table - try next time the resizer is run. */
-	if (!h->new_b) 
+	if (!h->new_b)
 		return;
 
@@ -2286,6 +2286,6 @@
 	size_t old_bucket_cnt = (1 << h->b->order);
 	
-	/* 
-	 * Give updaters a chance to help out with the resize. Do the minimum 
+	/*
+	 * Give updaters a chance to help out with the resize. Do the minimum
 	 * work needed to announce a resize is in progress, ie start moving heads.
 	 */
@@ -2318,13 +2318,13 @@
 			/* This bucket should join the moved bucket. */
 			size_t split_hash = calc_split_hash(old_idx, h->b->order);
-			join_buckets(h, &h->b->head[old_idx], &h->new_b->head[new_idx], 
+			join_buckets(h, &h->b->head[old_idx], &h->new_b->head[new_idx],
 				split_hash);
 		}
 	}
 	
-	/* 
+	/*
 	 * Wait for all updaters to notice the new heads. Once everyone sees
 	 * the invalid old bucket heads they will know a resize is in progress
-	 * and updaters will modify the correct new buckets. 
+	 * and updaters will modify the correct new buckets.
 	 */
 	rcu_synchronize();
@@ -2389,5 +2389,5 @@
 
 /** Clears the join_node's N_JOIN mark frees it if marked N_DELETED as well. */
-static void clear_join_and_gc(cht_t *h, cht_link_t *join_node, 
+static void clear_join_and_gc(cht_t *h, cht_link_t *join_node,
 	marked_ptr_t *new_head)
 {
@@ -2404,5 +2404,5 @@
 		mark_t cleared_mark = get_mark(jn_link) & N_DELETED;
 
-		marked_ptr_t ret = 
+		marked_ptr_t ret =
 			_cas_link(&join_node->link, jn_link, make_link(next, cleared_mark));
 
@@ -2429,5 +2429,5 @@
 		};
 		
-		done = find_wnd_and_gc_pred(h, jn_hash, WM_NORMAL, same_node_pred, 
+		done = find_wnd_and_gc_pred(h, jn_hash, WM_NORMAL, same_node_pred,
 			join_node, &wnd, &resizing);
 		
@@ -2452,9 +2452,9 @@
 	 * Find the non-deleted node with a JF mark and clear the JF mark.
 	 * The JF node may be deleted and/or the mark moved to its neighbors
-	 * at any time. Therefore, we GC deleted nodes until we find the JF 
-	 * node in order to remove stale/deleted JF nodes left behind eg by 
-	 * delayed threads that did not yet get a chance to unlink the deleted 
-	 * JF node and move its mark. 
-	 * 
+	 * at any time. Therefore, we GC deleted nodes until we find the JF
+	 * node in order to remove stale/deleted JF nodes left behind eg by
+	 * delayed threads that did not yet get a chance to unlink the deleted
+	 * JF node and move its mark.
+	 *
 	 * Note that the head may be marked JF (but never DELETED).
 	 */
@@ -2481,8 +2481,8 @@
 			if (is_jf_node) {
 				cht_link_t *next = get_next(*cur_link);
-				marked_ptr_t ret = 
+				marked_ptr_t ret =
 					cas_link(cur_link, next, N_JOIN_FOLLOWS, &sentinel, N_NORMAL);
 				
-				assert(next == &sentinel 
+				assert(next == &sentinel
 					|| ((N_JOIN | N_JOIN_FOLLOWS) & get_mark(ret)));
 
@@ -2491,6 +2491,6 @@
 					break;
 				} else {
-					/* 
-					 * The JF node had been deleted or a new node inserted 
+					/*
+					 * The JF node had been deleted or a new node inserted
 					 * right after it. Retry from the head.
 					 */
@@ -2500,5 +2500,5 @@
 			} else {
 				wnd.ppred = cur_link;
-				wnd.cur = get_next(*cur_link);				
+				wnd.cur = get_next(*cur_link);
 			}
 		}
@@ -2512,6 +2512,6 @@
 }
 
-/** Returns the first possible hash following a bucket split point. 
- * 
+/** Returns the first possible hash following a bucket split point.
+ *
  * In other words the returned hash is the smallest possible hash
  * the remainder of the split bucket may contain.
@@ -2558,5 +2558,5 @@
 static inline size_t node_hash(cht_t *h, const cht_link_t *item)
 {
-	assert(item->hash == h->invalid_hash 
+	assert(item->hash == h->invalid_hash
 		|| item->hash == sentinel.hash
 		|| item->hash == calc_node_hash(h, item));
@@ -2569,5 +2569,5 @@
 {
 	assert(item != &sentinel);
-	/* 
+	/*
 	 * Clear the lowest order bit in order for sentinel's node hash
 	 * to be the greatest possible.
@@ -2624,13 +2624,13 @@
 
 /** Compare-and-swaps a next item link. */
-static inline marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next, 
+static inline marked_ptr_t cas_link(marked_ptr_t *link, const cht_link_t *cur_next,
 	mark_t cur_mark, const cht_link_t *new_next, mark_t new_mark)
 {
-	return _cas_link(link, make_link(cur_next, cur_mark), 
+	return _cas_link(link, make_link(cur_next, cur_mark),
 		make_link(new_next, new_mark));
 }
 
 /** Compare-and-swaps a next item link. */
-static inline marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur, 
+static inline marked_ptr_t _cas_link(marked_ptr_t *link, marked_ptr_t cur,
 	marked_ptr_t new)
 {
@@ -2640,11 +2640,11 @@
 	 * have to be ordered wrt to other cas(y) to a different location y
 	 * on the same cpu.
-	 * 
-	 * cas(x) must act as a write barrier on x, ie if cas(x) succeeds 
-	 * and is observed by another cpu, then all cpus must be able to 
+	 *
+	 * cas(x) must act as a write barrier on x, ie if cas(x) succeeds
+	 * and is observed by another cpu, then all cpus must be able to
 	 * make the effects of cas(x) visible just by issuing a load barrier.
 	 * For example:
 	 * cpu1         cpu2            cpu3
-	 *                              cas(x, 0 -> 1), succeeds 
+	 *                              cas(x, 0 -> 1), succeeds
 	 *              cas(x, 0 -> 1), fails
 	 *              MB, to order load of x in cas and store to y
@@ -2652,19 +2652,19 @@
 	 * sees y == 7
 	 * loadMB must be enough to make cas(x) on cpu3 visible to cpu1, ie x == 1.
-	 * 
+	 *
 	 * If cas() did not work this way:
 	 * a) our head move protocol would not be correct.
 	 * b) freeing an item linked to a moved head after another item was
 	 *   inserted in front of it, would require more than one grace period.
-	 * 
+	 *
 	 * Ad (a): In the following example, cpu1 starts moving old_head
 	 * to new_head, cpu2 completes the move and cpu3 notices cpu2
 	 * completed the move before cpu1 gets a chance to notice cpu2
-	 * had already completed the move. Our requirements for cas() 
-	 * assume cpu3 will see a valid and mutable value in new_head 
-	 * after issuing a load memory barrier once it has determined 
-	 * the old_head's value had been successfully moved to new_head 
+	 * had already completed the move. Our requirements for cas()
+	 * assume cpu3 will see a valid and mutable value in new_head
+	 * after issuing a load memory barrier once it has determined
+	 * the old_head's value had been successfully moved to new_head
 	 * (because it sees old_head marked invalid).
-	 * 
+	 *
 	 *  cpu1             cpu2             cpu3
 	 *   cas(old_head, <addr, N>, <addr, Const>), succeeds
@@ -2672,24 +2672,24 @@
 	 *   // Move from old_head to new_head started, now the interesting stuff:
 	 *   cas(new_head, <0, Inv>, <addr, N>), succeeds
-	 * 
+	 *
 	 *                    cas(new_head, <0, Inv>, <addr, N>), but fails
 	 *                    cas-order-barrier
 	 *                    cas(old_head, <addr, Const>, <addr, Inv>), succeeds
-	 *                                     
+	 *
 	 *                                     Sees old_head marked Inv (by cpu2)
 	 *                                     load-MB
 	 *                                     assert(new_head == <addr, N>)
-	 *   
+	 *
 	 *   cas-order-barrier
-	 *  
+	 *
 	 * Even though cpu1 did not yet issue a cas-order-barrier, cpu1's store
 	 * to new_head (successful cas()) must be made visible to cpu3 with
 	 * a load memory barrier if cpu1's store to new_head is visible
 	 * on another cpu (cpu2) and that cpu's (cpu2's) store to old_head
-	 * is already visible to cpu3.	 * 
+	 * is already visible to cpu3.	 *
 	 */
 	void *expected = (void*)cur;
 	
-	/* 
+	/*
 	 * Use the acquire-release model, although we could probably
 	 * get away even with the relaxed memory model due to our use
Index: kernel/generic/src/adt/hash_table.c
===================================================================
--- kernel/generic/src/adt/hash_table.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/adt/hash_table.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -2,5 +2,5 @@
  * Copyright (c) 2008 Jakub Jermar
  * Copyright (c) 2012 Adam Hraska
- * 
+ *
  * All rights reserved.
  *
@@ -37,11 +37,11 @@
 /*
  * This is an implementation of a generic resizable chained hash table.
- * 
- * The table grows to 2*n+1 buckets each time, starting at n == 89, 
+ *
+ * The table grows to 2*n+1 buckets each time, starting at n == 89,
  * per Thomas Wang's recommendation:
  * http://www.concentric.net/~Ttwang/tech/hashsize.htm
- * 
+ *
  * This policy produces prime table sizes for the first five resizes
- * and generally produces table sizes which are either prime or 
+ * and generally produces table sizes which are either prime or
  * have fairly large (prime/odd) divisors. Having a prime table size
  * mitigates the use of suboptimal hash functions and distributes
@@ -79,5 +79,5 @@
  * @param h        Hash table structure. Will be initialized by this call.
  * @param init_size Initial desired number of hash table buckets. Pass zero
- *                 if you want the default initial size. 
+ *                 if you want the default initial size.
  * @param max_load The table is resized when the average load per bucket
  *                 exceeds this number. Pass zero if you want the default.
@@ -86,5 +86,5 @@
  *                 upon removal. equal() is optional if and only if
  *                 hash_table_insert_unique() will never be invoked.
- *                 All other operations are mandatory. 
+ *                 All other operations are mandatory.
  *
  * @return True on success
@@ -210,6 +210,6 @@
  * @param h    Hash table.
  * @param item Item to be inserted into the hash table.
- * 
- * @return False if such an item had already been inserted. 
+ *
+ * @return False if such an item had already been inserted.
  * @return True if the inserted item was the only item with such a lookup key.
  */
@@ -225,6 +225,6 @@
 	/* Check for duplicates. */
 	list_foreach(h->bucket[idx], link, ht_link_t, cur_link) {
-		/* 
-		 * We could filter out items using their hashes first, but 
+		/*
+		 * We could filter out items using their hashes first, but
 		 * calling equal() might very well be just as fast.
 		 */
@@ -255,7 +255,7 @@
 
 	list_foreach(h->bucket[idx], link, ht_link_t, cur_link) {
-		/* 
-		 * Is this is the item we are looking for? We could have first 
-		 * checked if the hashes match but op->key_equal() may very well be 
+		/*
+		 * Is this is the item we are looking for? We could have first
+		 * checked if the hashes match but op->key_equal() may very well be
 		 * just as fast as op->hash().
 		 */
@@ -278,7 +278,7 @@
 		assert(cur);
 		ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link);
-		/* 
-		 * Is this is the item we are looking for? We could have first 
-		 * checked if the hashes match but op->equal() may very well be 
+		/*
+		 * Is this is the item we are looking for? We could have first
+		 * checked if the hashes match but op->equal() may very well be
 		 * just as fast as op->hash().
 		 */
@@ -298,5 +298,5 @@
  * @param key  Array of keys that will be compared against items of
  *             the hash table.
- * 
+ *
  * @return Returns the number of removed items.
  */
@@ -342,12 +342,12 @@
  *
  * @param h   Hash table.
- * @param f   Function to be applied. Return false if no more items 
+ * @param f   Function to be applied. Return false if no more items
  *            should be visited. The functor may only delete the supplied
- *            item. It must not delete the successor of the item passed 
+ *            item. It must not delete the successor of the item passed
  *            in the first argument.
  * @param arg Argument to be passed to the function.
  */
 void hash_table_apply(hash_table_t *h, bool (*f)(ht_link_t *, void *), void *arg)
-{	
+{
 	assert(f);
 	assert(h && h->bucket);
@@ -361,6 +361,6 @@
 		list_foreach_safe(h->bucket[idx], cur, next) {
 			ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link);
-			/* 
-			 * The next pointer had already been saved. f() may safely 
+			/*
+			 * The next pointer had already been saved. f() may safely
 			 * delete cur (but not next!).
 			 */
@@ -409,6 +409,6 @@
 {
 	if (h->item_cnt <= h->full_item_cnt / 4 && HT_MIN_BUCKETS < h->bucket_cnt) {
-		/* 
-		 * Keep the bucket_cnt odd (possibly also prime). 
+		/*
+		 * Keep the bucket_cnt odd (possibly also prime).
 		 * Shrink from 2n + 1 to n. Integer division discards the +1.
 		 */
@@ -430,5 +430,5 @@
 
 /** Allocates and rehashes items to a new table. Frees the old table. */
-static void resize(hash_table_t *h, size_t new_bucket_cnt) 
+static void resize(hash_table_t *h, size_t new_bucket_cnt)
 {
 	assert(h && h->bucket);
Index: kernel/generic/src/adt/list.c
===================================================================
--- kernel/generic/src/adt/list.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/adt/list.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -78,5 +78,5 @@
 void list_splice(list_t *list, link_t *pos)
 {
-	if (list_empty(list)) 
+	if (list_empty(list))
 		return;
 	
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/console/cmd.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -277,5 +277,5 @@
 		.len = sizeof(set_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_INT
 	}
@@ -334,5 +334,5 @@
 		.len = sizeof(call0_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_VAR,
 		.buffer = carg1_buf,
@@ -357,10 +357,10 @@
 		.len = sizeof(call0_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_VAR,
 		.buffer = carg1_buf,
 		.len = sizeof(carg1_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_VAR,
 		.buffer = carg2_buf,
@@ -385,15 +385,15 @@
 		.len = sizeof(call0_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_VAR,
 		.buffer = carg1_buf,
 		.len = sizeof(carg1_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_VAR,
 		.buffer = carg2_buf,
 		.len = sizeof(carg2_buf)
 	},
-	{ 
+	{
 		.type = ARG_TYPE_VAR,
 		.buffer = carg3_buf,
@@ -952,5 +952,5 @@
 	}
 	
-	spinlock_unlock(&cmd_lock);	
+	spinlock_unlock(&cmd_lock);
 	
 	return 1;
@@ -1087,5 +1087,5 @@
 		    arch_construct_function(&fptr, (void *) symaddr,
 		    (void *) cmd_call2);
-		printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n", 
+		printf("Calling f(%#" PRIxn ", %#" PRIxn "): %p: %s\n",
 		       arg1, arg2, (void *) symaddr, symbol);
 		printf("Result: %#" PRIxn "\n", fnc(arg1, arg2));
Index: kernel/generic/src/cpu/cpu_mask.c
===================================================================
--- kernel/generic/src/cpu/cpu_mask.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/cpu/cpu_mask.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -56,5 +56,5 @@
 	assert(cpu_cnt <= config.cpu_count);
 	
-	for (size_t active_word = 0; 
+	for (size_t active_word = 0;
 		(active_word + 1) * word_bit_cnt <= cpu_cnt;
 		++active_word) {
@@ -70,6 +70,6 @@
 }
 
-/** Sets bits corresponding to the active cpus, ie the first 
- * config.cpu_active cpus. 
+/** Sets bits corresponding to the active cpus, ie the first
+ * config.cpu_active cpus.
  */
 void cpu_mask_active(cpu_mask_t *cpus)
Index: kernel/generic/src/ipc/ipc.c
===================================================================
--- kernel/generic/src/ipc/ipc.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ipc.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -69,5 +69,5 @@
 static slab_cache_t *answerbox_cache;
 
-slab_cache_t *phone_cache = NULL; 
+slab_cache_t *phone_cache = NULL;
 
 /** Initialize a call structure.
@@ -725,5 +725,5 @@
 		 */
 		spinlock_unlock(&TASK->active_calls_lock);
-		return;	
+		return;
 	}
 	
Index: kernel/generic/src/ipc/ops/dataread.c
===================================================================
--- kernel/generic/src/ipc/ops/dataread.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/dataread.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/ops/datawrite.c
===================================================================
--- kernel/generic/src/ipc/ops/datawrite.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/datawrite.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/ops/debug.c
===================================================================
--- kernel/generic/src/ipc/ops/debug.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/debug.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2008 Jiri Svoboda 
+ * Copyright (c) 2008 Jiri Svoboda
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/ops/pagein.c
===================================================================
--- kernel/generic/src/ipc/ops/pagein.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/pagein.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2016 Jakub Jermar 
+ * Copyright (c) 2016 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/ops/sharein.c
===================================================================
--- kernel/generic/src/ipc/ops/sharein.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/sharein.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/ops/shareout.c
===================================================================
--- kernel/generic/src/ipc/ops/shareout.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/shareout.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/ops/stchngath.c
===================================================================
--- kernel/generic/src/ipc/ops/stchngath.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/ops/stchngath.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/ipc/sysipc.c
===================================================================
--- kernel/generic/src/ipc/sysipc.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/sysipc.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -186,5 +186,5 @@
 		 * concurrently executing forget operation is forced to
 		 * release its active_calls_lock and lose the race to
-		 * forget this soon to be answered call. 
+		 * forget this soon to be answered call.
 		 */
 		spinlock_lock(&answer->sender->active_calls_lock);
@@ -695,5 +695,5 @@
 		saved = false;
 	
-	errno_t rc = copy_from_uspace(&call->data.args, &data->args, 
+	errno_t rc = copy_from_uspace(&call->data.args, &data->args,
 	    sizeof(call->data.args));
 	if (rc != EOK) {
Index: kernel/generic/src/ipc/sysipc_ops.c
===================================================================
--- kernel/generic/src/ipc/sysipc_ops.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/ipc/sysipc_ops.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jakub Jermar 
+ * Copyright (c) 2012 Jakub Jermar
  * All rights reserved.
  *
Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/lib/str.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -491,5 +491,5 @@
 
 		if (c1 == 0 || c2 == 0)
-			break;		
+			break;
 	}
 
@@ -545,5 +545,5 @@
 			break;
 
-		++len;	
+		++len;
 	}
 
Index: kernel/generic/src/log/log.c
===================================================================
--- kernel/generic/src/log/log.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/log/log.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -92,5 +92,5 @@
  */
 void log_init(void)
-{	
+{
 	event_set_unmask_callback(EVENT_KLOG, log_update);
 	atomic_set(&log_inited, true);
@@ -112,5 +112,5 @@
 
 /** Append data to the currently open log entry.
- * 
+ *
  * This function requires that the log_lock is acquired by the caller.
  */
@@ -143,5 +143,5 @@
 
 /** Begin writing an entry to the log.
- * 
+ *
  * This acquires the log and output buffer locks, so only calls to log_* functions should
  * be used until calling log_end.
@@ -167,5 +167,5 @@
 
 /** Finish writing an entry to the log.
- * 
+ *
  * This releases the log and output buffer locks.
  */
@@ -233,5 +233,5 @@
 
 /** Append a message to the currently being written entry.
- * 
+ *
  * Requires that an entry has been started using log_begin()
  */
@@ -253,5 +253,5 @@
 
 /** Append a message to the currently being written entry.
- * 
+ *
  * Requires that an entry has been started using log_begin()
  */
@@ -269,5 +269,5 @@
 
 /** Log a message to the kernel log.
- * 
+ *
  * This atomically appends a log entry.
  * The resulting message should not contain a trailing newline, as the log
@@ -339,5 +339,5 @@
 				
 				if (entry_len > PAGE_SIZE) {
-					/* 
+					/*
 					 * Since we limit data transfer
 					 * to uspace to a maximum of PAGE_SIZE
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/as.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -344,5 +344,5 @@
 			 * page.
 			 */
-			int const gp = (guarded || 
+			int const gp = (guarded ||
 			    (area->flags & AS_AREA_GUARD)) ? 1 : 0;
 			
Index: kernel/generic/src/mm/backend_elf.c
===================================================================
--- kernel/generic/src/mm/backend_elf.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/backend_elf.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -349,5 +349,5 @@
 
 			frame = PTE_GET_FRAME(&pte);
-		}	
+		}
 	} else if (upage >= start_anon) {
 		/*
@@ -385,5 +385,5 @@
 		    PAGE_SIZE - pad_lo - pad_hi);
 		if (entry->p_flags & PF_X) {
-			smc_coherence_block((void *) (kpage + pad_lo), 
+			smc_coherence_block((void *) (kpage + pad_lo),
 			    PAGE_SIZE - pad_lo - pad_hi);
 		}
Index: kernel/generic/src/mm/backend_phys.c
===================================================================
--- kernel/generic/src/mm/backend_phys.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/backend_phys.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -61,5 +61,5 @@
 typedef struct {
 	uintptr_t base;
-	size_t frames;	
+	size_t frames;
 } phys_shared_data_t;
 
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/frame.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -288,5 +288,5 @@
 NO_TRACE static size_t find_free_zone_lowprio(size_t count, zone_flags_t flags,
     pfn_t constraint, size_t hint)
-{	
+{
 	for (size_t pos = 0; pos < zones.count; pos++) {
 		size_t i = (pos + hint) % zones.count;
Index: kernel/generic/src/mm/km.c
===================================================================
--- kernel/generic/src/mm/km.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/km.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -53,5 +53,5 @@
 static ra_arena_t *km_ni_arena;
 
-#define DEFERRED_PAGES_MAX	(PAGE_SIZE / sizeof(uintptr_t)) 
+#define DEFERRED_PAGES_MAX	(PAGE_SIZE / sizeof(uintptr_t))
 
 /** Number of freed pages in the deferred buffer. */
@@ -188,7 +188,7 @@
 {
 	uintptr_t page;
-	size_t offs; 
-
-	offs = paddr - ALIGN_DOWN(paddr, FRAME_SIZE); 
+	size_t offs;
+
+	offs = paddr - ALIGN_DOWN(paddr, FRAME_SIZE);
 	page = km_map_aligned(ALIGN_DOWN(paddr, FRAME_SIZE),
 	    ALIGN_UP(size + offs, FRAME_SIZE), flags);
@@ -205,7 +205,7 @@
 void km_unmap(uintptr_t vaddr, size_t size)
 {
-	size_t offs; 
-
-	offs = vaddr - ALIGN_DOWN(vaddr, PAGE_SIZE); 
+	size_t offs;
+
+	offs = vaddr - ALIGN_DOWN(vaddr, PAGE_SIZE);
 	km_unmap_aligned(ALIGN_DOWN(vaddr, PAGE_SIZE),
 	    ALIGN_UP(size + offs, PAGE_SIZE));
@@ -258,5 +258,5 @@
 		page = km_map(frame, PAGE_SIZE,
 		    PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE);
-		if (!page) {	
+		if (!page) {
 			frame_free(frame, 1);
 			goto lowmem;
Index: kernel/generic/src/mm/page.c
===================================================================
--- kernel/generic/src/mm/page.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/page.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -178,5 +178,5 @@
 
 /** Make the mapping shared by all page tables (not address spaces).
- * 
+ *
  * @param base Starting virtual address of the range that is made global.
  * @param size Size of the address range that is made global.
Index: kernel/generic/src/mm/slab.c
===================================================================
--- kernel/generic/src/mm/slab.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/mm/slab.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -39,5 +39,5 @@
  *
  * with the following exceptions:
- * @li empty slabs are deallocated immediately 
+ * @li empty slabs are deallocated immediately
  *     (in Linux they are kept in linked list, in Solaris ???)
  * @li empty magazines are deallocated when not needed
@@ -52,11 +52,11 @@
  * good SMP scaling.
  *
- * When a new object is being allocated, it is first checked, if it is 
+ * When a new object is being allocated, it is first checked, if it is
  * available in a CPU-bound magazine. If it is not found there, it is
  * allocated from a CPU-shared slab - if a partially full one is found,
- * it is used, otherwise a new one is allocated. 
+ * it is used, otherwise a new one is allocated.
  *
  * When an object is being deallocated, it is put to a CPU-bound magazine.
- * If there is no such magazine, a new one is allocated (if this fails, 
+ * If there is no such magazine, a new one is allocated (if this fails,
  * the object is deallocated into slab). If the magazine is full, it is
  * put into cpu-shared list of magazines and a new one is allocated.
@@ -79,5 +79,5 @@
  * the frame allocator fails to allocate a frame, it calls slab_reclaim().
  * It tries 'light reclaim' first, then brutal reclaim. The light reclaim
- * releases slabs from cpu-shared magazine-list, until at least 1 slab 
+ * releases slabs from cpu-shared magazine-list, until at least 1 slab
  * is deallocated in each cache (this algorithm should probably change).
  * The brutal reclaim removes all cached objects, even from CPU-bound
@@ -90,5 +90,5 @@
  * to add cpu-cached magazine cache (which would allocate it's magazines
  * from non-cpu-cached mag. cache). This would provide a nice per-cpu
- * buffer. The other possibility is to use the per-cache 
+ * buffer. The other possibility is to use the per-cache
  * 'empty-magazine-list', which decreases competing for 1 per-system
  * magazine cache.
@@ -660,5 +660,5 @@
 }
 
-/** Create slab cache 
+/** Create slab cache
  *
  */
Index: kernel/generic/src/proc/program.c
===================================================================
--- kernel/generic/src/proc/program.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/proc/program.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -244,5 +244,5 @@
 		return rc;
 	
-	// FIXME: control the permissions 
+	// FIXME: control the permissions
 	perm_set(prg.task, perm_get(TASK));
 	program_ready(&prg);
Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/proc/thread.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -546,14 +546,14 @@
 
 /** Interrupts an existing thread so that it may exit as soon as possible.
- * 
- * Threads that are blocked waiting for a synchronization primitive 
+ *
+ * Threads that are blocked waiting for a synchronization primitive
  * are woken up with a return code of EINTR if the
  * blocking call was interruptable. See waitq_sleep_timeout().
- * 
+ *
  * The caller must guarantee the thread object is valid during the entire
  * function, eg by holding the threads_lock lock.
- * 
+ *
  * Interrupted threads automatically exit when returning back to user space.
- * 
+ *
  * @param thread A valid thread object. The caller must guarantee it
  *               will remain valid until thread_interrupt() exits.
@@ -575,5 +575,5 @@
 
 /** Returns true if the thread was interrupted.
- * 
+ *
  * @param thread A valid thread object. User must guarantee it will
  *               be alive during the entire call.
@@ -693,5 +693,5 @@
  * @param usec Number of microseconds to sleep.
  *
- */	
+ */
 void thread_usleep(uint32_t usec)
 {
Index: kernel/generic/src/smp/smp.c
===================================================================
--- kernel/generic/src/smp/smp.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/smp/smp.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
Index: kernel/generic/src/smp/smp_call.c
===================================================================
--- kernel/generic/src/smp/smp_call.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/smp/smp_call.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -61,20 +61,20 @@
 
 /** Invokes a function on a specific cpu and waits for it to complete.
- * 
- * Calls @a func on the CPU denoted by its logical id @cpu_id . 
- * The function will execute with interrupts disabled. It should 
- * be a quick and simple function and must never block. 
- * 
+ *
+ * Calls @a func on the CPU denoted by its logical id @cpu_id .
+ * The function will execute with interrupts disabled. It should
+ * be a quick and simple function and must never block.
+ *
  * If @a cpu_id is the local CPU, the function will be invoked
  * directly.
- * 
+ *
  * All memory accesses of prior to smp_call() will be visible
  * to @a func on cpu @a cpu_id. Similarly, any changes @a func
  * makes on cpu @a cpu_id will be visible on this cpu once
  * smp_call() returns.
- * 
+ *
  * Invoking @a func on the destination cpu acts as a memory barrier
  * on that cpu.
- * 
+ *
  * @param cpu_id Destination CPU's logical id (eg CPU->id)
  * @param func Function to call.
@@ -89,30 +89,30 @@
 
 /** Invokes a function on a specific cpu asynchronously.
- * 
- * Calls @a func on the CPU denoted by its logical id @cpu_id . 
- * The function will execute with interrupts disabled. It should 
- * be a quick and simple function and must never block. 
- * 
- * Pass @a call_info to smp_call_wait() in order to wait for 
+ *
+ * Calls @a func on the CPU denoted by its logical id @cpu_id .
+ * The function will execute with interrupts disabled. It should
+ * be a quick and simple function and must never block.
+ *
+ * Pass @a call_info to smp_call_wait() in order to wait for
  * @a func to complete.
- * 
+ *
  * @a call_info must be valid until/after @a func returns. Use
  * smp_call_wait() to wait until it is safe to free @a call_info.
- * 
+ *
  * If @a cpu_id is the local CPU, the function will be invoked
  * directly. If the destination cpu id @a cpu_id is invalid
  * or denotes an inactive cpu, the call is discarded immediately.
- * 
+ *
  * All memory accesses of the caller prior to smp_call_async()
- * will be made visible to @a func on the other cpu. Similarly, 
+ * will be made visible to @a func on the other cpu. Similarly,
  * any changes @a func makes on cpu @a cpu_id will be visible
  * to this cpu when smp_call_wait() returns.
- * 
+ *
  * Invoking @a func on the destination cpu acts as a memory barrier
  * on that cpu.
- * 
+ *
  * Interrupts must be enabled. Otherwise you run the risk
  * of a deadlock.
- * 
+ *
  * @param cpu_id Destination CPU's logical id (eg CPU->id).
  * @param func Function to call.
@@ -121,12 +121,12 @@
  *          be valid until the function completes.
  */
-void smp_call_async(unsigned int cpu_id, smp_call_func_t func, void *arg, 
+void smp_call_async(unsigned int cpu_id, smp_call_func_t func, void *arg,
 	smp_call_t *call_info)
 {
-	/* 
-	 * Interrupts must not be disabled or you run the risk of a deadlock 
+	/*
+	 * Interrupts must not be disabled or you run the risk of a deadlock
 	 * if both the destination and source cpus try to send an IPI to each
-	 * other with interrupts disabled. Because the interrupts are disabled 
-	 * the IPIs cannot be delivered and both cpus will forever busy wait 
+	 * other with interrupts disabled. Because the interrupts are disabled
+	 * the IPIs cannot be delivered and both cpus will forever busy wait
 	 * for an acknowledgment of the IPI from the other cpu.
 	 */
@@ -155,8 +155,8 @@
 		 * If a platform supports SMP it must implement arch_smp_call_ipi().
 		 * It should issue an IPI on cpu_id and invoke smp_call_ipi_recv()
-		 * on cpu_id in turn. 
-		 * 
+		 * on cpu_id in turn.
+		 *
 		 * Do not implement as just an empty dummy function. Instead
-		 * consider providing a full implementation or at least a version 
+		 * consider providing a full implementation or at least a version
 		 * that panics if invoked. Note that smp_call_async() never
 		 * calls arch_smp_call_ipi() on uniprocessors even if CONFIG_SMP.
@@ -177,7 +177,7 @@
 
 /** Waits for a function invoked on another CPU asynchronously to complete.
- * 
+ *
  * Does not sleep but rather spins.
- * 
+ *
  * Example usage:
  * @code
@@ -185,5 +185,5 @@
  *     puts((char*)p);
  * }
- * 
+ *
  * smp_call_t call_info;
  * smp_call_async(cpus[2].id, hello, "hi!\n", &call_info);
@@ -191,5 +191,5 @@
  * smp_call_wait(&call_info);
  * @endcode
- * 
+ *
  * @param call_info Initialized by smp_call_async().
  */
@@ -202,5 +202,5 @@
 
 /** Architecture independent smp call IPI handler.
- * 
+ *
  * Interrupts must be disabled. Tolerates spurious calls.
  */
@@ -213,5 +213,5 @@
 	list_initialize(&calls_list);
 	
-	/* 
+	/*
 	 * Acts as a load memory barrier. Any changes made by the cpu that
 	 * added the smp_call to calls_list will be made visible to this cpu.
@@ -222,5 +222,5 @@
 
 	/* Walk the list manually, so that we can safely remove list items. */
-	for (link_t *cur = calls_list.head.next, *next = cur->next; 
+	for (link_t *cur = calls_list.head.next, *next = cur->next;
 		!list_empty(&calls_list); cur = next, next = cur->next) {
 		
@@ -254,6 +254,6 @@
 static void call_done(smp_call_t *call_info)
 {
-	/* 
-	 * Separate memory accesses of the called function from the 
+	/*
+	 * Separate memory accesses of the called function from the
 	 * announcement of its completion.
 	 */
@@ -265,7 +265,7 @@
 {
 	do {
-		/* 
+		/*
 		 * Ensure memory accesses following call_wait() are ordered
-		 * after completion of the called function on another cpu. 
+		 * after completion of the called function on another cpu.
 		 * Also, speed up loading of call_info->pending.
 		 */
Index: kernel/generic/src/synch/condvar.c
===================================================================
--- kernel/generic/src/synch/condvar.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/condvar.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -107,5 +107,5 @@
 
 /** Wait for the condition to become true with a locked spinlock.
- * 
+ *
  * The function is not aware of irq_spinlock. Therefore do not even
  * try passing irq_spinlock_t to it. Use _condvar_wait_timeout_irq_spinlock()
@@ -124,5 +124,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-errno_t _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock, 
+errno_t _condvar_wait_timeout_spinlock_impl(condvar_t *cv, spinlock_t *lock,
 	uint32_t usec, int flags)
 {
@@ -148,5 +148,5 @@
 
 /** Wait for the condition to become true with a locked irq spinlock.
- * 
+ *
  * @param cv		Condition variable.
  * @param lock		Locked irq spinlock.
@@ -161,5 +161,5 @@
  * @return See comment for waitq_sleep_timeout().
  */
-errno_t _condvar_wait_timeout_irq_spinlock(condvar_t *cv, irq_spinlock_t *irq_lock, 
+errno_t _condvar_wait_timeout_irq_spinlock(condvar_t *cv, irq_spinlock_t *irq_lock,
 	uint32_t usec, int flags)
 {
@@ -171,12 +171,12 @@
 	irq_lock->guard = false;
 	
-	/* 
-	 * waitq_prepare() restores interrupts to the current state, 
-	 * ie disabled. Therefore, interrupts will remain disabled while 
-	 * it spins waiting for a pending timeout handler to complete. 
+	/*
+	 * waitq_prepare() restores interrupts to the current state,
+	 * ie disabled. Therefore, interrupts will remain disabled while
+	 * it spins waiting for a pending timeout handler to complete.
 	 * Although it spins with interrupts disabled there can only
 	 * be a pending timeout if we failed to cancel an imminent
-	 * timeout (on another cpu) during a wakeup. As a result the 
-	 * timeout handler is guaranteed to run (it is most likely already 
+	 * timeout (on another cpu) during a wakeup. As a result the
+	 * timeout handler is guaranteed to run (it is most likely already
 	 * running) and there is no danger of a deadlock.
 	 */
Index: kernel/generic/src/synch/futex.c
===================================================================
--- kernel/generic/src/synch/futex.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/futex.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -35,12 +35,12 @@
  * @file
  * @brief	Kernel backend for futexes.
- * 
- * Kernel futex objects are stored in a global hash table futex_ht 
+ *
+ * Kernel futex objects are stored in a global hash table futex_ht
  * where the physical address of the futex variable (futex_t.paddr)
- * is used as the lookup key. As a result multiple address spaces 
- * may share the same futex variable. 
- * 
+ * is used as the lookup key. As a result multiple address spaces
+ * may share the same futex variable.
+ *
  * A kernel futex object is created the first time a task accesses
- * the futex (having a futex variable at a physical address not 
+ * the futex (having a futex variable at a physical address not
  * encountered before). Futex object's lifetime is governed by
  * a reference count that represents the number of all the different
@@ -48,15 +48,15 @@
  * physical address of the futex variable. A futex object is freed
  * when the last task having accessed the futex exits.
- * 
+ *
  * Each task keeps track of the futex objects it accessed in a list
- * of pointers (futex_ptr_t, task->futex_list) to the different futex 
+ * of pointers (futex_ptr_t, task->futex_list) to the different futex
  * objects.
- * 
+ *
  * To speed up translation of futex variables' virtual addresses
  * to their physical addresses, futex pointers accessed by the
  * task are furthermore stored in a concurrent hash table (CHT,
  * task->futexes->ht). A single lookup without locks or accesses
- * to the page table translates a futex variable's virtual address 
- * into its futex kernel object. 
+ * to the page table translates a futex variable's virtual address
+ * into its futex kernel object.
  */
 
@@ -119,5 +119,5 @@
 
 /** Mutex protecting the global futex hash table.
- * 
+ *
  * Acquire task specific TASK->futex_list_lock before this mutex.
  */
@@ -125,5 +125,5 @@
 
 /** Global kernel futex hash table. Lock futex_ht_lock before accessing.
- * 
+ *
  * Physical address of the futex variable is the lookup key.
  */
@@ -170,5 +170,5 @@
 	if (interrupts_disabled()) {
 		/* Invoke the blocking cht_destroy in the background. */
-		workq_global_enqueue_noblock(&task->futexes->destroy_work, 
+		workq_global_enqueue_noblock(&task->futexes->destroy_work,
 			destroy_task_cache);
 	} else {
@@ -181,8 +181,8 @@
 static void destroy_task_cache(work_t *work)
 {
-	struct futex_cache *cache = 
+	struct futex_cache *cache =
 		member_to_inst(work, struct futex_cache, destroy_work);
 	
-	/* 
+	/*
 	 * Destroy the cache before manually freeing items of the cache in case
 	 * table resize is in progress.
@@ -216,5 +216,5 @@
 		 * task have already terminated, so they have also definitely
 		 * exited their CHT futex cache protecting rcu reader sections.
-		 * Moreover release_ref() only frees the futex if this is the 
+		 * Moreover release_ref() only frees the futex if this is the
 		 * last task referencing the futex. Therefore, only threads
 		 * of this task may have referenced the futex if it is to be freed.
@@ -273,5 +273,5 @@
 	futex_t *futex = find_cached_futex(uaddr);
 	
-	if (futex) 
+	if (futex)
 		return futex;
 
@@ -319,5 +319,5 @@
 
 	if (futex_ptr_link) {
-		futex_ptr_t *futex_ptr 
+		futex_ptr_t *futex_ptr
 			= member_to_inst(futex_ptr_link, futex_ptr_t, cht_link);
 		
@@ -333,6 +333,6 @@
 
 
-/** 
- * Returns a kernel futex for the physical address @a phys_addr and caches 
+/**
+ * Returns a kernel futex for the physical address @a phys_addr and caches
  * it in this task under the virtual address @a uaddr (if not already cached).
  */
@@ -341,6 +341,6 @@
 	futex_t *futex = malloc(sizeof(futex_t), 0);
 	
-	/* 
-	 * Find the futex object in the global futex table (or insert it 
+	/*
+	 * Find the futex object in the global futex table (or insert it
 	 * if it is not present).
 	 */
@@ -360,6 +360,6 @@
 	spinlock_unlock(&futex_ht_lock);
 	
-	/* 
-	 * Cache the link to the futex object for this task. 
+	/*
+	 * Cache the link to the futex object for this task.
 	 */
 	futex_ptr_t *fut_ptr = malloc(sizeof(futex_ptr_t), 0);
@@ -382,5 +382,5 @@
 		
 		futex_ptr_t *dup = member_to_inst(dup_link, futex_ptr_t, cht_link);
-		futex = dup->futex;		
+		futex = dup->futex;
 	}
 
@@ -402,5 +402,5 @@
 	futex_t *futex = get_futex(uaddr);
 	
-	if (!futex) 
+	if (!futex)
 		return (sys_errno_t) ENOENT;
 
@@ -473,5 +473,5 @@
 
 /*
- * Operations of a task's CHT that caches mappings of futex user space 
+ * Operations of a task's CHT that caches mappings of futex user space
  * virtual addresses to kernel futex objects.
  */
Index: kernel/generic/src/synch/rcu.c
===================================================================
--- kernel/generic/src/synch/rcu.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/rcu.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -35,7 +35,7 @@
  * @file
  * @brief Preemptible read-copy update. Usable from interrupt handlers.
- * 
+ *
  * @par Podzimek-preempt-RCU (RCU_PREEMPT_PODZIMEK)
- * 
+ *
  * Podzimek-preempt-RCU is a preemptible variant of Podzimek's non-preemptible
  * RCU algorithm [1, 2]. Grace period (GP) detection is centralized into a
@@ -43,24 +43,24 @@
  * that it passed a quiescent state (QS), ie a state when the cpu is
  * outside of an rcu reader section (CS). Cpus check for QSs during context
- * switches and when entering and exiting rcu reader sections. Once all 
- * cpus announce a QS and if there were no threads preempted in a CS, the 
+ * switches and when entering and exiting rcu reader sections. Once all
+ * cpus announce a QS and if there were no threads preempted in a CS, the
  * GP ends.
- * 
- * The detector increments the global GP counter, _rcu_cur_gp, in order 
- * to start a new GP. Readers notice the new GP by comparing the changed 
+ *
+ * The detector increments the global GP counter, _rcu_cur_gp, in order
+ * to start a new GP. Readers notice the new GP by comparing the changed
  * _rcu_cur_gp to a locally stored value last_seen_gp which denotes the
  * the last GP number for which the cpu noted an explicit QS (and issued
  * a memory barrier). Readers check for the change in the outer-most
- * (ie not nested) rcu_read_lock()/unlock() as these functions represent 
- * a QS. The reader first executes a memory barrier (MB) in order to contain 
- * memory references within a CS (and to make changes made by writers 
- * visible in the CS following rcu_read_lock()). Next, the reader notes 
+ * (ie not nested) rcu_read_lock()/unlock() as these functions represent
+ * a QS. The reader first executes a memory barrier (MB) in order to contain
+ * memory references within a CS (and to make changes made by writers
+ * visible in the CS following rcu_read_lock()). Next, the reader notes
  * that it reached a QS by updating the cpu local last_seen_gp to the
  * global GP counter, _rcu_cur_gp. Cache coherency eventually makes
  * the updated last_seen_gp visible to the detector cpu, much like it
  * delivered the changed _rcu_cur_gp to all cpus.
- * 
- * The detector waits a while after starting a GP and then reads each 
- * cpu's last_seen_gp to see if it reached a QS. If a cpu did not record 
+ *
+ * The detector waits a while after starting a GP and then reads each
+ * cpu's last_seen_gp to see if it reached a QS. If a cpu did not record
  * a QS (might be a long running thread without an RCU reader CS; or cache
  * coherency has yet to make the most current last_seen_gp visible to
@@ -68,28 +68,28 @@
  * via an IPI. If the IPI handler finds the cpu still in a CS, it instructs
  * the cpu to notify the detector that it had exited the CS via a semaphore
- * (CPU->rcu.is_delaying_gp). 
+ * (CPU->rcu.is_delaying_gp).
  * The detector then waits on the semaphore for any cpus to exit their
- * CSs. Lastly, it waits for the last reader preempted in a CS to 
+ * CSs. Lastly, it waits for the last reader preempted in a CS to
  * exit its CS if there were any and signals the end of the GP to
  * separate reclaimer threads wired to each cpu. Reclaimers then
  * execute the callbacks queued on each of the cpus.
- * 
- * 
+ *
+ *
  * @par A-RCU algorithm (RCU_PREEMPT_A)
- * 
+ *
  * A-RCU is based on the user space rcu algorithm in [3] utilizing signals
- * (urcu) and Podzimek's rcu [1]. Like in Podzimek's rcu, callbacks are 
- * executed by cpu-bound reclaimer threads. There is however no dedicated 
- * detector thread and the reclaimers take on the responsibilities of the 
- * detector when they need to start a new GP. A new GP is again announced 
+ * (urcu) and Podzimek's rcu [1]. Like in Podzimek's rcu, callbacks are
+ * executed by cpu-bound reclaimer threads. There is however no dedicated
+ * detector thread and the reclaimers take on the responsibilities of the
+ * detector when they need to start a new GP. A new GP is again announced
  * and acknowledged with _rcu_cur_gp and the cpu local last_seen_gp. Unlike
- * Podzimek's rcu, cpus check explicitly for QS only during context switches. 
+ * Podzimek's rcu, cpus check explicitly for QS only during context switches.
  * Like in urcu, rcu_read_lock()/unlock() only maintain the nesting count
  * and never issue any memory barriers. This makes rcu_read_lock()/unlock()
  * simple and fast.
- * 
+ *
  * If a new callback is queued for a reclaimer and no GP is in progress,
- * the reclaimer takes on the role of a detector. The detector increments 
- * _rcu_cur_gp in order to start a new GP. It waits a while to give cpus 
+ * the reclaimer takes on the role of a detector. The detector increments
+ * _rcu_cur_gp in order to start a new GP. It waits a while to give cpus
  * a chance to switch a context (a natural QS). Then, it examines each
  * non-idle cpu that has yet to pass a QS via an IPI. The IPI handler
@@ -98,28 +98,28 @@
  * finds the cpu in a CS it does nothing and let the detector poll/interrupt
  * the cpu again after a short sleep.
- * 
+ *
  * @par Caveats
- * 
+ *
  * last_seen_gp and _rcu_cur_gp are always 64bit variables and they
  * are read non-atomically on 32bit machines. Reading a clobbered
  * value of last_seen_gp or _rcu_cur_gp or writing a clobbered value
  * of _rcu_cur_gp to last_seen_gp will at worst force the detector
- * to unnecessarily interrupt a cpu. Interrupting a cpu makes the 
+ * to unnecessarily interrupt a cpu. Interrupting a cpu makes the
  * correct value of _rcu_cur_gp visible to the cpu and correctly
  * resets last_seen_gp in both algorithms.
- * 
- * 
- * 
+ *
+ *
+ *
  * [1] Read-copy-update for opensolaris,
  *     2010, Podzimek
  *     https://andrej.podzimek.org/thesis.pdf
- * 
+ *
  * [2] (podzimek-rcu) implementation file "rcu.patch"
  *     http://d3s.mff.cuni.cz/projects/operating_systems/rcu/rcu.patch
- * 
+ *
  * [3] User-level implementations of read-copy update,
  *     2012, appendix
  *     http://www.rdrop.com/users/paulmck/RCU/urcu-supp-accepted.2011.08.30a.pdf
- * 
+ *
  */
 
@@ -139,11 +139,11 @@
 #include <macros.h>
 
-/* 
- * Number of milliseconds to give to preexisting readers to finish 
+/*
+ * Number of milliseconds to give to preexisting readers to finish
  * when non-expedited grace period detection is in progress.
  */
 #define DETECT_SLEEP_MS    10
-/* 
- * Max number of pending callbacks in the local cpu's queue before 
+/*
+ * Max number of pending callbacks in the local cpu's queue before
  * aggressively expediting the current grace period
  */
@@ -159,6 +159,6 @@
 #define UINT32_MAX_HALF    2147483648U
 
-/** 
- * The current grace period number. Increases monotonically. 
+/**
+ * The current grace period number. Increases monotonically.
  * Lock rcu.gp_lock or rcu.preempt_lock to get a current value.
  */
@@ -171,5 +171,5 @@
 	/** Reclaimers use to notify the detector to accelerate GP detection. */
 	condvar_t expedite_now;
-	/** 
+	/**
 	 * Protects: req_gp_end_cnt, req_expedited_cnt, completed_gp, _rcu_cur_gp;
 	 * or: completed_gp, _rcu_cur_gp
@@ -177,6 +177,6 @@
 	SPINLOCK_DECLARE(gp_lock);
 	/**
-	 * The number of the most recently completed grace period. At most 
-	 * one behind _rcu_cur_gp. If equal to _rcu_cur_gp, a grace period 
+	 * The number of the most recently completed grace period. At most
+	 * one behind _rcu_cur_gp. If equal to _rcu_cur_gp, a grace period
 	 * detection is not in progress and the detector is idle.
 	 */
@@ -189,7 +189,7 @@
 	/** Reader that have been preempted and might delay the next grace period.*/
 	list_t next_preempted;
-	/** 
-	 * The detector is waiting for the last preempted reader 
-	 * in cur_preempted to announce that it exited its reader 
+	/**
+	 * The detector is waiting for the last preempted reader
+	 * in cur_preempted to announce that it exited its reader
 	 * section by up()ing remaining_readers.
 	 */
@@ -198,6 +198,6 @@
 #ifdef RCU_PREEMPT_A
 	
-	/** 
-	 * The detector waits on this semaphore for any preempted readers 
+	/**
+	 * The detector waits on this semaphore for any preempted readers
 	 * delaying the grace period once all cpus pass a quiescent state.
 	 */
@@ -212,15 +212,15 @@
 	/** Number of consecutive grace periods to detect quickly and aggressively.*/
 	size_t req_expedited_cnt;
-	/** 
+	/**
 	 * Number of cpus with readers that are delaying the current GP.
 	 * They will up() remaining_readers.
 	 */
 	atomic_t delaying_cpu_cnt;
-	/** 
+	/**
 	 * The detector waits on this semaphore for any readers delaying the GP.
-	 * 
-	 * Each of the cpus with readers that are delaying the current GP 
-	 * must up() this sema once they reach a quiescent state. If there 
-	 * are any readers in cur_preempted (ie preempted preexisting) and 
+	 *
+	 * Each of the cpus with readers that are delaying the current GP
+	 * must up() this sema once they reach a quiescent state. If there
+	 * are any readers in cur_preempted (ie preempted preexisting) and
 	 * they are already delaying GP detection, the last to unlock its
 	 * reader section must up() this sema once.
@@ -252,5 +252,5 @@
 static void start_reclaimers(void);
 static void synch_complete(rcu_item_t *rcu_item);
-static inline void rcu_call_impl(bool expedite, rcu_item_t *rcu_item, 
+static inline void rcu_call_impl(bool expedite, rcu_item_t *rcu_item,
 	rcu_func_t func);
 static void add_barrier_cb(void *arg);
@@ -396,6 +396,6 @@
 
 
-/** Cleans up global RCU resources and stops dispatching callbacks. 
- * 
+/** Cleans up global RCU resources and stops dispatching callbacks.
+ *
  * Call when shutting down the kernel. Outstanding callbacks will
  * not be processed. Instead they will linger forever.
@@ -444,8 +444,8 @@
 		snprintf(name, THREAD_NAME_BUFLEN - 1, "rcu-rec/%u", cpu_id);
 		
-		cpus[cpu_id].rcu.reclaimer_thr = 
+		cpus[cpu_id].rcu.reclaimer_thr =
 			thread_create(reclaimer, NULL, TASK, THREAD_FLAG_NONE, name);
 
-		if (!cpus[cpu_id].rcu.reclaimer_thr) 
+		if (!cpus[cpu_id].rcu.reclaimer_thr)
 			panic("Failed to create RCU reclaimer thread on cpu%u.", cpu_id);
 
@@ -460,8 +460,8 @@
 static void start_detector(void)
 {
-	rcu.detector_thr = 
+	rcu.detector_thr =
 		thread_create(detector, NULL, TASK, THREAD_FLAG_NONE, "rcu-det");
 	
-	if (!rcu.detector_thr) 
+	if (!rcu.detector_thr)
 		panic("Failed to create RCU detector thread.");
 	
@@ -479,9 +479,9 @@
 }
 
-/** Unlocks the local reader section using the given nesting count. 
- * 
- * Preemption or interrupts must be disabled. 
- * 
- * @param pnesting_cnt Either &CPU->rcu.tmp_nesting_cnt or 
+/** Unlocks the local reader section using the given nesting count.
+ *
+ * Preemption or interrupts must be disabled.
+ *
+ * @param pnesting_cnt Either &CPU->rcu.tmp_nesting_cnt or
  *           THREAD->rcu.nesting_cnt.
  */
@@ -493,9 +493,9 @@
 		_rcu_record_qs();
 		
-		/* 
-		 * The thread was preempted while in a critical section or 
-		 * the detector is eagerly waiting for this cpu's reader 
-		 * to finish. 
-		 * 
+		/*
+		 * The thread was preempted while in a critical section or
+		 * the detector is eagerly waiting for this cpu's reader
+		 * to finish.
+		 *
 		 * Note that THREAD may be NULL in scheduler() and not just during boot.
 		 */
@@ -518,5 +518,5 @@
 	 */
 	
-	/* 
+	/*
 	 * If the detector is eagerly waiting for this cpu's reader to unlock,
 	 * notify it that the reader did so.
@@ -566,5 +566,5 @@
 	assert(!rcu_read_locked());
 	
-	synch_item_t completion; 
+	synch_item_t completion;
 
 	waitq_initialize(&completion.wq);
@@ -584,5 +584,5 @@
 void rcu_barrier(void)
 {
-	/* 
+	/*
 	 * Serialize rcu_barrier() calls so we don't overwrite cpu.barrier_item
 	 * currently in use by rcu_barrier().
@@ -590,5 +590,5 @@
 	mutex_lock(&rcu.barrier_mtx);
 	
-	/* 
+	/*
 	 * Ensure we queue a barrier callback on all cpus before the already
 	 * enqueued barrier callbacks start signaling completion.
@@ -610,7 +610,7 @@
 }
 
-/** Issues a rcu_barrier() callback on the local cpu. 
- * 
- * Executed with interrupts disabled.  
+/** Issues a rcu_barrier() callback on the local cpu.
+ *
+ * Executed with interrupts disabled.
  */
 static void add_barrier_cb(void *arg)
@@ -631,8 +631,8 @@
 }
 
-/** Adds a callback to invoke after all preexisting readers finish. 
- * 
+/** Adds a callback to invoke after all preexisting readers finish.
+ *
  * May be called from within interrupt handlers or RCU reader sections.
- * 
+ *
  * @param rcu_item Used by RCU to track the call. Must remain
  *         until the user callback function is entered.
@@ -655,5 +655,5 @@
 
 /** rcu_call() inline-able implementation. See rcu_call() for comments. */
-static inline void rcu_call_impl(bool expedite, rcu_item_t *rcu_item, 
+static inline void rcu_call_impl(bool expedite, rcu_item_t *rcu_item,
 	rcu_func_t func)
 {
@@ -667,5 +667,5 @@
 	rcu_cpu_data_t *r = &CPU->rcu;
 
-	rcu_item_t **prev_tail 
+	rcu_item_t **prev_tail
 		= local_atomic_exchange(&r->parriving_cbs_tail, &rcu_item->next);
 	*prev_tail = rcu_item;
@@ -704,6 +704,6 @@
 {
 	assert(THREAD && THREAD->wired);
-	/* 
-	 * Accessing with interrupts enabled may at worst lead to 
+	/*
+	 * Accessing with interrupts enabled may at worst lead to
 	 * a false negative if we race with a local interrupt handler.
 	 */
@@ -740,5 +740,5 @@
 static bool wait_for_pending_cbs(void)
 {
-	if (!all_cbs_empty()) 
+	if (!all_cbs_empty())
 		return true;
 
@@ -772,14 +772,14 @@
 		if (exec_cnt < CRITICAL_THRESHOLD) {
 			exec_cbs(&CPU->rcu.cur_cbs);
-			exec_cbs(&CPU->rcu.next_cbs);	
+			exec_cbs(&CPU->rcu.next_cbs);
 		} else {
-			/* 
-			 * Getting overwhelmed with too many callbacks to run. 
-			 * Disable preemption in order to prolong our time slice 
+			/*
+			 * Getting overwhelmed with too many callbacks to run.
+			 * Disable preemption in order to prolong our time slice
 			 * and catch up with updaters posting new callbacks.
 			 */
 			preemption_disable();
 			exec_cbs(&CPU->rcu.cur_cbs);
-			exec_cbs(&CPU->rcu.next_cbs);	
+			exec_cbs(&CPU->rcu.next_cbs);
 			preemption_enable();
 		}
@@ -792,7 +792,7 @@
 			exec_cbs(&CPU->rcu.cur_cbs);
 		} else {
-			/* 
-			 * Getting overwhelmed with too many callbacks to run. 
-			 * Disable preemption in order to prolong our time slice 
+			/*
+			 * Getting overwhelmed with too many callbacks to run.
+			 * Disable preemption in order to prolong our time slice
 			 * and catch up with updaters posting new callbacks.
 			 */
@@ -828,5 +828,5 @@
 	CPU->rcu.stat_max_cbs = max(arriving_cnt, CPU->rcu.stat_max_cbs);
 	if (0 < arriving_cnt) {
-		CPU->rcu.stat_avg_cbs = 
+		CPU->rcu.stat_avg_cbs =
 			(99 * CPU->rcu.stat_avg_cbs + 1 * arriving_cnt) / 100;
 	}
@@ -834,5 +834,5 @@
 
 /** Prepares another batch of callbacks to dispatch at the nest grace period.
- * 
+ *
  * @return True if the next batch of callbacks must be expedited quickly.
  */
@@ -849,10 +849,10 @@
 	CPU->rcu.arriving_cbs_cnt = 0;
 	
-	/* 
+	/*
 	 * Too many callbacks queued. Better speed up the detection
 	 * or risk exhausting all system memory.
 	 */
 	bool expedite = (EXPEDITE_THRESHOLD < CPU->rcu.next_cbs_cnt)
-		|| CPU->rcu.expedite_arriving;	
+		|| CPU->rcu.expedite_arriving;
 	CPU->rcu.expedite_arriving = false;
 
@@ -860,5 +860,5 @@
 	CPU->rcu.next_cbs = CPU->rcu.arriving_cbs;
 	
-	/* 
+	/*
 	 * At least one callback arrived. The tail therefore does not point
 	 * to the head of arriving_cbs and we can safely reset it to NULL.
@@ -873,6 +873,6 @@
 		ACCESS_ONCE(CPU->rcu.parriving_cbs_tail) = &CPU->rcu.arriving_cbs;
 	} else {
-		/* 
-		 * arriving_cbs was null and parriving_cbs_tail pointed to it 
+		/*
+		 * arriving_cbs was null and parriving_cbs_tail pointed to it
 		 * so leave it that way. Note that interrupt handlers may have
 		 * added a callback in the meantime so it is not safe to reset
@@ -884,6 +884,6 @@
 	upd_stat_cb_cnts(CPU->rcu.next_cbs_cnt);
 	
-	/* 
-	 * Make changes prior to queuing next_cbs visible to readers. 
+	/*
+	 * Make changes prior to queuing next_cbs visible to readers.
 	 * See comment in wait_for_readers().
 	 */
@@ -898,8 +898,8 @@
 		CPU->rcu.next_cbs_gp = _rcu_cur_gp + 1;
 		
-		/* 
+		/*
 		 * There are no callbacks to invoke before next_cbs. Instruct
 		 * wait_for_cur_cbs_gp() to notify us of the nearest GP end.
-		 * That could be sooner than next_cbs_gp (if the current GP 
+		 * That could be sooner than next_cbs_gp (if the current GP
 		 * had not yet completed), so we'll create a shorter batch
 		 * of callbacks next time around.
@@ -907,5 +907,5 @@
 		if (cur_cbs_empty()) {
 			CPU->rcu.cur_cbs_gp = rcu.completed_gp + 1;
-		} 
+		}
 		
 		spinlock_unlock(&rcu.gp_lock);
@@ -916,5 +916,5 @@
 	assert(CPU->rcu.cur_cbs_gp <= CPU->rcu.next_cbs_gp);
 	
-	return expedite;	
+	return expedite;
 }
 
@@ -922,9 +922,9 @@
 #ifdef RCU_PREEMPT_A
 
-/** Waits for the grace period associated with callbacks cub_cbs to elapse. 
- * 
- * @param expedite Instructs the detector to aggressively speed up grace 
+/** Waits for the grace period associated with callbacks cub_cbs to elapse.
+ *
+ * @param expedite Instructs the detector to aggressively speed up grace
  *            period detection without any delay.
- * @param completed_gp Returns the most recent completed grace period 
+ * @param completed_gp Returns the most recent completed grace period
  *            number.
  * @return false if the thread was interrupted and should stop.
@@ -951,16 +951,16 @@
 			condvar_broadcast(&rcu.gp_ended);
 		} else {
-			/* GP detection is in progress.*/ 
+			/* GP detection is in progress.*/
 			
-			if (expedite) 
+			if (expedite)
 				condvar_signal(&rcu.expedite_now);
 			
 			/* Wait for the GP to complete. */
-			errno_t ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock, 
+			errno_t ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock,
 				SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
 			
 			if (ret == EINTR) {
 				spinlock_unlock(&rcu.gp_lock);
-				return false;			
+				return false;
 			}
 		}
@@ -984,5 +984,5 @@
 	while (!cpu_mask_is_none(reader_cpus)) {
 		/* Give cpus a chance to context switch (a QS) and batch callbacks. */
-		if(!gp_sleep(&expedite)) 
+		if(!gp_sleep(&expedite))
 			return false;
 		
@@ -996,5 +996,5 @@
 	}
 	
-	/* 
+	/*
 	 * All cpus have passed through a QS and see the most recent _rcu_cur_gp.
 	 * As a result newly preempted readers will associate with next_preempted
@@ -1038,5 +1038,5 @@
 		
 	if (locked && !passed_qs) {
-		/* 
+		/*
 		 * This cpu has not yet passed a quiescent state during this grace
 		 * period and it is currently in a reader section. We'll have to
@@ -1057,11 +1057,11 @@
 	assert(interrupts_disabled());
 
-	/* 
-	 * In order not to worry about NMI seeing rcu_nesting change work 
+	/*
+	 * In order not to worry about NMI seeing rcu_nesting change work
 	 * with a local copy.
 	 */
 	size_t nesting_cnt = local_atomic_exchange(&THE->rcu_nesting, 0);
 	
-	/* 
+	/*
 	 * Ensures NMIs see .rcu_nesting without the WAS_PREEMPTED mark and
 	 * do not accidentally call rm_preempted_reader() from unlock().
@@ -1079,20 +1079,20 @@
 
 	if (CPU->rcu.last_seen_gp != _rcu_cur_gp) {
-		/* 
-		 * Contain any memory accesses of old readers before announcing a QS. 
+		/*
+		 * Contain any memory accesses of old readers before announcing a QS.
 		 * Also make changes from the previous GP visible to this cpu.
-		 * Moreover it separates writing to last_seen_gp from 
+		 * Moreover it separates writing to last_seen_gp from
 		 * note_preempted_reader().
 		 */
 		memory_barrier();
-		/* 
+		/*
 		 * The preempted reader has been noted globally. There are therefore
 		 * no readers running on this cpu so this is a quiescent state.
-		 * 
-		 * Reading the multiword _rcu_cur_gp non-atomically is benign. 
+		 *
+		 * Reading the multiword _rcu_cur_gp non-atomically is benign.
 		 * At worst, the read value will be different from the actual value.
 		 * As a result, both the detector and this cpu will believe
 		 * this cpu has not yet passed a QS although it really did.
-		 * 
+		 *
 		 * Reloading _rcu_cur_gp is benign, because it cannot change
 		 * until this cpu acknowledges it passed a QS by writing to
@@ -1103,5 +1103,5 @@
 	}
 
-	/* 
+	/*
 	 * Forcefully associate the reclaimer with the highest priority
 	 * even if preempted due to its time slice running out.
@@ -1109,5 +1109,5 @@
 	if (THREAD == CPU->rcu.reclaimer_thr) {
 		THREAD->priority = -1;
-	} 
+	}
 	
 	upd_max_cbs_in_slice(CPU->rcu.arriving_cbs_cnt);
@@ -1123,6 +1123,6 @@
 }
 
-/** Called from scheduler() when exiting the current thread. 
- * 
+/** Called from scheduler() when exiting the current thread.
+ *
  * Preemption or interrupts are disabled and the scheduler() already
  * switched away from the current thread, calling rcu_after_thread_ran().
@@ -1132,8 +1132,8 @@
 	assert(THE->rcu_nesting == 0);
 	
-	/* 
-	 * The thread forgot to exit its reader critical section. 
+	/*
+	 * The thread forgot to exit its reader critical section.
 	 * It is a bug, but rather than letting the entire system lock up
-	 * forcefully leave the reader section. The thread is not holding 
+	 * forcefully leave the reader section. The thread is not holding
 	 * any references anyway since it is exiting so it is safe.
 	 */
@@ -1162,5 +1162,5 @@
 	size_t prev = local_atomic_exchange(&THE->rcu_nesting, 0);
 	if (prev == RCU_WAS_PREEMPTED) {
-		/* 
+		/*
 		 * NMI handlers are never preempted but may call rm_preempted_reader()
 		 * if a NMI occurred in _rcu_preempted_unlock() of a preempted thread.
@@ -1168,5 +1168,5 @@
 		 * in _rcu_preempted_unlock() is: an IPI/sample_local_cpu() and
 		 * the initial part of rcu_after_thread_ran().
-		 * 
+		 *
 		 * rm_preempted_reader() will not deadlock because none of the locks
 		 * it uses are locked in this case. Neither _rcu_preempted_unlock()
@@ -1180,9 +1180,9 @@
 #elif defined(RCU_PREEMPT_PODZIMEK)
 
-/** Waits for the grace period associated with callbacks cub_cbs to elapse. 
- * 
- * @param expedite Instructs the detector to aggressively speed up grace 
+/** Waits for the grace period associated with callbacks cub_cbs to elapse.
+ *
+ * @param expedite Instructs the detector to aggressively speed up grace
  *            period detection without any delay.
- * @param completed_gp Returns the most recent completed grace period 
+ * @param completed_gp Returns the most recent completed grace period
  *            number.
  * @return false if the thread was interrupted and should stop.
@@ -1190,22 +1190,22 @@
 static bool wait_for_cur_cbs_gp_end(bool expedite, rcu_gp_t *completed_gp)
 {
-	/* 
+	/*
 	 * Use a possibly outdated version of completed_gp to bypass checking
 	 * with the lock.
-	 * 
-	 * Note that loading and storing rcu.completed_gp is not atomic 
-	 * (it is 64bit wide). Reading a clobbered value that is less than 
-	 * rcu.completed_gp is harmless - we'll recheck with a lock. The 
-	 * only way to read a clobbered value that is greater than the actual 
-	 * value is if the detector increases the higher-order word first and 
-	 * then decreases the lower-order word (or we see stores in that order), 
-	 * eg when incrementing from 2^32 - 1 to 2^32. The loaded value 
-	 * suddenly jumps by 2^32. It would take hours for such an increase 
-	 * to occur so it is safe to discard the value. We allow increases 
+	 *
+	 * Note that loading and storing rcu.completed_gp is not atomic
+	 * (it is 64bit wide). Reading a clobbered value that is less than
+	 * rcu.completed_gp is harmless - we'll recheck with a lock. The
+	 * only way to read a clobbered value that is greater than the actual
+	 * value is if the detector increases the higher-order word first and
+	 * then decreases the lower-order word (or we see stores in that order),
+	 * eg when incrementing from 2^32 - 1 to 2^32. The loaded value
+	 * suddenly jumps by 2^32. It would take hours for such an increase
+	 * to occur so it is safe to discard the value. We allow increases
 	 * of up to half the maximum to generously accommodate for loading an
 	 * outdated lower word.
 	 */
 	rcu_gp_t compl_gp = ACCESS_ONCE(rcu.completed_gp);
-	if (CPU->rcu.cur_cbs_gp <= compl_gp 
+	if (CPU->rcu.cur_cbs_gp <= compl_gp
 		&& compl_gp <= CPU->rcu.cur_cbs_gp + UINT32_MAX_HALF) {
 		*completed_gp = compl_gp;
@@ -1224,6 +1224,6 @@
 	assert(_rcu_cur_gp <= CPU->rcu.cur_cbs_gp);
 	
-	/* 
-	 * Notify the detector of how many GP ends we intend to wait for, so 
+	/*
+	 * Notify the detector of how many GP ends we intend to wait for, so
 	 * it can avoid going to sleep unnecessarily. Optimistically assume
 	 * new callbacks will arrive while we're waiting; hence +1.
@@ -1232,14 +1232,14 @@
 	req_detection(remaining_gp_ends + (arriving_cbs_empty() ? 0 : 1));
 	
-	/* 
-	 * Ask the detector to speed up GP detection if there are too many 
+	/*
+	 * Ask the detector to speed up GP detection if there are too many
 	 * pending callbacks and other reclaimers have not already done so.
 	 */
 	if (expedite) {
-		if(0 == rcu.req_expedited_cnt) 
+		if(0 == rcu.req_expedited_cnt)
 			condvar_signal(&rcu.expedite_now);
 		
-		/* 
-		 * Expedite only cub_cbs. If there really is a surge of callbacks 
+		/*
+		 * Expedite only cub_cbs. If there really is a surge of callbacks
 		 * the arriving batch will expedite the GP for the huge number
 		 * of callbacks currently in next_cbs
@@ -1252,5 +1252,5 @@
 	
 	*completed_gp = rcu.completed_gp;
-	spinlock_unlock(&rcu.gp_lock);	
+	spinlock_unlock(&rcu.gp_lock);
 	
 	if (!interrupted)
@@ -1269,5 +1269,5 @@
 	/* Wait until wait_on_gp ends. */
 	while (rcu.completed_gp < wait_on_gp && !interrupted) {
-		int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock, 
+		int ret = _condvar_wait_timeout_spinlock(&rcu.gp_ended, &rcu.gp_lock,
 			SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
 		interrupted = (ret == EINTR);
@@ -1298,5 +1298,5 @@
 	
 	while (wait_for_detect_req()) {
-		/* 
+		/*
 		 * Announce new GP started. Readers start lazily acknowledging that
 		 * they passed a QS.
@@ -1306,5 +1306,5 @@
 		spinlock_unlock(&rcu.gp_lock);
 		
-		if (!wait_for_readers()) 
+		if (!wait_for_readers())
 			goto unlocked_out;
 		
@@ -1329,5 +1329,5 @@
 	
 	while (0 == rcu.req_gp_end_cnt && !interrupted) {
-		int ret = _condvar_wait_timeout_spinlock(&rcu.req_gp_changed, 
+		int ret = _condvar_wait_timeout_spinlock(&rcu.req_gp_changed,
 			&rcu.gp_lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
 		
@@ -1357,6 +1357,6 @@
 	cpu_mask_active(reading_cpus);
 
-	/* 
-	 * Give readers time to pass through a QS. Also, batch arriving 
+	/*
+	 * Give readers time to pass through a QS. Also, batch arriving
 	 * callbacks in order to amortize detection overhead.
 	 */
@@ -1417,7 +1417,7 @@
 }
 
-/** Invoked on a cpu delaying grace period detection. 
- * 
- * Induces a quiescent state for the cpu or it instructs remaining 
+/** Invoked on a cpu delaying grace period detection.
+ *
+ * Induces a quiescent state for the cpu or it instructs remaining
  * readers to notify the detector once they finish.
  */
@@ -1432,7 +1432,7 @@
 		if (0 < CPU->rcu.nesting_cnt) {
 			assert(!CPU->idle);
-			/* 
-			 * Note to notify the detector from rcu_read_unlock(). 
-			 * 
+			/*
+			 * Note to notify the detector from rcu_read_unlock().
+			 *
 			 * ACCESS_ONCE ensures the compiler writes to is_delaying_gp
 			 * only after it determines that we are in a reader CS.
@@ -1443,13 +1443,13 @@
 			atomic_inc(&rcu.delaying_cpu_cnt);
 		} else {
-			/* 
-			 * The cpu did not enter any rcu reader sections since 
+			/*
+			 * The cpu did not enter any rcu reader sections since
 			 * the start of the current GP. Record a quiescent state.
-			 * 
+			 *
 			 * Or, we interrupted rcu_read_unlock_impl() right before
-			 * it recorded a QS. Record a QS for it. The memory barrier 
-			 * contains the reader section's mem accesses before 
+			 * it recorded a QS. Record a QS for it. The memory barrier
+			 * contains the reader section's mem accesses before
 			 * updating last_seen_gp.
-			 * 
+			 *
 			 * Or, we interrupted rcu_read_lock() right after it recorded
 			 * a QS for the previous GP but before it got a chance to
@@ -1461,11 +1461,11 @@
 		}
 	} else {
-		/* 
-		 * This cpu already acknowledged that it had passed through 
-		 * a quiescent state since the start of cur_gp. 
+		/*
+		 * This cpu already acknowledged that it had passed through
+		 * a quiescent state since the start of cur_gp.
 		 */
 	}
 	
-	/* 
+	/*
 	 * smp_call() makes sure any changes propagate back to the caller.
 	 * In particular, it makes the most current last_seen_gp visible
@@ -1495,12 +1495,12 @@
 	assert(interrupts_disabled());
 
-	/* 
+	/*
 	 * Prevent NMI handlers from interfering. The detector will be notified
-	 * in this function if CPU->rcu.is_delaying_gp. The current thread is 
+	 * in this function if CPU->rcu.is_delaying_gp. The current thread is
 	 * no longer running so there is nothing else to signal to the detector.
 	 */
 	CPU->rcu.signal_unlock = false;
-	/* 
-	 * Separates clearing of .signal_unlock from accesses to 
+	/*
+	 * Separates clearing of .signal_unlock from accesses to
 	 * THREAD->rcu.was_preempted and CPU->rcu.nesting_cnt.
 	 */
@@ -1516,5 +1516,5 @@
 	}
 	
-	/* 
+	/*
 	 * The preempted reader has been noted globally. There are therefore
 	 * no readers running on this cpu so this is a quiescent state.
@@ -1522,16 +1522,16 @@
 	_rcu_record_qs();
 
-	/* 
-	 * Interrupt handlers might use RCU while idle in scheduler(). 
-	 * The preempted reader has been noted globally, so the handlers 
+	/*
+	 * Interrupt handlers might use RCU while idle in scheduler().
+	 * The preempted reader has been noted globally, so the handlers
 	 * may now start announcing quiescent states.
 	 */
 	CPU->rcu.nesting_cnt = 0;
 	
-	/* 
-	 * This cpu is holding up the current GP. Let the detector know 
-	 * it has just passed a quiescent state. 
-	 * 
-	 * The detector waits separately for preempted readers, so we have 
+	/*
+	 * This cpu is holding up the current GP. Let the detector know
+	 * it has just passed a quiescent state.
+	 *
+	 * The detector waits separately for preempted readers, so we have
 	 * to notify the detector even if we have just preempted a reader.
 	 */
@@ -1541,16 +1541,16 @@
 	}
 
-	/* 
+	/*
 	 * Forcefully associate the detector with the highest priority
 	 * even if preempted due to its time slice running out.
-	 * 
+	 *
 	 * todo: Replace with strict scheduler priority classes.
 	 */
 	if (THREAD == rcu.detector_thr) {
 		THREAD->priority = -1;
-	} 
+	}
 	else if (THREAD == CPU->rcu.reclaimer_thr) {
 		THREAD->priority = -1;
-	} 
+	}
 	
 	upd_max_cbs_in_slice(CPU->rcu.arriving_cbs_cnt);
@@ -1566,5 +1566,5 @@
 	CPU->rcu.nesting_cnt = THREAD->rcu.nesting_cnt;
 	
-	/* 
+	/*
 	 * Ensures NMI see the proper nesting count before .signal_unlock.
 	 * Otherwise the NMI may incorrectly signal that a preempted reader
@@ -1573,10 +1573,10 @@
 	compiler_barrier();
 	
-	/* 
-	 * In the unlikely event that a NMI occurs between the loading of the 
-	 * variables and setting signal_unlock, the NMI handler may invoke 
+	/*
+	 * In the unlikely event that a NMI occurs between the loading of the
+	 * variables and setting signal_unlock, the NMI handler may invoke
 	 * rcu_read_unlock() and clear signal_unlock. In that case we will
 	 * incorrectly overwrite signal_unlock from false to true. This event
-	 * is benign and the next rcu_read_unlock() will at worst 
+	 * is benign and the next rcu_read_unlock() will at worst
 	 * needlessly invoke _rcu_signal_unlock().
 	 */
@@ -1584,6 +1584,6 @@
 }
 
-/** Called from scheduler() when exiting the current thread. 
- * 
+/** Called from scheduler() when exiting the current thread.
+ *
  * Preemption or interrupts are disabled and the scheduler() already
  * switched away from the current thread, calling rcu_after_thread_ran().
@@ -1595,8 +1595,8 @@
 	assert(PREEMPTION_DISABLED || interrupts_disabled());
 	
-	/* 
-	 * The thread forgot to exit its reader critical section. 
+	/*
+	 * The thread forgot to exit its reader critical section.
 	 * It is a bug, but rather than letting the entire system lock up
-	 * forcefully leave the reader section. The thread is not holding 
+	 * forcefully leave the reader section. The thread is not holding
 	 * any references anyway since it is exiting so it is safe.
 	 */
@@ -1623,11 +1623,11 @@
 	++_rcu_cur_gp;
 	
-	/* 
+	/*
 	 * Readers preempted before the start of this GP (next_preempted)
-	 * are preexisting readers now that a GP started and will hold up 
+	 * are preexisting readers now that a GP started and will hold up
 	 * the current GP until they exit their reader sections.
-	 * 
-	 * Preempted readers from the previous GP have finished so 
-	 * cur_preempted is empty, but see comment in _rcu_record_qs(). 
+	 *
+	 * Preempted readers from the previous GP have finished so
+	 * cur_preempted is empty, but see comment in _rcu_record_qs().
 	 */
 	list_concat(&rcu.cur_preempted, &rcu.next_preempted);
@@ -1642,8 +1642,8 @@
 {
 	/*
-	 * Ensure the announcement of the start of a new GP (ie up-to-date 
-	 * cur_gp) propagates to cpus that are just coming out of idle 
+	 * Ensure the announcement of the start of a new GP (ie up-to-date
+	 * cur_gp) propagates to cpus that are just coming out of idle
 	 * mode before we sample their idle state flag.
-	 * 
+	 *
 	 * Cpus guarantee that after they set CPU->idle = true they will not
 	 * execute any RCU reader sections without first setting idle to
@@ -1660,33 +1660,33 @@
 	 * on the previously idle cpu -- again thanks to issuing a memory
 	 * barrier after returning from idle mode.
-	 * 
+	 *
 	 * idle -> non-idle cpu      | detector      | reclaimer
 	 * ------------------------------------------------------
 	 * rcu reader 1              |               | rcu_call()
 	 * MB X                      |               |
-	 * idle = true               |               | rcu_call() 
-	 * (no rcu readers allowed ) |               | MB A in advance_cbs() 
+	 * idle = true               |               | rcu_call()
+	 * (no rcu readers allowed ) |               | MB A in advance_cbs()
 	 * MB Y                      | (...)         | (...)
-	 * (no rcu readers allowed)  |               | MB B in advance_cbs() 
+	 * (no rcu readers allowed)  |               | MB B in advance_cbs()
 	 * idle = false              | ++cur_gp      |
 	 * (no rcu readers allowed)  | MB C          |
 	 * MB Z                      | signal gp_end |
 	 * rcu reader 2              |               | exec_cur_cbs()
-	 * 
-	 * 
+	 *
+	 *
 	 * MB Y orders visibility of changes to idle for detector's sake.
-	 * 
-	 * MB Z pairs up with MB C. The cpu making a transition from idle 
+	 *
+	 * MB Z pairs up with MB C. The cpu making a transition from idle
 	 * will see the most current value of cur_gp and will not attempt
 	 * to notify the detector even if preempted during this GP.
-	 * 
+	 *
 	 * MB Z pairs up with MB A from the previous batch. Updaters' changes
-	 * are visible to reader 2 even when the detector thinks the cpu is idle 
+	 * are visible to reader 2 even when the detector thinks the cpu is idle
 	 * but it is not anymore.
-	 * 
+	 *
 	 * MB X pairs up with MB B. Late mem accesses of reader 1 are contained
-	 * and visible before idling and before any callbacks are executed 
+	 * and visible before idling and before any callbacks are executed
 	 * by reclaimers.
-	 * 
+	 *
 	 * In summary, the detector does not know of or wait for reader 2, but
 	 * it does not have to since it is a new reader that will not access
@@ -1696,13 +1696,13 @@
 	
 	cpu_mask_for_each(*cpu_mask, cpu_id) {
-		/* 
-		 * The cpu already checked for and passed through a quiescent 
+		/*
+		 * The cpu already checked for and passed through a quiescent
 		 * state since the beginning of this GP.
-		 * 
-		 * _rcu_cur_gp is modified by local detector thread only. 
-		 * Therefore, it is up-to-date even without a lock. 
-		 * 
+		 *
+		 * _rcu_cur_gp is modified by local detector thread only.
+		 * Therefore, it is up-to-date even without a lock.
+		 *
 		 * cpu.last_seen_gp may not be up-to-date. At worst, we will
-		 * unnecessarily sample its last_seen_gp with a smp_call. 
+		 * unnecessarily sample its last_seen_gp with a smp_call.
 		 */
 		bool cpu_acked_gp = (cpus[cpu_id].rcu.last_seen_gp == _rcu_cur_gp);
@@ -1750,5 +1750,5 @@
 		list_append(&THREAD->rcu.preempt_link, &rcu.cur_preempted);
 	} else {
-		/* 
+		/*
 		 * The reader started after the GP started and this cpu
 		 * already noted a quiescent state. We might block the next GP.
@@ -1774,7 +1774,7 @@
 	bool last_removed = now_empty && !prev_empty;
 
-	/* 
-	 * Preempted readers are blocking the detector and 
-	 * this was the last reader blocking the current GP. 
+	/*
+	 * Preempted readers are blocking the detector and
+	 * this was the last reader blocking the current GP.
 	 */
 	if (last_removed && rcu.preempt_blocking_det) {
@@ -1801,5 +1801,5 @@
 		
 		return semaphore_down_interruptable(&rcu.remaining_readers);
-	} 	
+	}
 	
 	return true;
@@ -1821,7 +1821,7 @@
 void rcu_print_stat(void)
 {
-	/* 
-	 * Don't take locks. Worst case is we get out-dated values. 
-	 * CPU local values are updated without any locks, so there 
+	/*
+	 * Don't take locks. Worst case is we get out-dated values.
+	 * CPU local values are updated without any locks, so there
 	 * are no locks to lock in order to get up-to-date values.
 	 */
@@ -1834,9 +1834,9 @@
 	
 	printf("Config: expedite_threshold=%d, critical_threshold=%d,"
-		" detect_sleep=%dms, %s\n",	
+		" detect_sleep=%dms, %s\n",
 		EXPEDITE_THRESHOLD, CRITICAL_THRESHOLD, DETECT_SLEEP_MS, algo);
 	printf("Completed GPs: %" PRIu64 "\n", rcu.completed_gp);
 	printf("Expedited GPs: %zu\n", rcu.stat_expedited_cnt);
-	printf("Delayed GPs:   %zu (cpus w/ still running readers after gp sleep)\n", 
+	printf("Delayed GPs:   %zu (cpus w/ still running readers after gp sleep)\n",
 		rcu.stat_delayed_cnt);
 	printf("Preempt blocked GPs: %zu (waited for preempted readers; "
Index: kernel/generic/src/synch/smp_memory_barrier.c
===================================================================
--- kernel/generic/src/synch/smp_memory_barrier.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/smp_memory_barrier.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -48,5 +48,5 @@
 /** Issues a memory barrier on each cpu that is running a thread of the current
  * task.
- * 
+ *
  * @return Irrelevant.
  */
Index: kernel/generic/src/synch/spinlock.c
===================================================================
--- kernel/generic/src/synch/spinlock.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/spinlock.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -67,5 +67,5 @@
  *
  * Lock spinlock.
- * This version has limitted ability to report 
+ * This version has limitted ability to report
  * possible occurence of deadlock.
  *
Index: kernel/generic/src/synch/waitq.c
===================================================================
--- kernel/generic/src/synch/waitq.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/waitq.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -341,6 +341,6 @@
 		 * Wait for a waitq_wakeup() or waitq_unsleep() to complete
 		 * before returning from waitq_sleep() to the caller. Otherwise
-		 * the caller might expect that the wait queue is no longer used 
-		 * and deallocate it (although the wakeup on a another cpu has 
+		 * the caller might expect that the wait queue is no longer used
+		 * and deallocate it (although the wakeup on a another cpu has
 		 * not yet completed and is using the wait queue).
 		 *
@@ -474,11 +474,11 @@
 
 /** If there is a wakeup in progress actively waits for it to complete.
- * 
+ *
  * The function returns once the concurrently running waitq_wakeup()
- * exits. It returns immediately if there are no concurrent wakeups 
+ * exits. It returns immediately if there are no concurrent wakeups
  * at the time.
- * 
+ *
  * Interrupts must be disabled.
- * 
+ *
  * Example usage:
  * @code
@@ -488,5 +488,5 @@
  *     waitq_wakeup(wq);
  * }
- * void wait_for_completion(void) 
+ * void wait_for_completion(void)
  * {
  *     waitq wg;
@@ -496,14 +496,14 @@
  *     // Wait for callback() to complete its work.
  *     waitq_sleep(&wq);
- *     // callback() completed its work, but it may still be accessing 
- *     // wq in waitq_wakeup(). Therefore it is not yet safe to return 
- *     // from waitq_sleep() or it would clobber up our stack (where wq 
+ *     // callback() completed its work, but it may still be accessing
+ *     // wq in waitq_wakeup(). Therefore it is not yet safe to return
+ *     // from waitq_sleep() or it would clobber up our stack (where wq
  *     // is stored). waitq_sleep() ensures the wait queue is no longer
  *     // in use by invoking waitq_complete_wakeup() internally.
- *     
+ *
  *     // waitq_sleep() returned, it is safe to free wq.
  * }
  * @endcode
- * 
+ *
  * @param wq  Pointer to a wait queue.
  */
Index: kernel/generic/src/synch/workqueue.c
===================================================================
--- kernel/generic/src/synch/workqueue.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/synch/workqueue.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -54,6 +54,6 @@
 
 struct work_queue {
-	/* 
-	 * Protects everything except activate_worker. 
+	/*
+	 * Protects everything except activate_worker.
 	 * Must be acquired after any thread->locks.
 	 */
@@ -93,5 +93,5 @@
 	/* Magic cookie for integrity checks. Immutable. Accessed without lock. */
 	uint32_t cookie;
-#endif 
+#endif
 };
 
@@ -132,5 +132,5 @@
 static void interrupt_workers(struct work_queue *workq);
 static void wait_for_workers(struct work_queue *workq);
-static int _workq_enqueue(struct work_queue *workq, work_t *work_item, 
+static int _workq_enqueue(struct work_queue *workq, work_t *work_item,
 	work_func_t func, bool can_block);
 static void init_work_item(work_t *work_item, work_func_t func);
@@ -150,6 +150,6 @@
 void workq_global_worker_init(void)
 {
-	/* 
-	 * No need for additional synchronization. Stores to word-sized 
+	/*
+	 * No need for additional synchronization. Stores to word-sized
 	 * variables are atomic and the change will eventually propagate.
 	 * Moreover add_worker() includes the necessary memory barriers
@@ -221,5 +221,5 @@
 #ifdef CONFIG_DEBUG
 	workq->cookie = 0;
-#endif 
+#endif
 	
 	free(workq);
@@ -231,5 +231,5 @@
 #ifdef CONFIG_DEBUG
 	workq->cookie = WORKQ_MAGIC;
-#endif 
+#endif
 	
 	irq_spinlock_initialize(&workq->lock, name);
@@ -252,6 +252,6 @@
 }
 
-/** Initializes a work queue. Returns true if successful.  
- * 
+/** Initializes a work queue. Returns true if successful.
+ *
  * Before destroying a work queue it must be stopped via
  * workq_stop().
@@ -268,5 +268,5 @@
 	assert(!workq_corrupted(workq));
 
-	thread_t *thread = thread_create(worker_thread, workq, TASK, 
+	thread_t *thread = thread_create(worker_thread, workq, TASK,
 		THREAD_FLAG_NONE, workq->name);
 	
@@ -297,5 +297,5 @@
 			cpu_id = CPU->id;
 
-		thread->workq = workq;	
+		thread->workq = workq;
 		thread->cpu = &cpus[cpu_id];
 		thread->workq_blocked = false;
@@ -305,5 +305,5 @@
 		list_append(&thread->workq_link, &workq->workers);
 	} else {
-		/* 
+		/*
 		 * Work queue is shutting down - we must not add the worker
 		 * and we cannot destroy it without ready-ing it. Mark it
@@ -330,7 +330,7 @@
 }
 
-/** Shuts down the work queue. Waits for all pending work items to complete.  
- *
- * workq_stop() may only be run once. 
+/** Shuts down the work queue. Waits for all pending work items to complete.
+ *
+ * workq_stop() may only be run once.
  */
 void workq_stop(struct work_queue *workq)
@@ -391,6 +391,6 @@
 }
 
-/** Queues a function into the global wait queue without blocking. 
- * 
+/** Queues a function into the global wait queue without blocking.
+ *
  * See workq_enqueue_noblock() for more details.
  */
@@ -400,6 +400,6 @@
 }
 
-/** Queues a function into the global wait queue; may block. 
- * 
+/** Queues a function into the global wait queue; may block.
+ *
  * See workq_enqueue() for more details.
  */
@@ -409,13 +409,13 @@
 }
 
-/** Adds a function to be invoked in a separate thread without blocking. 
- * 
- * workq_enqueue_noblock() is guaranteed not to block. It is safe 
+/** Adds a function to be invoked in a separate thread without blocking.
+ *
+ * workq_enqueue_noblock() is guaranteed not to block. It is safe
  * to invoke from interrupt handlers.
- * 
+ *
  * Consider using workq_enqueue() instead if at all possible. Otherwise,
- * your work item may have to wait for previously enqueued sleeping 
+ * your work item may have to wait for previously enqueued sleeping
  * work items to complete if you are unlucky.
- * 
+ *
  * @param workq     Work queue where to queue the work item.
  * @param work_item Work item bookkeeping structure. Must be valid
@@ -423,9 +423,9 @@
  * @param func      User supplied function to invoke in a worker thread.
  
- * @return false if work queue is shutting down; function is not 
- *               queued for further processing. 
+ * @return false if work queue is shutting down; function is not
+ *               queued for further processing.
  * @return true  Otherwise. func() will be invoked in a separate thread.
  */
-bool workq_enqueue_noblock(struct work_queue *workq, work_t *work_item, 
+bool workq_enqueue_noblock(struct work_queue *workq, work_t *work_item,
 	work_func_t func)
 {
@@ -433,9 +433,9 @@
 }
 
-/** Adds a function to be invoked in a separate thread; may block. 
- * 
- * While the workq_enqueue() is unlikely to block, it may do so if too 
+/** Adds a function to be invoked in a separate thread; may block.
+ *
+ * While the workq_enqueue() is unlikely to block, it may do so if too
  * many previous work items blocked sleeping.
- * 
+ *
  * @param workq     Work queue where to queue the work item.
  * @param work_item Work item bookkeeping structure. Must be valid
@@ -443,6 +443,6 @@
  * @param func      User supplied function to invoke in a worker thread.
  
- * @return false if work queue is shutting down; function is not 
- *               queued for further processing. 
+ * @return false if work queue is shutting down; function is not
+ *               queued for further processing.
  * @return true  Otherwise. func() will be invoked in a separate thread.
  */
@@ -453,7 +453,7 @@
 
 /** Adds a work item that will be processed by a separate worker thread.
- * 
- * func() will be invoked in another kernel thread and may block. 
- * 
+ *
+ * func() will be invoked in another kernel thread and may block.
+ *
  * Prefer to call _workq_enqueue() with can_block set. Otherwise
  * your work item may have to wait for sleeping work items to complete.
@@ -461,5 +461,5 @@
  * be create without can_block set because creating a thread might
  * block due to low memory conditions.
- * 
+ *
  * @param workq     Work queue where to queue the work item.
  * @param work_item Work item bookkeeping structure. Must be valid
@@ -468,9 +468,9 @@
  * @param can_block May adding this work item block?
  
- * @return false if work queue is shutting down; function is not 
- *               queued for further processing. 
+ * @return false if work queue is shutting down; function is not
+ *               queued for further processing.
  * @return true  Otherwise.
  */
-static int _workq_enqueue(struct work_queue *workq, work_t *work_item, 
+static int _workq_enqueue(struct work_queue *workq, work_t *work_item,
 	work_func_t func, bool can_block)
 {
@@ -493,6 +493,6 @@
 			signal_op = signal_worker_logic(workq, can_block);
 		} else {
-			/* 
-			 * During boot there are no workers to signal. Just queue 
+			/*
+			 * During boot there are no workers to signal. Just queue
 			 * the work and let future workers take care of it.
 			 */
@@ -514,5 +514,5 @@
 #ifdef CONFIG_DEBUG
 	work_item->cookie = WORK_ITEM_MAGIC;
-#endif 
+#endif
 	
 	link_initialize(&work_item->queue_link);
@@ -537,8 +537,8 @@
 	assert(workq->activate_pending <= workq->idle_worker_cnt);
 	
-	/* 
-	 * Workers actively running the work func() this very moment and 
-	 * are neither blocked nor idle. Exclude ->activate_pending workers 
-	 * since they will run their work func() once they get a time slice 
+	/*
+	 * Workers actively running the work func() this very moment and
+	 * are neither blocked nor idle. Exclude ->activate_pending workers
+	 * since they will run their work func() once they get a time slice
 	 * and are not running it right now.
 	 */
@@ -546,7 +546,7 @@
 }
 
-/** 
- * Returns the number of workers that are running or are about to run work 
- * func() and that are not blocked. 
+/**
+ * Returns the number of workers that are running or are about to run work
+ * func() and that are not blocked.
  */
 static size_t active_workers(struct work_queue *workq)
@@ -554,6 +554,6 @@
 	assert(irq_spinlock_locked(&workq->lock));
 	
-	/* 
-	 * Workers actively running the work func() and are neither blocked nor 
+	/*
+	 * Workers actively running the work func() and are neither blocked nor
 	 * idle. ->activate_pending workers will run their work func() once they
 	 * get a time slice after waking from a condvar wait, so count them
@@ -586,9 +586,9 @@
 
 /** Determines how to signal workers if at all.
- * 
+ *
  * @param workq     Work queue where a new work item was queued.
- * @param can_block True if we may block while signaling a worker or creating 
+ * @param can_block True if we may block while signaling a worker or creating
  *                  a new worker.
- * 
+ *
  * @return Function that will notify workers or NULL if no action is needed.
  */
@@ -601,7 +601,7 @@
 	signal_op_t signal_op = NULL;
 
-	/* 
-	 * Workers actively running the work func() and neither blocked nor idle. 
-	 * Including ->activate_pending workers that will run their work func() 
+	/*
+	 * Workers actively running the work func() and neither blocked nor idle.
+	 * Including ->activate_pending workers that will run their work func()
 	 * once they get a time slice.
 	 */
@@ -613,12 +613,12 @@
 	if (max_load < workq->item_cnt) {
 
-		size_t remaining_idle = 
+		size_t remaining_idle =
 			workq->idle_worker_cnt - workq->activate_pending;
 
 		/* Idle workers still exist - activate one. */
 		if (remaining_idle > 0) {
-			/* 
+			/*
 			 * Directly changing idle_worker_cnt here would not allow
-			 * workers to recognize spurious wake-ups. Change 
+			 * workers to recognize spurious wake-ups. Change
 			 * activate_pending instead.
 			 */
@@ -633,5 +633,5 @@
 			if (need_worker && can_block) {
 				signal_op = add_worker_op;
-				/* 
+				/*
 				 * It may take some time to actually create the worker.
 				 * We don't want to swamp the thread pool with superfluous
@@ -642,5 +642,5 @@
 			}
 			
-			/* 
+			/*
 			 * We cannot create a new worker but we need one desperately
 			 * because all workers are blocked in their work functions.
@@ -661,6 +661,6 @@
 		}
 	} else {
-		/* 
-		 * There are enough active/running workers to process the queue. 
+		/*
+		 * There are enough active/running workers to process the queue.
 		 * No need to signal/activate any new workers.
 		 */
@@ -674,7 +674,7 @@
 static void worker_thread(void *arg)
 {
-	/* 
-	 * The thread has been created after the work queue was ordered to stop. 
-	 * Do not access the work queue and return immediately. 
+	/*
+	 * The thread has been created after the work queue was ordered to stop.
+	 * Do not access the work queue and return immediately.
 	 */
 	if (thread_interrupted(THREAD)) {
@@ -760,5 +760,5 @@
 		return (min_worker_cnt <= workq->idle_worker_cnt);
 	} else {
-		/* 
+		/*
 		 * There is work but we are swamped with too many active workers
 		 * that were woken up from sleep at around the same time. We
@@ -854,5 +854,5 @@
 	bool stopping = workq->stopping;
 	bool worker_surplus = worker_unnecessary(workq);
-	const char *load_str = worker_surplus ? "decreasing" : 
+	const char *load_str = worker_surplus ? "decreasing" :
 		(0 < workq->activate_pending) ? "increasing" : "stable";
 	
@@ -869,5 +869,5 @@
 		"Stopping: %d\n"
 		"Load: %s\n",
-		max_worker_cnt, min_worker_cnt, 
+		max_worker_cnt, min_worker_cnt,
 		max_concurrent_workers, max_items_per_worker,
 		total,
@@ -895,5 +895,5 @@
 	
 	while (list_empty(&info->work_queues) && !stop) {
-		errno_t ret = _condvar_wait_timeout_irq_spinlock(&info->req_cv, 
+		errno_t ret = _condvar_wait_timeout_irq_spinlock(&info->req_cv,
 			&info->lock, SYNCH_NO_TIMEOUT, SYNCH_FLAGS_INTERRUPTIBLE);
 		
@@ -902,5 +902,5 @@
 	
 	if (!stop) {
-		*pworkq = list_get_instance(list_first(&info->work_queues), 
+		*pworkq = list_get_instance(list_first(&info->work_queues),
 			struct work_queue, nb_link);
 
@@ -932,5 +932,5 @@
 	list_initialize(&nonblock_adder.work_queues);
 	
-	nonblock_adder.thread = thread_create(thr_nonblock_add_worker, 
+	nonblock_adder.thread = thread_create(thr_nonblock_add_worker,
 		&nonblock_adder, TASK, THREAD_FLAG_NONE, "kworkq-nb");
 	
@@ -938,5 +938,5 @@
 		thread_ready(nonblock_adder.thread);
 	} else {
-		/* 
+		/*
 		 * We won't be able to add workers without blocking if all workers
 		 * sleep, but at least boot the system.
@@ -947,11 +947,11 @@
 
 #ifdef CONFIG_DEBUG
-/** Returns true if the workq is definitely corrupted; false if not sure. 
- * 
+/** Returns true if the workq is definitely corrupted; false if not sure.
+ *
  * Can be used outside of any locks.
  */
 static bool workq_corrupted(struct work_queue *workq)
 {
-	/* 
+	/*
 	 * Needed to make the most current cookie value set by workq_preinit()
 	 * visible even if we access the workq right after it is created but
@@ -963,6 +963,6 @@
 }
 
-/** Returns true if the work_item is definitely corrupted; false if not sure. 
- * 
+/** Returns true if the work_item is definitely corrupted; false if not sure.
+ *
  * Must be used with the work queue protecting spinlock locked.
  */
Index: kernel/generic/src/time/clock.c
===================================================================
--- kernel/generic/src/time/clock.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/time/clock.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -75,5 +75,5 @@
  *
  * The applications (and sometimes kernel) need to access accurate
- * information about realtime data. We allocate 1 page with these 
+ * information about realtime data. We allocate 1 page with these
  * data and update it periodically.
  *
Index: kernel/generic/src/time/delay.c
===================================================================
--- kernel/generic/src/time/delay.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/time/delay.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -51,5 +51,5 @@
 void delay(uint32_t usec)
 {
-	/* 
+	/*
 	 * The delay loop is calibrated for each and every CPU in the system.
 	 * If running in a thread context, it is therefore necessary to disable
Index: kernel/generic/src/udebug/udebug_ipc.c
===================================================================
--- kernel/generic/src/udebug/udebug_ipc.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/generic/src/udebug/udebug_ipc.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -194,5 +194,5 @@
 	IPC_SET_RETVAL(call->data, 0);
 	/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
-	   same code in process_answer() can be used 
+	   same code in process_answer() can be used
 	   (no way to distinguish method in answer) */
 	IPC_SET_ARG1(call->data, uspace_addr);
@@ -239,5 +239,5 @@
 	IPC_SET_RETVAL(call->data, 0);
 	/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
-	   same code in process_answer() can be used 
+	   same code in process_answer() can be used
 	   (no way to distinguish method in answer) */
 	IPC_SET_ARG1(call->data, uspace_addr);
@@ -286,5 +286,5 @@
 	IPC_SET_RETVAL(call->data, 0);
 	/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
-	   same code in process_answer() can be used 
+	   same code in process_answer() can be used
 	   (no way to distinguish method in answer) */
 	IPC_SET_ARG1(call->data, uspace_addr);
@@ -327,5 +327,5 @@
 	IPC_SET_RETVAL(call->data, 0);
 	/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
-	   same code in process_answer() can be used 
+	   same code in process_answer() can be used
 	   (no way to distinguish method in answer) */
 	IPC_SET_ARG1(call->data, uspace_addr);
@@ -368,5 +368,5 @@
 	IPC_SET_RETVAL(call->data, 0);
 	/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
-	   same code in process_answer() can be used 
+	   same code in process_answer() can be used
 	   (no way to distinguish method in answer) */
 	IPC_SET_ARG1(call->data, uspace_addr);
@@ -407,5 +407,5 @@
 	IPC_SET_RETVAL(call->data, 0);
 	/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
-	   same code in process_answer() can be used 
+	   same code in process_answer() can be used
 	   (no way to distinguish method in answer) */
 	IPC_SET_ARG1(call->data, uspace_dst);
@@ -438,5 +438,5 @@
 			IPC_SET_RETVAL(call->data, EINVAL);
 			ipc_answer(&TASK->kb.box, call);
-			return;	
+			return;
 		}
 	}
Index: kernel/test/cht/cht1.c
===================================================================
--- kernel/test/cht/cht1.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/test/cht/cht1.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -180,5 +180,5 @@
 		if (val->unique_id != v[0]->unique_id)
 			return "Found item with a different key.";
-		if (val->mark) 
+		if (val->mark)
 			return "Found twice the same node.";
 		val->mark = true;
@@ -186,5 +186,5 @@
 	
 	for (int i = 0; i < 3; ++i) {
-		if (!v[i]->mark) 
+		if (!v[i]->mark)
 			return "Did not find all duplicates";
 		
@@ -306,5 +306,5 @@
 	.equal = stress_equal,
 	.key_equal = stress_key_equal,
-	.remove_callback = stress_rm_callback	
+	.remove_callback = stress_rm_callback
 };
 
@@ -319,5 +319,5 @@
 			if (!s) {
 				TPRINTF("[out-of-mem]\n");
-				goto out_of_mem;				
+				goto out_of_mem;
 			}
 			
@@ -405,5 +405,5 @@
 					rcu_read_lock();
 					cht_link_t *dup;
-					if (!cht_insert_unique(work->h, &work->elem[elem_idx].link, 
+					if (!cht_insert_unique(work->h, &work->elem[elem_idx].link,
 						&dup)) {
 						TPRINTF("Err: already inserted\n");
@@ -419,5 +419,5 @@
 		} else {
 			rcu_read_lock();
-			cht_link_t *item = 
+			cht_link_t *item =
 				cht_find(work->h, (void*)work->elem[elem_idx].key);
 			rcu_read_unlock();
@@ -525,5 +525,5 @@
 		if (i < op_thread_cnt)
 			thr[i] = thread_create(op_stresser, &pwork[i], TASK, 0, "cht-op-stress");
-		else 
+		else
 			thr[i] = thread_create(resize_stresser, &pwork[i], TASK, 0, "cht-resize");
 		
@@ -567,5 +567,5 @@
 	printf("Basic sanity test: ok.\n");
 	
-	if (!do_stress()) 
+	if (!do_stress())
 		return "CHT stress test failed.";
 	else
Index: kernel/test/smpcall/smpcall1.c
===================================================================
--- kernel/test/smpcall/smpcall1.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/test/smpcall/smpcall1.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -39,7 +39,7 @@
 #include <proc/thread.h>
 
-/* 
- * Maximum total number of smp_calls in the system is: 
- *  162000 == 9^2 * 1000 * 2 
+/*
+ * Maximum total number of smp_calls in the system is:
+ *  162000 == 9^2 * 1000 * 2
  *  == MAX_CPUS^2 * ITERATIONS * EACH_CPU_INC_PER_ITER
  */
@@ -54,7 +54,7 @@
 
 	size_t *pcall_cnt = (size_t*)p;
-	/* 
-	 * No synchronization. Tests if smp_calls makes changes 
-	 * visible to the caller. 
+	/*
+	 * No synchronization. Tests if smp_calls makes changes
+	 * visible to the caller.
 	 */
 	++*pcall_cnt;
@@ -72,7 +72,7 @@
 		/* Synchronous version. */
 		for (unsigned cpu_id = 0; cpu_id < cpu_count; ++cpu_id) {
-			/* 
-			 * smp_call should make changes by inc() visible on this cpu. 
-			 * As a result we can pass it our pcall_cnt and not worry 
+			/*
+			 * smp_call should make changes by inc() visible on this cpu.
+			 * As a result we can pass it our pcall_cnt and not worry
 			 * about other synchronization.
 			 */
@@ -80,6 +80,6 @@
 		}
 		
-		/* 
-		 * Async calls run in parallel on different cpus, so passing the 
+		/*
+		 * Async calls run in parallel on different cpus, so passing the
 		 * same counter would clobber it without additional synchronization.
 		 */
@@ -120,5 +120,5 @@
 	/* Create a wired thread on each cpu. */
 	for (unsigned int id = 0; id < cpu_count; ++id) {
-		thread[id] = thread_create(test_thread, &call_cnt[id], TASK, 
+		thread[id] = thread_create(test_thread, &call_cnt[id], TASK,
 			THREAD_FLAG_NONE, "smp-call-test");
 		
@@ -134,5 +134,5 @@
 	size_t exp_calls_sum = exp_calls * cpu_count;
 	
-	TPRINTF("Running %zu wired threads. Expecting %zu calls. Be patient.\n", 
+	TPRINTF("Running %zu wired threads. Expecting %zu calls. Be patient.\n",
 		running_thread_cnt, exp_calls_sum);
 
@@ -162,5 +162,5 @@
 				TPRINTF("Error: %zu instead of %zu cpu%zu's calls were"
 					" acknowledged.\n", call_cnt[i], exp_calls, i);
-			} 
+			}
 		}
 		
Index: kernel/test/synch/rcu1.c
===================================================================
--- kernel/test/synch/rcu1.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/test/synch/rcu1.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -82,5 +82,5 @@
 	assert(thread[k] == NULL);
 	
-	thread[k] = thread_create(func, arg, TASK, THREAD_FLAG_NONE, 
+	thread[k] = thread_create(func, arg, TASK, THREAD_FLAG_NONE,
 		"test-rcu-thread");
 		
@@ -223,5 +223,5 @@
 	get_seq(10, 1000 * 1000, get_thread_cnt(), seq);
 	
-	TPRINTF("\nRun %zu thr: repeat long reader sections, will preempt, no cbs.\n", 
+	TPRINTF("\nRun %zu thr: repeat long reader sections, will preempt, no cbs.\n",
 		get_thread_cnt());
 	
@@ -273,5 +273,5 @@
 	size_t max_used_mem = sizeof(rcu_item_t) * exp_cnt;
 	
-	TPRINTF("\nRun %zu thr: post %zu no-op callbacks (%zu B used), no readers.\n", 
+	TPRINTF("\nRun %zu thr: post %zu no-op callbacks (%zu B used), no readers.\n",
 		get_thread_cnt(), exp_cnt, max_used_mem);
 	
@@ -414,5 +414,5 @@
 			rcu_read_unlock();
 			
-			if (seq_test_result != EOK) 
+			if (seq_test_result != EOK)
 				return;
 		}
@@ -476,5 +476,5 @@
 	
 	TPRINTF("\nRun %zu th: check callback completion time in readers. "
-		"%zu callbacks total (max %" PRIu64 " %s used). Be patient.\n", 
+		"%zu callbacks total (max %" PRIu64 " %s used). Be patient.\n",
 		get_thread_cnt(), total_cbs, mem_units, mem_suffix);
 	
@@ -490,5 +490,5 @@
 	} else if (seq_test_result == ERACE) {
 		TPRINTF("\nERROR: race detected!!\n");
-	} 
+	}
 	
 	return seq_test_result == EOK;
@@ -531,5 +531,5 @@
 	p->exited = false;
 	
-	run_one(reader_exit, p);	
+	run_one(reader_exit, p);
 	join_one();
 	
@@ -575,6 +575,6 @@
 	rcu_read_unlock();
 
-	/* 
-	 * Start GP after exiting reader section w/ preemption. 
+	/*
+	 * Start GP after exiting reader section w/ preemption.
 	 * Just check that the callback does not lock up and is not lost.
 	 */
@@ -590,7 +590,7 @@
 	
 	TPRINTF("reader_inside_cur{ ");
-	/* 
-	 * Start a GP and try to finish the reader before 
-	 * the GP ends (including preemption). 
+	/*
+	 * Start a GP and try to finish the reader before
+	 * the GP ends (including preemption).
 	 */
 	rcu_call(&p->e.rcu, preempted_unlocked);
@@ -667,6 +667,6 @@
 	rcu_call(&p->e.rcu, preempted_unlocked);
 
-	/* 
-	 * Preempt twice while GP is running after we've been known 
+	/*
+	 * Preempt twice while GP is running after we've been known
 	 * to hold up the GP just to make sure multiple preemptions
 	 * are properly tracked if a reader is delaying the cur GP.
@@ -695,5 +695,5 @@
 	p->result = EOK;
 	
-	run_one(f, p);	
+	run_one(f, p);
 	join_one();
 	
@@ -718,21 +718,21 @@
 	bool ok = true;
 	
-	ok = do_one_reader_preempt(preempted_reader_prev, 
+	ok = do_one_reader_preempt(preempted_reader_prev,
 		"Err: preempted_reader_prev()\n");
 	success = success && ok;
 	
-	ok = do_one_reader_preempt(preempted_reader_inside_cur, 
+	ok = do_one_reader_preempt(preempted_reader_inside_cur,
 		"Err: preempted_reader_inside_cur()\n");
 	success = success && ok;
 	
-	ok = do_one_reader_preempt(preempted_reader_cur, 
+	ok = do_one_reader_preempt(preempted_reader_cur,
 		"Err: preempted_reader_cur()\n");
 	success = success && ok;
 	
-	ok = do_one_reader_preempt(preempted_reader_next1, 
+	ok = do_one_reader_preempt(preempted_reader_next1,
 		"Err: preempted_reader_next1()\n");
 	success = success && ok;
 
-	ok = do_one_reader_preempt(preempted_reader_next2, 
+	ok = do_one_reader_preempt(preempted_reader_next2,
 		"Err: preempted_reader_next2()\n");
 	success = success && ok;
@@ -788,5 +788,5 @@
 	synch->synch_running = false;
 	
-	run_one(synch_reader, synch);	
+	run_one(synch_reader, synch);
 	
 	/* Wait for the reader to enter its critical section. */
@@ -866,5 +866,5 @@
 		rcu_read_unlock();
 		
-		/* 
+		/*
 		 * Do some work outside of the reader section so we are not always
 		 * preempted in the reader section.
@@ -905,6 +905,6 @@
 	size_t cb_per_thread = 1000 * 1000;
 	bool done = false;
-	stress_t master = { .iters = cb_per_thread, .master = true }; 
-	stress_t worker = { .iters = cb_per_thread, .master = false }; 
+	stress_t master = { .iters = cb_per_thread, .master = true };
+	stress_t worker = { .iters = cb_per_thread, .master = false };
 	
 	size_t thread_cnt = min(MAX_THREADS / 2, config.cpu_active);
@@ -921,5 +921,5 @@
 
 	TPRINTF("\nStress: Run %zu nop-readers and %zu updaters. %zu callbacks"
-		" total (max %" PRIu64 " %s used). Be very patient.\n", 
+		" total (max %" PRIu64 " %s used). Be very patient.\n",
 		reader_cnt, updater_cnt, exp_upd_calls, mem_units, mem_suffix);
 	
@@ -1044,11 +1044,11 @@
 		completed_gps += delta_gps;
 
-		if (ok) {  
-			TPRINTF("\nSubtest %s() ok (GPs: %" PRIu64 ").\n", 
+		if (ok) {
+			TPRINTF("\nSubtest %s() ok (GPs: %" PRIu64 ").\n",
 				test_func[i].desc, delta_gps);
 		} else {
 			TPRINTF("\nFailed: %s(). Pausing for 5 secs.\n", test_func[i].desc);
 			thread_sleep(5);
-		} 
+		}
 	}
 
Index: kernel/test/synch/semaphore2.c
===================================================================
--- kernel/test/synch/semaphore2.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/test/synch/semaphore2.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -75,5 +75,5 @@
 	}
 	
-	TPRINTF("cpu%u, tid %" PRIu64 " down=\n", CPU->id, THREAD->tid);	
+	TPRINTF("cpu%u, tid %" PRIu64 " down=\n", CPU->id, THREAD->tid);
 	thread_usleep(random(30000));
 	
Index: kernel/test/synch/workq-test-core.h
===================================================================
--- kernel/test/synch/workq-test-core.h	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/test/synch/workq-test-core.h	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -111,7 +111,7 @@
 		--work->count_down;
 
-		/* 
-		 * Enqueue a child if count_down is power-of-2. 
-		 * Leads to exponential growth. 
+		/*
+		 * Enqueue a child if count_down is power-of-2.
+		 * Leads to exponential growth.
 		 */
 		if (is_pow2(work->count_down + 1)) {
@@ -124,5 +124,5 @@
 		
 		if (!core_workq_enqueue(work_item, reproduce)) {
-			if (work->master) 
+			if (work->master)
 				TPRINTF("\nErr: Master work item exiting prematurely!\n");
 
@@ -161,5 +161,5 @@
 	 * k == COUNT_POW
 	 * 2^k == COUNT + 1
-	 * 
+	 *
 	 * We have "k" branching points. Therefore:
 	 * exp_call_cnt == k*2^(k-1) + 2^k == (k + 2) * 2^(k-1)
@@ -167,5 +167,5 @@
 	size_t exp_call_cnt = (COUNT_POW + 2) * (1 << (COUNT_POW - 1));
 	
-	TPRINTF("waves: %d, count_down: %d, total expected calls: %zu\n", 
+	TPRINTF("waves: %d, count_down: %d, total expected calls: %zu\n",
 		WAVES, COUNT, exp_call_cnt * WAVES);
 	
@@ -179,5 +179,5 @@
 	
 	for (int i = 0; i < WAVES; ++i) {
-		while (atomic_get(&call_cnt[i]) < exp_call_cnt 
+		while (atomic_get(&call_cnt[i]) < exp_call_cnt
 			&& sleep_cnt < max_sleep_cnt) {
 			TPRINTF(".");
@@ -197,5 +197,5 @@
 			TPRINTF("Error: %" PRIua " calls in wave %d, but %zu expected.\n",
 				atomic_get(&call_cnt[i]), i, exp_call_cnt);
-		} 
+		}
 	}
 	
Index: kernel/test/synch/workqueue3.c
===================================================================
--- kernel/test/synch/workqueue3.c	(revision a211838659e5f36770cab316785a73bb49c1fca5)
+++ kernel/test/synch/workqueue3.c	(revision 1b20da07baaa3e3c424f62c927274e676e4295cd)
@@ -63,5 +63,5 @@
 		TPRINTF("\nSecond run:\n");
 		err = run_workq_core(exit_early);
-	} 
+	}
 
 	TPRINTF("Done.\n");
