Skip to contentSkip to conversation

2.6.0-test2-mm3

DISCUSSION Raphael Kubo da Costa 4 participants 4 messages Aug 3, 2003

lore
Share & tools
lore
#0 lore raw

Ok, here's my first patch. ;)
This is a fix for i386's fpu_system.h, which was causing an error during the compilation of fpu_entry.c.

arch/i386/math-emu/fpu_system.h +0 -0
@@ -22,7 +22,7 @@
 

/* s is always from a cpu register, and the cpu does bounds checking
* during register load --> no further bounds checks needed */
-#define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[(s) >> 3])
+#define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt_pages)[(s) >> 3])
#define SEG_D_SIZE(x) ((x).b & (3 << 21))
#define SEG_G_BIT(x) ((x).b & (1 << 23))
#define SEG_GRANULARITY(x) (((x).b & (1 << 23)) ? 4096 : 1)

#1 lore raw

Review line 22

Quoted 10 lines · Raphael Kubo da Costa

Ok, here's my first patch. ;)
This is a fix for i386's fpu_system.h, which was causing an error during the compilation of fpu_entry.c.

--- linux-2.6.0-test2-mm3/arch/i386/math-emu/fpu_system.h 2003-08-02
22:54:44.000000000 -0300
+++ linux-2.6.0-test2-mm3-fix/arch/i386/math-emu/fpu_system.h 2003-08-02
22:53:55.000000000 -0300

(quoted diff) +0 -0
@@ -22,7 +22,7 @@
 

Your mailer seems to have messed up newlines, so the patch (that I have no idea if its correct or not) won't apply ;-)

Regards,

Signature · 2 lines
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.0-test2-mm2)
#2 lore raw
Quoted 2 lines · Jose Luis Domingo Lopez

Your mailer seems to have messed up newlines, so the patch (that I have no idea if its correct or not) won't apply ;-)

The 4G patch has changed the 'ldt' member of mm_context_t, calling it
'ldt_pages'. Patch from Raphael fixes fpu_system.h for correct compilation, but system won't boot with 'no387' parameter. So semantics must have been changed too.

Maybe Ingo can review the effects of his changes on FPU emulation code.

Marcelo Abreu

#3 lore raw
Quoted 4 lines · Marcelo Abreu

The 4G patch has changed the 'ldt' member of mm_context_t, calling
it 'ldt_pages'. Patch from Raphael fixes fpu_system.h for correct compilation, but system won't boot with 'no387' parameter. So semantics must have been changed too.

i sent the correct patch to Andrew already:

arch/i386/math-emu/fpu_system.h renamed from arch/i386/math-emu/fpu_system.h.orig +2 -1
@@ -15,6 +15,7 @@
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <asm/atomic_kmap.h>
 
 /* This sets the pointer FPU_info to point to the argument part
    of the stack frame of math_emulate() */
@@ -22,7 +23,7 @@
 
 /* s is always from a cpu register, and the cpu does bounds checking
  * during register load --> no further bounds checks needed */
-#define LDT_DESCRIPTOR(s)	(((struct desc_struct *)current->mm->context.ldt)[(s) >> 3])
+#define LDT_DESCRIPTOR(s)	(((struct desc_struct *)__kmap_atomic_vaddr(KM_LDT_PAGE0))[(s) >> 3])
 #define SEG_D_SIZE(x)		((x).b & (3 << 21))
 #define SEG_G_BIT(x)		((x).b & (1 << 23))
 #define SEG_GRANULARITY(x)	(((x).b & (1 << 23)) ? 4096 : 1)