Index: Makefile
===================================================================
--- Makefile	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ Makefile	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -63,5 +63,5 @@
 endif
 ifeq ($(CONFIG_DEBUG_SPINLOCK),y)
-	DEFS += -DDEBUG_SPINLOCK
+	DEFS += -DCONFIG_DEBUG_SPINLOCK
 endif
 
Index: arch/amd64/Makefile.inc
===================================================================
--- arch/amd64/Makefile.inc	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/amd64/Makefile.inc	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -61,11 +61,11 @@
 
 ifeq ($(CONFIG_SMP),y)
-	DEFS += -DSMP
+	DEFS += -DCONFIG_SMP
 endif
 ifeq ($(CONFIG_HT),y)
-	DEFS += -DHT
+	DEFS += -DCONFIG_HT
 endif
 ifeq ($(CONFIG_FPU_LAZY),y)
-	DEFS += -DFPU_LAZY
+	DEFS += -DCONFIG_FPU_LAZY
 endif
 
Index: arch/amd64/src/amd64.c
===================================================================
--- arch/amd64/src/amd64.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/amd64/src/amd64.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -76,8 +76,8 @@
 		trap_register(VECTOR_SYSCALL, syscall);
 		
-		#ifdef __SMP__
+		#ifdef CONFIG_SMP
 		trap_register(VECTOR_TLB_SHOOTDOWN_IPI, tlb_shootdown_ipi);
 		trap_register(VECTOR_WAKEUP_IPI, wakeup_ipi);
-		#endif /* __SMP__ */
+		#endif /* CONFIG_SMP */
 	}
 }
@@ -95,7 +95,7 @@
 		memory_print_map();
 		
-		#ifdef __SMP__
+		#ifdef CONFIG_SMP
 		acpi_init();
-		#endif /* __SMP__ */
+		#endif /* CONFIG_SMP */
 	}
 }
Index: arch/amd64/src/interrupt.c
===================================================================
--- arch/amd64/src/interrupt.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/amd64/src/interrupt.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -140,5 +140,5 @@
 void nm_fault(__u8 n, __native stack[])
 {
-#ifdef FPU_LAZY     
+#ifdef CONFIG_FPU_LAZY     
 	scheduler_fpu_lazy_request();
 #else
Index: arch/amd64/src/smp/ap.S
===================================================================
--- arch/amd64/src/smp/ap.S	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/amd64/src/smp/ap.S	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -40,5 +40,5 @@
 .section K_TEXT_START_2, "ax"
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 .global ap_boot
@@ -101,3 +101,3 @@
 	
 	
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: arch/ia32/Makefile.inc
===================================================================
--- arch/ia32/Makefile.inc	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/Makefile.inc	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -80,11 +80,11 @@
 
 ifeq ($(CONFIG_SMP),y)
-	DEFS += -DSMP
+	DEFS += -DCONFIG_SMP
 endif
 ifeq ($(CONFIG_HT),y)
-	DEFS += -DHT
+	DEFS += -DCONFIG_HT
 endif
 ifeq ($(CONFIG_FPU_LAZY),y)
-	DEFS += -DFPU_LAZY
+	DEFS += -DCONFIG_FPU_LAZY
 endif
 
Index: arch/ia32/include/atomic.h
===================================================================
--- arch/ia32/include/atomic.h	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/include/atomic.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -33,17 +33,17 @@
 
 static inline void atomic_inc(volatile int *val) {
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 	__asm__ volatile ("lock incl %0\n" : "=m" (*val));
 #else
 	__asm__ volatile ("incl %0\n" : "=m" (*val));
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 }
 
 static inline void atomic_dec(volatile int *val) {
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 	__asm__ volatile ("lock decl %0\n" : "=m" (*val));
 #else
 	__asm__ volatile ("decl %0\n" : "=m" (*val));
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 }
 
Index: arch/ia32/src/atomic.S
===================================================================
--- arch/ia32/src/atomic.S	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/atomic.S	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -29,5 +29,5 @@
 .text
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 .global spinlock_arch
@@ -43,5 +43,5 @@
 
 0:	
-	#ifdef __HT__
+	#ifdef CONFIG_HT
 	pause			# Pentium 4's with HT love this instruction
 	#endif
Index: arch/ia32/src/ia32.c
===================================================================
--- arch/ia32/src/ia32.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/ia32.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -63,8 +63,8 @@
 		trap_register(VECTOR_SYSCALL, syscall);
 		
-		#ifdef __SMP__
+		#ifdef CONFIG_SMP
 		trap_register(VECTOR_TLB_SHOOTDOWN_IPI, tlb_shootdown_ipi);
 		trap_register(VECTOR_WAKEUP_IPI, wakeup_ipi);
-		#endif /* __SMP__ */
+		#endif /* CONFIG_SMP */
 	}
 }
@@ -82,7 +82,7 @@
 		memory_print_map();
 		
-		#ifdef __SMP__
+		#ifdef CONFIG_SMP
 		acpi_init();
-		#endif /* __SMP__ */
+		#endif /* CONFIG_SMP */
 	}
 }
Index: arch/ia32/src/interrupt.c
===================================================================
--- arch/ia32/src/interrupt.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/interrupt.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -111,5 +111,5 @@
 void nm_fault(__u8 n, __native stack[])
 {
-#ifdef FPU_LAZY     
+#ifdef CONFIG_FPU_LAZY     
 	scheduler_fpu_lazy_request();
 #else
Index: arch/ia32/src/smp/ap.S
===================================================================
--- arch/ia32/src/smp/ap.S	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/smp/ap.S	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -33,5 +33,5 @@
 .section K_TEXT_START_2, "ax"
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 .global ap_boot
@@ -74,3 +74,3 @@
 	jmpl $KTEXT, $main_ap
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: arch/ia32/src/smp/apic.c
===================================================================
--- arch/ia32/src/smp/apic.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/smp/apic.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -38,5 +38,5 @@
 #include <arch.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 /*
@@ -417,3 +417,3 @@
 }
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: arch/ia32/src/smp/ipi.c
===================================================================
--- arch/ia32/src/smp/ipi.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/smp/ipi.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -27,5 +27,5 @@
  */
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 #include <smp/ipi.h>
@@ -37,3 +37,3 @@
 }
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: arch/ia32/src/smp/mps.c
===================================================================
--- arch/ia32/src/smp/mps.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/smp/mps.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -27,5 +27,5 @@
  */
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 #include <config.h>
@@ -423,3 +423,3 @@
 }
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: arch/ia32/src/smp/smp.c
===================================================================
--- arch/ia32/src/smp/smp.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/ia32/src/smp/smp.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -48,5 +48,5 @@
 #include <arch/i8259.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 static struct smp_config_operations *ops = NULL;
@@ -166,3 +166,3 @@
 }
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: arch/mips32/Makefile.inc
===================================================================
--- arch/mips32/Makefile.inc	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/mips32/Makefile.inc	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -103,5 +103,5 @@
 
 ifeq ($(CONFIG_FPU_LAZY),y)
-	DEFS += -DFPU_LAZY
+	DEFS += -DCONFIG_FPU_LAZY
 endif
 
Index: arch/mips32/src/exception.c
===================================================================
--- arch/mips32/src/exception.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ arch/mips32/src/exception.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -74,5 +74,5 @@
 			break;
  	 	case EXC_CpU:
-#ifdef FPU_LAZY     
+#ifdef CONFIG_FPU_LAZY     
 			if (cp0_cause_coperr(cause) == fpu_cop_id)
 				scheduler_fpu_lazy_request();
Index: genarch/src/acpi/matd.c
===================================================================
--- genarch/src/acpi/matd.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ genarch/src/acpi/matd.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -43,5 +43,5 @@
 struct acpi_madt *acpi_madt = NULL;
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 static void madt_l_apic_entry(struct madt_l_apic *la, __u32 index);
@@ -211,3 +211,3 @@
 
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: generic/include/cpu.h
===================================================================
--- generic/include/cpu.h	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/include/cpu.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -53,8 +53,8 @@
 	link_t timeout_active_head;
 
-	#ifdef __SMP__
+	#ifdef CONFIG_SMP
 	int kcpulbstarted;
 	waitq_t kcpulb_wq;
-	#endif /* __SMP__ */
+	#endif /* CONFIG_SMP */
 
 	int id;
Index: generic/include/mm/tlb.h
===================================================================
--- generic/include/mm/tlb.h	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/include/mm/tlb.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -34,5 +34,5 @@
 extern void tlb_init(void);
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 extern void tlb_shootdown_start(void);
 extern void tlb_shootdown_finalize(void);
@@ -42,5 +42,5 @@
 #  define tlb_shootdown_finalize()	;
 #  define tlb_shootdown_ipi_recv() ;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 
 /* Export TLB interface that each architecture must implement. */
Index: generic/include/smp/ipi.h
===================================================================
--- generic/include/smp/ipi.h	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/include/smp/ipi.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -30,10 +30,10 @@
 #define __IPI_H__
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 extern void ipi_broadcast(int ipi);
 extern void ipi_broadcast_arch(int ipi);
 #else
 #define ipi_broadcast(x)	;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 
 #endif
Index: generic/include/smp/smp.h
===================================================================
--- generic/include/smp/smp.h	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/include/smp/smp.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -30,9 +30,9 @@
 #define __SMP_H__
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 extern void smp_init(void);
 #else
 #define smp_init()	;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 
 #endif /* __SMP_H__ */
Index: generic/include/synch/spinlock.h
===================================================================
--- generic/include/synch/spinlock.h	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/include/synch/spinlock.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -34,5 +34,5 @@
 #include <preemption.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 struct spinlock {
 	int val;
Index: generic/src/cpu/cpu.c
===================================================================
--- generic/src/cpu/cpu.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/cpu/cpu.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -50,7 +50,7 @@
 	int i, j;
 	
-	#ifdef __SMP__
+	#ifdef CONFIG_SMP
 	if (config.cpu_active == 1) {
-	#endif /* __SMP__ */
+	#endif /* CONFIG_SMP */
 		cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count);
 		if (!cpus)
@@ -67,5 +67,5 @@
 			cpus[i].id = i;
 			
-			#ifdef __SMP__
+			#ifdef CONFIG_SMP
 			waitq_initialize(&cpus[i].kcpulb_wq);
 			#endif /* __SMP */
@@ -76,7 +76,7 @@
 		}
 		
-	#ifdef __SMP__
+	#ifdef CONFIG_SMP
 	}
-	#endif /* __SMP__ */
+	#endif /* CONFIG_SMP */
 
 	CPU = &cpus[config.cpu_active-1];
Index: generic/src/main/kinit.c
===================================================================
--- generic/src/main/kinit.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/main/kinit.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -44,7 +44,7 @@
 #include <memstr.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 #include <arch/smp/mps.h>
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 
 #include <synch/waitq.h>
@@ -67,5 +67,5 @@
 	interrupts_disable();
 
-#ifdef __SMP__		 	
+#ifdef CONFIG_SMP		 	
 	if (config.cpu_count > 1) {
 		/*
@@ -85,5 +85,5 @@
 		else panic("thread_create/kmp");
 	}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 	/*
 	 * Now that all CPUs are up, we can report what we've found.
@@ -96,5 +96,5 @@
 	}
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 	if (config.cpu_count > 1) {
 		/*
@@ -114,5 +114,5 @@
 		}
 	}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 
 	interrupts_enable();
Index: generic/src/main/main.c
===================================================================
--- generic/src/main/main.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/main/main.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -40,8 +40,8 @@
 #include <align.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 #include <arch/smp/apic.h>
 #include <arch/smp/mps.h>
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
 
 #include <smp/smp.h>
@@ -203,5 +203,5 @@
 
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 /** Application CPUs main kernel routine
  *
@@ -269,3 +269,3 @@
 	/* not reached */
 }
-#endif /* __SMP__*/
+#endif /* CONFIG_SMP */
Index: generic/src/mm/tlb.c
===================================================================
--- generic/src/mm/tlb.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/mm/tlb.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -37,5 +37,5 @@
 #include <arch.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 static spinlock_t tlblock;
 #endif
@@ -49,5 +49,5 @@
 }
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 /* must be called with interrupts disabled */
 void tlb_shootdown_start(void)
@@ -85,3 +85,3 @@
 	CPU->tlb_active = 1;
 }
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: generic/src/proc/scheduler.c
===================================================================
--- generic/src/proc/scheduler.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/proc/scheduler.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -62,5 +62,5 @@
 {
 	before_thread_runs_arch();
-#ifdef FPU_LAZY
+#ifdef CONFIG_FPU_LAZY
 	if(THREAD==CPU->fpu_owner) 
 		fpu_enable();
@@ -78,5 +78,5 @@
 }
 
-#ifdef FPU_LAZY
+#ifdef CONFIG_FPU_LAZY
 void scheduler_fpu_lazy_request(void)
 {
@@ -135,5 +135,5 @@
 	
 	if (n == 0) {
-		#ifdef __SMP__
+		#ifdef CONFIG_SMP
 		/*
 		 * If the load balancing thread is not running, wake it up and
@@ -144,5 +144,5 @@
 			goto loop;
 		}
-		#endif /* __SMP__ */
+		#endif /* CONFIG_SMP */
 		
 		/*
@@ -413,5 +413,5 @@
 	if (THREAD) {
 		spinlock_lock(&THREAD->lock);
-#ifndef FPU_LAZY
+#ifndef CONFIG_FPU_LAZY
 		fpu_context_save(&(THREAD->saved_fpu_context));
 #endif
@@ -463,5 +463,5 @@
 
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 /** Load balancing thread
  *
@@ -624,3 +624,3 @@
 }
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: generic/src/smp/ipi.c
===================================================================
--- generic/src/smp/ipi.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/smp/ipi.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -27,5 +27,5 @@
  */
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 #include <smp/ipi.h>
@@ -45,5 +45,5 @@
 	 * Provisions must be made to avoid sending IPI:
 	 * - before all CPU's were configured to accept the IPI
-	 * - if there is only one CPU but the kernel was compiled with __SMP__
+	 * - if there is only one CPU but the kernel was compiled with CONFIG_SMP
 	 */
 
@@ -52,3 +52,3 @@
 }
 
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
Index: generic/src/synch/spinlock.c
===================================================================
--- generic/src/synch/spinlock.c	(revision 389f41e06a14f0aba9a75b27009ea4d49471a04d)
+++ generic/src/synch/spinlock.c	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
@@ -35,5 +35,5 @@
 #include <debug.h>
 
-#ifdef __SMP__
+#ifdef CONFIG_SMP
 
 /** Initialize spinlock
@@ -48,5 +48,5 @@
 }
 
-#ifdef DEBUG_SPINLOCK
+#ifdef CONFIG_DEBUG_SPINLOCK
 /** Lock spinlock
  *
