From: Arjan van de Ven <arjanv@redhat.com>

As per bug 1705; machines earlier than pII don't have sysenter support; the
4g/4g split code tests for sysenter support correctly before writing the
relevant MSR everywhere except for one place; the patch below adds the test.
The person with the machine confirmed it working as per bugzilla.



 include/asm-i386/processor.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN include/asm-i386/processor.h~4g4g-sysenter-test-fix include/asm-i386/processor.h
--- 25/include/asm-i386/processor.h~4g4g-sysenter-test-fix	2003-12-20 06:49:58.000000000 -0800
+++ 25-akpm/include/asm-i386/processor.h	2003-12-20 06:49:58.000000000 -0800
@@ -492,7 +492,7 @@ extern int kernel_thread(int (*fn)(void 
 #define load_virtual_esp0(tss, task)					\
 	do {								\
 		tss->esp0 = virtual_esp0(task);				\
-		if (unlikely(tss->ss1 != task->thread.sysenter_cs)) {	\
+		if (likely(cpu_has_sep) && unlikely(tss->ss1 != task->thread.sysenter_cs)) {	\
 			tss->ss1 = task->thread.sysenter_cs;		\
 			wrmsr(MSR_IA32_SYSENTER_CS,			\
 				task->thread.sysenter_cs, 0);		\

_