Index: boot/Makefile.build
===================================================================
--- boot/Makefile.build	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ boot/Makefile.build	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -85,11 +85,11 @@
 
 $(LINK): | depend
-	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $(LINK).in | grep -v "^\#" > $(LINK)
+	$(CC) $(DEFS) $(CFLAGS) -D__ASSEMBLER__ -D__LINKER__ -E -x c $(LINK).in | grep -v "^\#" > $(LINK)
 
 %.o: %.s | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
 
 %.o: %.S | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
 
 %.o: %.c | depend
Index: boot/arch/arm32/include/arch/arch.h
===================================================================
--- boot/arch/arm32/include/arch/arch.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ boot/arch/arm32/include/arch/arch.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -62,5 +62,5 @@
 #endif
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #define PA2KA(addr)  (((uintptr_t) (addr)) + PA_OFFSET)
 #else
Index: boot/arch/mips32/include/arch/arch.h
===================================================================
--- boot/arch/mips32/include/arch/arch.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ boot/arch/mips32/include/arch/arch.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -55,5 +55,5 @@
 #endif
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #define PA2KA(addr)    (((uintptr_t) (addr)) + 0x80000000)
 #define PA2KSEG(addr)  (((uintptr_t) (addr)) + 0xa0000000)
Index: boot/arch/mips32/src/Makefile.build
===================================================================
--- boot/arch/mips32/src/Makefile.build	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ boot/arch/mips32/src/Makefile.build	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -65,7 +65,7 @@
 
 %.o: %.S $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
+	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
 ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
+	$(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS)
 endif
 
Index: boot/arch/ppc32/include/arch/arch.h
===================================================================
--- boot/arch/ppc32/include/arch/arch.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ boot/arch/ppc32/include/arch/arch.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -37,5 +37,5 @@
 #define LOADER_ADDRESS  0x08000000
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #define PA2KA(addr)  (((uintptr_t) (addr)) + 0x80000000)
 #else
Index: boot/arch/riscv64/include/arch/mm.h
===================================================================
--- boot/arch/riscv64/include/arch/mm.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ boot/arch/riscv64/include/arch/mm.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -33,5 +33,5 @@
 #define BOOT_riscv64_MM_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffff800000000000))
 #define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffff800000000000))
Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/Makefile	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -400,5 +400,5 @@
 
 $(LINK): $(LINK).in | depend
-	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
+	$(CC) $(DEFS) $(CFLAGS) -D__ASSEMBLER__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@
 
 %.h: %.ag
@@ -408,8 +408,8 @@
 
 %.o: %.S | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
 
 %.o: %.s | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(AS_CFLAGS)
 
 %.o: %.c | depend
Index: kernel/arch/amd64/include/arch/boot/boot.h
===================================================================
--- kernel/arch/amd64/include/arch/boot/boot.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/boot/boot.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -40,5 +40,5 @@
 #define BOOT_STACK_SIZE  0x000400
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_SMP
@@ -49,5 +49,5 @@
 #endif /* CONFIG_SMP */
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/amd64/include/arch/cpu.h
===================================================================
--- kernel/arch/amd64/include/arch/cpu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/cpu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -79,5 +79,5 @@
 #define AMD_MSR_GS_KERNEL	0xc0000102
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/pm.h>
@@ -103,5 +103,5 @@
 void cpu_setup_fpu(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/amd64/include/arch/cpuid.h
===================================================================
--- kernel/arch/amd64/include/arch/cpuid.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/cpuid.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -46,5 +46,5 @@
 #define INTEL_FXSAVE          24
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -61,5 +61,5 @@
 extern void cpuid(uint32_t cmd, cpu_info_t *info);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 #endif
 
Index: kernel/arch/amd64/include/arch/mm/frame.h
===================================================================
--- kernel/arch/amd64/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define FRAME_LOWPRIO  0x1000
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 extern void frame_low_arch_init(void);
@@ -47,5 +47,5 @@
 extern void physmem_print(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/amd64/include/arch/mm/page.h
===================================================================
--- kernel/arch/amd64/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -44,15 +44,15 @@
 #ifdef MEMORY_MODEL_kernel
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffffffff80000000))
 #define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffffffff80000000))
 
-#else /* __ASM__ */
+#else /* __ASSEMBLER__ */
 
 #define KA2PA(x)  ((x) - 0xffffffff80000000)
 #define PA2KA(x)  ((x) + 0xffffffff80000000)
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* MEMORY_MODEL_kernel */
@@ -60,15 +60,15 @@
 #ifdef MEMORY_MODEL_large
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffff800000000000))
 #define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffff800000000000))
 
-#else /* __ASM__ */
+#else /* __ASSEMBLER__ */
 
 #define KA2PA(x)  ((x) - 0xffff800000000000)
 #define PA2KA(x)  ((x) + 0xffff800000000000)
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif /* MEMORY_MODEL_large */
@@ -162,5 +162,5 @@
 	((p)->no_execute == 0)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <mm/mm.h>
@@ -255,5 +255,5 @@
 extern void page_fault(unsigned int, istate_t *);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/amd64/include/arch/pm.h
===================================================================
--- kernel/arch/amd64/include/arch/pm.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/pm.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -36,5 +36,5 @@
 #define KERN_amd64_PM_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 	#include <typedefs.h>
 	#include <arch/context.h>
@@ -88,5 +88,5 @@
 #define IO_PORTS  (64 * 1024)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 typedef struct {
@@ -180,5 +180,5 @@
 extern void tss_initialize(tss_t *t);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/amd64/include/arch/vreg.h
===================================================================
--- kernel/arch/amd64/include/arch/vreg.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/amd64/include/arch/vreg.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -38,5 +38,5 @@
 #define VREG_TP	0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -46,5 +46,5 @@
 extern void vreg_init(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/arm32/include/arch/context.h
===================================================================
--- kernel/arch/arm32/include/arch/context.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/arm32/include/arch/context.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -51,7 +51,7 @@
 	} while (0)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/arm32/include/arch/mm/frame.h
===================================================================
--- kernel/arch/arm32/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/arm32/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -42,5 +42,5 @@
 #define FRAME_LOWPRIO  0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #define BOOT_PAGE_TABLE_SIZE     0x4000
@@ -81,5 +81,5 @@
 #define physmem_print()
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/arm32/include/arch/mm/page.h
===================================================================
--- kernel/arch/arm32/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/arm32/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -48,5 +48,5 @@
 
 #if (defined MACHINE_beagleboardxm) || (defined MACHINE_beaglebone)
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #	define KA2PA(x)	((uintptr_t) (x))
 #	define PA2KA(x)	((uintptr_t) (x))
@@ -56,5 +56,5 @@
 #endif
 #else
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #	define KA2PA(x)	(((uintptr_t) (x)) - 0x80000000)
 #	define PA2KA(x)	(((uintptr_t) (x)) + 0x80000000)
Index: kernel/arch/arm32/include/arch/mm/page_armv4.h
===================================================================
--- kernel/arch/arm32/include/arch/mm/page_armv4.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/arm32/include/arch/mm/page_armv4.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -54,5 +54,5 @@
 	1
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 /** Level 0 page table entry. */
@@ -254,5 +254,5 @@
 
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/arm32/include/arch/mm/page_armv6.h
===================================================================
--- kernel/arch/arm32/include/arch/mm/page_armv6.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/arm32/include/arch/mm/page_armv6.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -54,5 +54,5 @@
 	(((pte_t *) (pte))->l1.descriptor_type != PTE_DESCRIPTOR_SMALL_PAGE_NX)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 /** Level 0 page table entry. */
@@ -319,5 +319,5 @@
 extern void page_arch_init(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia32/include/arch/boot/boot.h
===================================================================
--- kernel/arch/ia32/include/arch/boot/boot.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/boot/boot.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -40,5 +40,5 @@
 #define BOOT_STACK_SIZE  0x0400
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #ifdef CONFIG_SMP
@@ -49,5 +49,5 @@
 #endif /* CONFIG_SMP */
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia32/include/arch/boot/memmap.h
===================================================================
--- kernel/arch/ia32/include/arch/boot/memmap.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/boot/memmap.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -61,5 +61,5 @@
 #define MEMMAP_E820_MAX_RECORDS  32
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
Index: kernel/arch/ia32/include/arch/cpu.h
===================================================================
--- kernel/arch/ia32/include/arch/cpu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/cpu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -64,5 +64,5 @@
 #define IA32_MSR_SYSENTER_EIP	0x176
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/pm.h>
Index: kernel/arch/ia32/include/arch/cpuid.h
===================================================================
--- kernel/arch/ia32/include/arch/cpuid.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/cpuid.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define INTEL_SEP             11
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/cpu.h>
@@ -116,5 +116,5 @@
 }
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 #endif
 
Index: kernel/arch/ia32/include/arch/mm/frame.h
===================================================================
--- kernel/arch/ia32/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define FRAME_LOWPRIO  0x1000
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 extern void frame_low_arch_init(void);
@@ -47,5 +47,5 @@
 extern void physmem_print(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia32/include/arch/mm/page.h
===================================================================
--- kernel/arch/ia32/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -50,15 +50,15 @@
 #define PDE_4M		(1 << 7)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #define KA2PA(x)  (((uintptr_t) (x)) - UINT32_C(0x80000000))
 #define PA2KA(x)  (((uintptr_t) (x)) + UINT32_C(0x80000000))
 
-#else /* __ASM__ */
+#else /* __ASSEMBLER__ */
 
 #define KA2PA(x)  ((x) - 0x80000000)
 #define PA2KA(x)  ((x) + 0x80000000)
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 /*
@@ -142,5 +142,5 @@
 #define PTE_EXECUTABLE_ARCH(p)  1
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <mm/mm.h>
@@ -220,5 +220,5 @@
 extern void page_fault(unsigned int, istate_t *);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia32/include/arch/pm.h
===================================================================
--- kernel/arch/ia32/include/arch/pm.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/pm.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -81,5 +81,5 @@
 #define IO_PORTS  (64 * 1024)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <typedefs.h>
@@ -170,5 +170,5 @@
 extern void tss_initialize(tss_t *t);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia32/include/arch/smp/apic.h
===================================================================
--- kernel/arch/ia32/include/arch/smp/apic.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/smp/apic.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -39,5 +39,5 @@
 #define IO_APIC_BASE	0xfec00000
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <cpu.h>
@@ -369,5 +369,5 @@
 extern void io_apic_enable_irqs(uint16_t);
 
-#endif	/* __ASM__ */
+#endif	/* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia32/include/arch/vreg.h
===================================================================
--- kernel/arch/ia32/include/arch/vreg.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia32/include/arch/vreg.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -38,5 +38,5 @@
 #define VREG_TP	0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -46,5 +46,5 @@
 extern void vreg_init(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia64/include/arch/interrupt.h
===================================================================
--- kernel/arch/ia64/include/arch/interrupt.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia64/include/arch/interrupt.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -36,5 +36,5 @@
 #define KERN_ia64_INTERRUPT_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #include <arch/istate.h>
 #include <stdint.h>
@@ -83,5 +83,5 @@
 #define EOI  0  /**< The actual value doesn't matter. */
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 extern void *ivt;
 
Index: kernel/arch/ia64/include/arch/mm/asid.h
===================================================================
--- kernel/arch/ia64/include/arch/mm/asid.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia64/include/arch/mm/asid.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -36,5 +36,5 @@
 #define KERN_ia64_ASID_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -43,5 +43,5 @@
 typedef uint32_t rid_t;
 
-#endif  /* __ASM__ */
+#endif  /* __ASSEMBLER__ */
 
 /**
Index: kernel/arch/ia64/include/arch/mm/frame.h
===================================================================
--- kernel/arch/ia64/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia64/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define FRAME_LOWPRIO  0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <typedefs.h>
@@ -51,5 +51,5 @@
 #define physmem_print()
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia64/include/arch/mm/page.h
===================================================================
--- kernel/arch/ia64/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia64/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -39,5 +39,5 @@
 #include <arch/mm/frame.h>
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #include <assert.h>
 #endif
@@ -55,5 +55,5 @@
 #define VA2VRN(va)  ((va) >> VRN_SHIFT)
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 	#define VRN_KERNEL  7
 #else
@@ -84,5 +84,5 @@
 #define AR_WRITE    0x02
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/mm/as.h>
@@ -297,5 +297,5 @@
 extern void vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, int flags);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ia64/include/arch/register.h
===================================================================
--- kernel/arch/ia64/include/arch/register.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ia64/include/arch/register.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -143,5 +143,5 @@
 /* CR82-CR127 are reserved */
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 /** Processor Status Register. */
@@ -269,5 +269,5 @@
 } cpuid3_t;
 
-#endif /* !__ASM__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
Index: kernel/arch/mips32/include/arch/mm/frame.h
===================================================================
--- kernel/arch/mips32/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/mips32/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define FRAME_LOWPRIO  0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 extern void frame_low_arch_init(void);
@@ -47,5 +47,5 @@
 extern void physmem_print(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/mips32/include/arch/mm/page.h
===================================================================
--- kernel/arch/mips32/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/mips32/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -42,5 +42,5 @@
 #define PAGE_SIZE	FRAME_SIZE
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #	define KA2PA(x)	(((uintptr_t) (x)) - 0x80000000)
 #	define PA2KA(x)	(((uintptr_t) (x)) + 0x80000000)
@@ -143,5 +143,5 @@
 #define PTE_EXECUTABLE_ARCH(pte)	1
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <mm/mm.h>
@@ -199,5 +199,5 @@
 extern void page_arch_init(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ppc32/include/arch/boot/boot.h
===================================================================
--- kernel/arch/ppc32/include/arch/boot/boot.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ppc32/include/arch/boot/boot.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -42,5 +42,5 @@
 #define BOOTINFO_TASK_NAME_BUFLEN  32
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <config.h>
Index: kernel/arch/ppc32/include/arch/mm/frame.h
===================================================================
--- kernel/arch/ppc32/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ppc32/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define FRAME_LOWPRIO  0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -62,5 +62,5 @@
 extern void physmem_print(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/ppc32/include/arch/mm/page.h
===================================================================
--- kernel/arch/ppc32/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/ppc32/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -42,5 +42,5 @@
 #define PAGE_SIZE   FRAME_SIZE
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 	#define KA2PA(x)  (((uintptr_t) (x)) - 0x80000000)
 	#define PA2KA(x)  (((uintptr_t) (x)) + 0x80000000)
@@ -146,5 +146,5 @@
 #define PTE_EXECUTABLE_ARCH(pte)  1
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <mm/mm.h>
@@ -194,5 +194,5 @@
 extern void page_arch_init(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/riscv64/include/arch/boot/boot.h
===================================================================
--- kernel/arch/riscv64/include/arch/boot/boot.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/riscv64/include/arch/boot/boot.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -45,5 +45,5 @@
 #define TEMP_STACK_SIZE  0x1000
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stddef.h>
Index: kernel/arch/riscv64/include/arch/cpu.h
===================================================================
--- kernel/arch/riscv64/include/arch/cpu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/riscv64/include/arch/cpu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -45,5 +45,5 @@
 #define SATP_MODE_SV48  UINT64_C(0x9000000000000000)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 typedef struct {
@@ -52,5 +52,5 @@
 extern void cpu_setup_fpu(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/riscv64/include/arch/mm/frame.h
===================================================================
--- kernel/arch/riscv64/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/riscv64/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define FRAME_LOWPRIO  0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/boot/boot.h>
@@ -54,5 +54,5 @@
 extern void physmem_print(void);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/riscv64/include/arch/mm/page.h
===================================================================
--- kernel/arch/riscv64/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/riscv64/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define PAGE_SIZE   FRAME_SIZE
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 	#define KA2PA(x)  (((uintptr_t) (x)) - UINT64_C(0xffff800000000000))
 	#define PA2KA(x)  (((uintptr_t) (x)) + UINT64_C(0xffff800000000000))
@@ -159,5 +159,5 @@
 #define PTE_EXECUTABLE_ARCH(pte)  ((pte)->executable != 0)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <mm/mm.h>
@@ -216,5 +216,5 @@
 extern void write_satp(uintptr_t);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/arch.h
===================================================================
--- kernel/arch/sparc64/include/arch/arch.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/arch.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -38,5 +38,5 @@
 #define KERN_sparc64_ARCH_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #include <arch.h>
 #endif
@@ -55,5 +55,5 @@
 #define NWINDOWS  8  /** Number of register window sets. */
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 extern arch_ops_t *sparc64_ops;
@@ -61,5 +61,5 @@
 extern void sparc64_pre_main(bootinfo_t *);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/boot/boot.h
===================================================================
--- kernel/arch/sparc64/include/arch/boot/boot.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/boot/boot.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -39,5 +39,5 @@
 #define LMA  VMA
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 #ifndef __LINKER__
 
Index: kernel/arch/sparc64/include/arch/cpu.h
===================================================================
--- kernel/arch/sparc64/include/arch/cpu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/cpu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -52,5 +52,5 @@
 #define IMPL_SPARC64V		0x5
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/register.h>
Index: kernel/arch/sparc64/include/arch/mm/frame.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -46,5 +46,5 @@
 #endif
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <typedefs.h>
Index: kernel/arch/sparc64/include/arch/mm/page.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -54,5 +54,5 @@
 #define MMU_PAGES_PER_PAGE	(1 << (PAGE_WIDTH - MMU_PAGE_WIDTH))
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/interrupt.h>
@@ -73,5 +73,5 @@
 extern void page_arch_init(void);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4u/frame.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/frame.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/frame.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -54,5 +54,5 @@
 #define FRAME_LOWPRIO  0
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <typedefs.h>
Index: kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/mmu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -87,5 +87,5 @@
 #endif
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/asm.h>
@@ -116,5 +116,5 @@
 #endif /* US */
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -92,5 +92,5 @@
 #define TLB_TAG_ACCESS_VPN_SHIFT	13
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/mm/tte.h>
@@ -687,5 +687,5 @@
 extern void describe_dmmu_fault(void);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -56,5 +56,5 @@
 #define TSB_TAG_TARGET_CONTEXT_SHIFT	48
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/mm/tte.h>
@@ -171,5 +171,5 @@
 extern void dtsb_pte_copy(struct pte *t, size_t index, bool ro);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4u/tte.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4u/tte.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4u/tte.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -47,5 +47,5 @@
 #define TTE_SIZE_SHIFT	61
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -97,5 +97,5 @@
 typedef union tte_data tte_data_t;
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4v/page.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4v/page.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4v/page.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -46,5 +46,5 @@
 #define MMU_PAGES_PER_PAGE	(1 << (PAGE_WIDTH - MMU_PAGE_WIDTH))
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/interrupt.h>
@@ -65,5 +65,5 @@
 extern void page_arch_init(void);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4v/tlb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4v/tlb.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4v/tlb.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -40,5 +40,5 @@
 #define MMU_FSA_SIZE		128
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/mm/tte.h>
@@ -149,5 +149,5 @@
 extern void describe_dmmu_fault(void);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -49,5 +49,5 @@
 #define TSB_FRAMES			SIZE2FRAMES(TSB_SIZE)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdbool.h>
@@ -76,5 +76,5 @@
 extern void dtsb_pte_copy(struct pte *t, bool ro);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/mm/sun4v/tte.h
===================================================================
--- kernel/arch/sparc64/include/arch/mm/sun4v/tte.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/mm/sun4v/tte.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -48,5 +48,5 @@
 #define MMU_FLAG_DTLB	1	/**< operation applies to DTLB */
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -76,5 +76,5 @@
 #define VA_TAG_PAGE_SHIFT	22
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/sun4u/cpu.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4u/cpu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/sun4u/cpu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -52,5 +52,5 @@
 #define IMPL_SPARC64V  0x5
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/register.h>
Index: kernel/arch/sparc64/include/arch/sun4v/cpu.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4v/cpu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/sun4v/cpu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -42,5 +42,5 @@
 #define MAX_CORE_STRANDS  8
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <atomic.h>
Index: kernel/arch/sparc64/include/arch/sun4v/hypercall.h
===================================================================
--- kernel/arch/sparc64/include/arch/sun4v/hypercall.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/sun4v/hypercall.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -117,5 +117,5 @@
 
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
Index: kernel/arch/sparc64/include/arch/trap/exception.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/exception.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/exception.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -65,5 +65,5 @@
 #define TT_STQF_MEM_ADDRESS_NOT_ALIGNED		0x39
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/interrupt.h>
@@ -91,5 +91,5 @@
 extern void STQF_mem_address_not_aligned(unsigned int, istate_t *);
 
-#endif /* !__ASM__ */
+#endif /* !__ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/trap/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/interrupt.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/interrupt.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -63,5 +63,5 @@
 #define IGN_SHIFT	6
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/interrupt.h>
@@ -69,5 +69,5 @@
 extern void interrupt(unsigned int n, istate_t *istate);
 
-#endif /* !def __ASM__ */
+#endif /* !def __ASSEMBLER__ */
 
 
Index: kernel/arch/sparc64/include/arch/trap/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/regwin.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/regwin.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -78,5 +78,5 @@
 #define UWB_ALIGNMENT	1024
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 
 /*
@@ -202,5 +202,5 @@
 	retry
 .endm
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #if defined(SUN4U)
Index: kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -55,5 +55,5 @@
 #define FAST_MMU_HANDLER_SIZE			128
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 
 .macro FAST_INSTRUCTION_ACCESS_MMU_MISS_HANDLER
@@ -166,5 +166,5 @@
 .endm
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/trap/sun4u/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4u/regwin.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/sun4u/regwin.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -33,5 +33,5 @@
 #define KERN_sparc64_sun4u_REGWIN_H_
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 
 /*
Index: kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/sun4v/interrupt.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -38,5 +38,5 @@
 #define KERN_sparc64_TRAP_SUN4V_INTERRUPT_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/istate_struct.h>
Index: kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/sun4v/mmu.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -61,5 +61,5 @@
 #define FAST_MMU_HANDLER_SIZE			128
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 
 /* MMU fault status area data fault offset */
@@ -181,5 +181,5 @@
 	PREEMPTIBLE_HANDLER exc_dispatch
 .endm
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/arch/sparc64/include/arch/trap/sun4v/regwin.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/sun4v/regwin.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/sun4v/regwin.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -34,5 +34,5 @@
 #define KERN_sparc64_sun4v_REGWIN_H_
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 
 /*
Index: kernel/arch/sparc64/include/arch/trap/trap_table.h
===================================================================
--- kernel/arch/sparc64/include/arch/trap/trap_table.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/arch/sparc64/include/arch/trap/trap_table.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -43,5 +43,5 @@
 #define TRAP_TABLE_SIZE		(TRAP_TABLE_ENTRY_COUNT * TRAP_TABLE_ENTRY_SIZE)
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -56,7 +56,7 @@
 extern trap_table_entry_t trap_table_save[TRAP_TABLE_ENTRY_COUNT];
 
-#endif /* !__ASM__ */
+#endif /* !__ASSEMBLER__ */
 
-#ifdef __ASM__
+#ifdef __ASSEMBLER__
 .macro SAVE_GLOBALS
 	mov %g1, %l1
@@ -85,5 +85,5 @@
 .endm
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/genarch/include/genarch/multiboot/multiboot.h
===================================================================
--- kernel/genarch/include/genarch/multiboot/multiboot.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/genarch/include/genarch/multiboot/multiboot.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -52,5 +52,5 @@
 #define MULTIBOOT_INFO_FLAGS_MMAP	0x40
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <typedefs.h>
@@ -77,5 +77,5 @@
 extern void multiboot_info_parse(uint32_t, const multiboot_info_t *);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/genarch/include/genarch/multiboot/multiboot2.h
===================================================================
--- kernel/genarch/include/genarch/multiboot/multiboot2.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/genarch/include/genarch/multiboot/multiboot2.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -61,5 +61,5 @@
 #define MULTIBOOT2_VISUAL_EGA      2
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <typedefs.h>
@@ -153,5 +153,5 @@
 extern void multiboot2_info_parse(uint32_t, const multiboot2_info_t *);
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/generic/include/config.h
===================================================================
--- kernel/generic/include/config.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/generic/include/config.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -50,5 +50,5 @@
 #define CONFIG_TASK_ARGUMENTS_BUFLEN 64
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdbool.h>
@@ -109,5 +109,5 @@
 extern ballocs_t ballocs;
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #endif
Index: kernel/generic/include/macros.h
===================================================================
--- kernel/generic/include/macros.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/generic/include/macros.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -36,5 +36,5 @@
 #define KERN_MACROS_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <stdint.h>
@@ -98,5 +98,5 @@
 }
 
-#endif /* __ASM__ */
+#endif /* __ASSEMBLER__ */
 
 #define ispwr2(x)  (((x) & ((x) - 1)) == 0)
Index: kernel/generic/include/mm/asid.h
===================================================================
--- kernel/generic/include/mm/asid.h	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ kernel/generic/include/mm/asid.h	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -41,5 +41,5 @@
 #define KERN_ASID_H_
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #include <arch/mm/asid.h>
@@ -55,5 +55,5 @@
 #define ASID_MAX	ASID_MAX_ARCH
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 
 #define ASIDS_ALLOCABLE	((ASID_MAX + 1) - ASID_START)
Index: tools/autogen.py
===================================================================
--- tools/autogen.py	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ tools/autogen.py	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -133,5 +133,5 @@
 #define AUTOGEN_%s_H
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 %s
 #endif
@@ -139,5 +139,5 @@
 %s
 
-#ifndef __ASM__
+#ifndef __ASSEMBLER__
 %s
 #endif
Index: uspace/Makefile.common
===================================================================
--- uspace/Makefile.common	(revision e0a4686ebb68dd7d42dd083c5ea6c37d6ced027d)
+++ uspace/Makefile.common	(revision 53ad43cce05b0004bca31a7c5d6822fc33686cf1)
@@ -332,8 +332,8 @@
 
 %.o: %.S | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
 
 %.o: %.s | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
 
 %.o: %.c | depend
@@ -344,8 +344,8 @@
 
 %.lo: %.S | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
 
 %.lo: %.s | depend
-	$(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS) -D__ASM__
+	$(CC_JOB) -c -MD -MP $(DEFS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(AS_CFLAGS)
 
 %.lo: %.c | depend
