lkml.org 
[lkml]   [1998]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpossible bug in 2.1.96 fpu emulation

In the 2.1.96 patch the file linux/arch/i386/math-emu/fpu_system.h is
changed like yay:

-#define LDT_DESCRIPTOR(s) (current->ldt[(s) >> 3])
+#define LDT_DESCRIPTOR(s) (((struct ldt_struct *)current->mm->segments)[(s) >> 3])

When I try to compile the kernel with fpu emulation support it fails
at fpu_entry.c line 193:

if ( SEG_D_SIZE(code_descriptor = LDT_DESCRIPTOR(FPU_CS)) )

with the error message "trying to do pointer arithmetic on incomplete
type" (or somesuch, I didn't note the exact error message) which
usually (always?) means there is a pointer to a struct that isn't
defined.

Upon further investigation I found that the struct ldt_struct isn't
defined anywhere in the kernel source tree and FPU_CS is of type
desc_struct.

When I change the (struct ldt_struct *) above to (struct desc_struct
*) everything compiles and seems to work okay (so far).

This might be a bug.

--
Mark A. Wagner markwa@citylinq.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.017 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site