Index: kernel/arch/mips32/Makefile.inc
===================================================================
--- kernel/arch/mips32/Makefile.inc	(revision ae318d3535cba06a6996f270db31a961fae402ad)
+++ kernel/arch/mips32/Makefile.inc	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
@@ -38,5 +38,5 @@
 GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss
 
-DEFS += -D__32_BITS__ -D$(MACHINE) -DKERNEL_LOAD_ADDRESS=$(KERNEL_LOAD_ADDRESS)
+DEFS += -D__32_BITS__ -DKERNEL_LOAD_ADDRESS=$(KERNEL_LOAD_ADDRESS)
 
 ## Accepted MACHINEs
Index: kernel/arch/mips32/_link.ld.in
===================================================================
--- kernel/arch/mips32/_link.ld.in	(revision ae318d3535cba06a6996f270db31a961fae402ad)
+++ kernel/arch/mips32/_link.ld.in	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
@@ -1,14 +1,14 @@
 /*
- *  MIPS32 linker script
- *  
+ * MIPS32 linker script
+ *
  *  kernel text
  *  kernel data
- *  
+ *
  */
+
 #undef mips
 #define mips mips
 
 OUTPUT_ARCH(mips)
-
 ENTRY(kernel_image_start)
 
@@ -22,7 +22,7 @@
 	.data : {
 		kdata_start = .;
-		*(.data);		/* initialized data */
+		*(.data);                       /* initialized data */
 		hardcoded_ktext_size = .;
-		LONG(ktext_end - ktext_start);	
+		LONG(ktext_end - ktext_start);
 		hardcoded_kdata_size = .;
 		LONG(kdata_end - kdata_start);
@@ -34,20 +34,20 @@
 		*(.sbss);
 		*(.scommon);
-		*(.bss);		/* uninitialized static variables */
-		*(COMMON); 		/* global variables */
+		*(.bss);                        /* uninitialized static variables */
+		*(COMMON);                      /* global variables */
 		symbol_table = .;
-		*(symtab.*);             
+		*(symtab.*);
 	}
 	_gp = . + 0x8000;
 	.lit8 : { *(.lit8) }
 	.lit4 : { *(.lit4) }
-
+	
 	kdata_end = .;
-
+	
 	/DISCARD/ : {
-	  *(.mdebug*);
-	  *(.pdr);
-	  *(.comment);
-	  *(.note);
+		*(.mdebug*);
+		*(.pdr);
+		*(.comment);
+		*(.note);
 	}
 }
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision ae318d3535cba06a6996f270db31a961fae402ad)
+++ kernel/arch/mips32/src/mips32.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
@@ -138,17 +138,17 @@
 #endif
 
-#ifdef msim
+#ifdef MACHINE_msim
 	sysinfo_set_item_val("machine.msim", NULL, 1);
 #endif
 
-#ifdef simics
+#ifdef MACHINE_simics
 	sysinfo_set_item_val("machine.simics", NULL, 1);
 #endif
 
-#ifdef bgxemul
+#ifdef MACHINE_bgxemul
 	sysinfo_set_item_val("machine.bgxemul", NULL, 1);
 #endif
 
-#ifdef lgxemul
+#ifdef MACHINE_lgxemul
 	sysinfo_set_item_val("machine.lgxemul", NULL, 1);
 #endif
Index: kernel/arch/mips32/src/mm/frame.c
===================================================================
--- kernel/arch/mips32/src/mm/frame.c	(revision ae318d3535cba06a6996f270db31a961fae402ad)
+++ kernel/arch/mips32/src/mm/frame.c	(revision e94f73024eba70717a6d02d1511d2440ec61e6cd)
@@ -78,5 +78,5 @@
 static bool frame_available(pfn_t frame)
 {
-#ifdef msim
+#ifdef MACHINE_msim
 	/* MSIM device (dprinter) */
 	if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH))
@@ -88,5 +88,5 @@
 #endif
 
-#ifdef simics
+#ifdef MACHINE_simics
 	/* Simics device (serial line) */
 	if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH))
@@ -94,5 +94,5 @@
 #endif
 
-#if defined(lgxemul) || defined(bgxemul)
+#if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul)
 	/* gxemul devices */
 	if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE,
