Skip to contentSkip to conversation

%fs/%gs cleanup in mmu_context.h - take 2

PATCH New Chris Wright 1 participant 1 message Aug 13, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 %fs/%gs cleanup in mmu_context.h - take 2

Small change to remove difference between Xen and mainline deactivate_mm. While there, cleanup prepare_arch_switch as well. This generates identical code.

---

linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h +3 -3
diff -r ba46bd7f5cdf linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
@@ -34,10 +34,10 @@
 	 * are always kernel segments while inside the kernel. Must
 	 * happen before reload of cr3/ldt (i.e., not in __switch_to).
 	 */
-	__asm__ __volatile__ ( "mov %%fs,%0 ; mov %%gs,%1"
+	asm volatile ( "mov %%fs,%0 ; mov %%gs,%1"
 		: "=m" (*(int *)&current->thread.fs),
 		  "=m" (*(int *)&current->thread.gs));
-	__asm__ __volatile__ ( "mov %0,%%fs ; mov %0,%%gs"
+	asm volatile ( "mov %0,%%fs ; mov %0,%%gs"
 		: : "r" (0) );
 }
 
@@ -100,7 +100,7 @@
 }
 
 #define deactivate_mm(tsk, mm) \
-	asm("mov %0,%%fs ; mov %0,%%gs": :"r" (0))
+	asm("movl %0,%%fs ; movl %0,%%gs": :"r" (0))
 
 #define activate_mm(prev, next) \
 	switch_mm((prev),(next),NULL)