Index: kernel/arch/ia32/include/cpu.h
===================================================================
--- kernel/arch/ia32/include/cpu.h	(revision 0160b1c819f587fd17ea9ba55883dba10a3e4036)
+++ kernel/arch/ia32/include/cpu.h	(revision 99d6fd07a4e12eb667d2cfa2d3fdb3b5f63800b2)
@@ -56,5 +56,5 @@
 	unsigned int model;
 	unsigned int stepping;
-	struct tss *tss;
+	tss_t *tss;
 	
 	count_t iomapver_copy;  /** Copy of TASK's I/O Permission bitmap generation count. */
Index: kernel/arch/ia32/include/pm.h
===================================================================
--- kernel/arch/ia32/include/pm.h	(revision 0160b1c819f587fd17ea9ba55883dba10a3e4036)
+++ kernel/arch/ia32/include/pm.h	(revision 99d6fd07a4e12eb667d2cfa2d3fdb3b5f63800b2)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia32	
+/** @addtogroup ia32
  * @{
  */
@@ -36,46 +36,45 @@
 #define KERN_ia32_PM_H_
 
-#define IDT_ITEMS	64	
-#define GDT_ITEMS	7
+#define IDT_ITEMS  64
+#define GDT_ITEMS  7
 
-#define VESA_INIT_SEGMENT 0x8000
-
-#define NULL_DES	0
-#define KTEXT_DES	1
-#define	KDATA_DES	2
-#define UTEXT_DES	3
-#define UDATA_DES	4
-#define TSS_DES		5
-#define TLS_DES		6 /* Pointer to Thread-Local-Storage data */
+#define NULL_DES   0
+#define KTEXT_DES  1
+#define KDATA_DES  2
+#define UTEXT_DES  3
+#define UDATA_DES  4
+#define TSS_DES    5
+#define TLS_DES    6  /* Pointer to Thread-Local-Storage data */
 
 #ifdef CONFIG_FB
 
-#define VESA_INIT_SEGMENT 0x8000
-#define VESA_INIT_DES 7
+#define VESA_INIT_SEGMENT  0x8000
+#define VESA_INIT_DES      7
+#define KTEXT32_DES        KTEXT_DES
+
 #undef GDT_ITEMS
-#define GDT_ITEMS 8
+#define GDT_ITEMS  8
 
 #endif /* CONFIG_FB */
 
+#define gdtselector(des)  ((des) << 3)
 
-#define gdtselector(des)	((des) << 3)
+#define PL_KERNEL  0
+#define PL_USER    3
 
-#define PL_KERNEL	0
-#define PL_USER		3
+#define AR_PRESENT    (1 << 7)
+#define AR_DATA       (2 << 3)
+#define AR_CODE       (3 << 3)
+#define AR_WRITABLE   (1 << 1)
+#define AR_INTERRUPT  (0x0e)
+#define AR_TSS        (0x09)
 
-#define AR_PRESENT	(1 << 7)
-#define AR_DATA		(2 << 3)
-#define AR_CODE		(3 << 3)
-#define AR_WRITABLE	(1 << 1)
-#define AR_INTERRUPT	(0xe)
-#define AR_TSS		(0x9)
+#define DPL_KERNEL  (PL_KERNEL << 5)
+#define DPL_USER    (PL_USER << 5)
 
-#define DPL_KERNEL	(PL_KERNEL << 5)
-#define DPL_USER	(PL_USER << 5)
+#define TSS_BASIC_SIZE  104
+#define TSS_IOMAP_SIZE  (16 * 1024 + 1)  /* 16K for bitmap + 1 terminating byte for convenience */
 
-#define TSS_BASIC_SIZE	104
-#define TSS_IOMAP_SIZE	(16 * 1024 + 1)	/* 16K for bitmap + 1 terminating byte for convenience */
-
-#define IO_PORTS	(64 * 1024)
+#define IO_PORTS  (64 * 1024)
 
 #ifndef __ASM__
@@ -84,11 +83,10 @@
 #include <arch/context.h>
 
-struct ptr_16_32 {
+typedef struct {
 	uint16_t limit;
 	uint32_t base;
-} __attribute__ ((packed));
-typedef struct ptr_16_32 ptr_16_32_t;
+} __attribute__ ((packed)) ptr_16_32_t;
 
-struct descriptor {
+typedef struct {
 	unsigned limit_0_15: 16;
 	unsigned base_0_15: 16;
@@ -101,8 +99,7 @@
 	unsigned granularity : 1;
 	unsigned base_24_31: 8;
-} __attribute__ ((packed));
-typedef struct descriptor  descriptor_t;
+} __attribute__ ((packed)) descriptor_t;
 
-struct idescriptor {
+typedef struct {
 	unsigned offset_0_15: 16;
 	unsigned selector: 16;
@@ -110,8 +107,7 @@
 	unsigned access: 8;
 	unsigned offset_16_31: 16;
-} __attribute__ ((packed));
-typedef struct idescriptor idescriptor_t;
+} __attribute__ ((packed)) idescriptor_t;
 
-struct tss {
+typedef struct {
 	uint16_t link;
 	unsigned : 16;
@@ -153,11 +149,10 @@
 	uint16_t iomap_base;
 	uint8_t iomap[TSS_IOMAP_SIZE];
-} __attribute__ ((packed));
-typedef struct tss tss_t;
+} __attribute__ ((packed)) tss_t;
 
 extern ptr_16_32_t gdtr;
 extern ptr_16_32_t bootstrap_gdtr;
 extern ptr_16_32_t protected_ap_gdtr;
-extern struct tss *tss_p;
+extern tss_t *tss_p;
 
 extern descriptor_t gdt[];
Index: kernel/arch/ia32/src/pm.c
===================================================================
--- kernel/arch/ia32/src/pm.c	(revision 0160b1c819f587fd17ea9ba55883dba10a3e4036)
+++ kernel/arch/ia32/src/pm.c	(revision 99d6fd07a4e12eb667d2cfa2d3fdb3b5f63800b2)
@@ -113,5 +113,5 @@
 void tss_initialize(tss_t *t)
 {
-	memsetb(t, sizeof(struct tss), 0);
+	memsetb(t, sizeof(tss_t), 0);
 }
 
Index: kernel/arch/ia32/src/proc/scheduler.c
===================================================================
--- kernel/arch/ia32/src/proc/scheduler.c	(revision 0160b1c819f587fd17ea9ba55883dba10a3e4036)
+++ kernel/arch/ia32/src/proc/scheduler.c	(revision 99d6fd07a4e12eb667d2cfa2d3fdb3b5f63800b2)
@@ -60,12 +60,12 @@
 	uintptr_t kstk = (uintptr_t) &THREAD->kstack[THREAD_STACK_SIZE -
 	    SP_DELTA];
-
+	
 	/* Set kernel stack for CP3 -> CPL0 switch via SYSENTER */
 	write_msr(IA32_MSR_SYSENTER_ESP, kstk);
-
+	
 	/* Set kernel stack for CPL3 -> CPL0 switch via interrupt */
 	CPU->arch.tss->esp0 = kstk;
 	CPU->arch.tss->ss0 = gdtselector(KDATA_DES);
-
+	
 	/* Set up TLS in GS register */
 	set_tls_desc(THREAD->arch.tls);
Index: kernel/arch/ia32/src/smp/smp.c
===================================================================
--- kernel/arch/ia32/src/smp/smp.c	(revision 0160b1c819f587fd17ea9ba55883dba10a3e4036)
+++ kernel/arch/ia32/src/smp/smp.c	(revision 99d6fd07a4e12eb667d2cfa2d3fdb3b5f63800b2)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia32	
+/** @addtogroup ia32
  * @{
  */
@@ -132,6 +132,6 @@
 
 	for (i = 0; i < ops->cpu_count(); i++) {
-		struct descriptor *gdt_new;
-	
+		descriptor_t *gdt_new;
+		
 		/*
 		 * Skip processors marked unusable.
@@ -160,12 +160,12 @@
 		 * the memory subsystem
 		 */
-		gdt_new = (struct descriptor *) malloc(GDT_ITEMS *
-		    sizeof(struct descriptor), FRAME_ATOMIC);
+		gdt_new = (descriptor_t *) malloc(GDT_ITEMS *
+		    sizeof(descriptor_t), FRAME_ATOMIC);
 		if (!gdt_new)
 			panic("Cannot allocate memory for GDT.");
 
-		memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(struct descriptor));
-		memsetb(&gdt_new[TSS_DES], sizeof(struct descriptor), 0);
-		protected_ap_gdtr.limit = GDT_ITEMS * sizeof(struct descriptor);
+		memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(descriptor_t));
+		memsetb(&gdt_new[TSS_DES], sizeof(descriptor_t), 0);
+		protected_ap_gdtr.limit = GDT_ITEMS * sizeof(descriptor_t);
 		protected_ap_gdtr.base = KA2PA((uintptr_t) gdt_new);
 		gdtr.base = (uintptr_t) gdt_new;
