patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-i386.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fixes
     2 
     3 In file included from include/asm/thread_info.h:16,
     4                  from include/linux/thread_info.h:21,
     5                  from include/linux/spinlock.h:12,
     6                  from include/linux/capability.h:45,
     7                  from include/linux/sched.h:7,
     8                  from arch/i386/kernel/asm-offsets.c:7:
     9 include/asm/processor.h:87: error: array type has incomplete element type
    10 make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
    11 
    12 --- linux-2.6.11.3/include/asm-i386/processor.h.old	Tue Mar 15 06:45:26 2005
    13 +++ linux-2.6.11.3/include/asm-i386/processor.h	Tue Mar 15 06:46:45 2005
    14 @@ -81,6 +81,64 @@
    15  #define X86_VENDOR_UNKNOWN 0xff
    16  
    17  /*
    18 + * Size of io_bitmap.
    19 + */
    20 +#define IO_BITMAP_BITS  65536
    21 +#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
    22 +#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
    23 +#define INVALID_IO_BITMAP_OFFSET 0x8000
    24 +#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
    25 +
    26 +struct tss_struct {
    27 +	unsigned short	back_link,__blh;
    28 +	unsigned long	esp0;
    29 +	unsigned short	ss0,__ss0h;
    30 +	unsigned long	esp1;
    31 +	unsigned short	ss1,__ss1h;	/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
    32 +	unsigned long	esp2;
    33 +	unsigned short	ss2,__ss2h;
    34 +	unsigned long	__cr3;
    35 +	unsigned long	eip;
    36 +	unsigned long	eflags;
    37 +	unsigned long	eax,ecx,edx,ebx;
    38 +	unsigned long	esp;
    39 +	unsigned long	ebp;
    40 +	unsigned long	esi;
    41 +	unsigned long	edi;
    42 +	unsigned short	es, __esh;
    43 +	unsigned short	cs, __csh;
    44 +	unsigned short	ss, __ssh;
    45 +	unsigned short	ds, __dsh;
    46 +	unsigned short	fs, __fsh;
    47 +	unsigned short	gs, __gsh;
    48 +	unsigned short	ldt, __ldth;
    49 +	unsigned short	trace, io_bitmap_base;
    50 +	/*
    51 +	 * The extra 1 is there because the CPU will access an
    52 +	 * additional byte beyond the end of the IO permission
    53 +	 * bitmap. The extra byte must be all 1 bits, and must
    54 +	 * be within the limit.
    55 +	 */
    56 +	unsigned long	io_bitmap[IO_BITMAP_LONGS + 1];
    57 +	/*
    58 +	 * Cache the current maximum and the last task that used the bitmap:
    59 +	 */
    60 +	unsigned long io_bitmap_max;
    61 +	struct thread_struct *io_bitmap_owner;
    62 +	/*
    63 +	 * pads the TSS to be cacheline-aligned (size is 0x100)
    64 +	 */
    65 +	unsigned long __cacheline_filler[35];
    66 +	/*
    67 +	 * .. and then another 0x100 bytes for emergency kernel stack
    68 +	 */
    69 +	unsigned long stack[64];
    70 +} __attribute__((packed));
    71 +
    72 +#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
    73 +#define ARCH_MIN_TASKALIGN	16
    74 +
    75 +/*
    76   * capabilities of CPUs
    77   */
    78  
    79 @@ -308,16 +366,6 @@
    80  
    81  #define HAVE_ARCH_PICK_MMAP_LAYOUT
    82  
    83 -/*
    84 - * Size of io_bitmap.
    85 - */
    86 -#define IO_BITMAP_BITS  65536
    87 -#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
    88 -#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
    89 -#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
    90 -#define INVALID_IO_BITMAP_OFFSET 0x8000
    91 -#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
    92 -
    93  struct i387_fsave_struct {
    94  	long	cwd;
    95  	long	swd;
    96 @@ -371,54 +419,6 @@
    97  } mm_segment_t;
    98  
    99  struct thread_struct;
   100 -
   101 -struct tss_struct {
   102 -	unsigned short	back_link,__blh;
   103 -	unsigned long	esp0;
   104 -	unsigned short	ss0,__ss0h;
   105 -	unsigned long	esp1;
   106 -	unsigned short	ss1,__ss1h;	/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
   107 -	unsigned long	esp2;
   108 -	unsigned short	ss2,__ss2h;
   109 -	unsigned long	__cr3;
   110 -	unsigned long	eip;
   111 -	unsigned long	eflags;
   112 -	unsigned long	eax,ecx,edx,ebx;
   113 -	unsigned long	esp;
   114 -	unsigned long	ebp;
   115 -	unsigned long	esi;
   116 -	unsigned long	edi;
   117 -	unsigned short	es, __esh;
   118 -	unsigned short	cs, __csh;
   119 -	unsigned short	ss, __ssh;
   120 -	unsigned short	ds, __dsh;
   121 -	unsigned short	fs, __fsh;
   122 -	unsigned short	gs, __gsh;
   123 -	unsigned short	ldt, __ldth;
   124 -	unsigned short	trace, io_bitmap_base;
   125 -	/*
   126 -	 * The extra 1 is there because the CPU will access an
   127 -	 * additional byte beyond the end of the IO permission
   128 -	 * bitmap. The extra byte must be all 1 bits, and must
   129 -	 * be within the limit.
   130 -	 */
   131 -	unsigned long	io_bitmap[IO_BITMAP_LONGS + 1];
   132 -	/*
   133 -	 * Cache the current maximum and the last task that used the bitmap:
   134 -	 */
   135 -	unsigned long io_bitmap_max;
   136 -	struct thread_struct *io_bitmap_owner;
   137 -	/*
   138 -	 * pads the TSS to be cacheline-aligned (size is 0x100)
   139 -	 */
   140 -	unsigned long __cacheline_filler[35];
   141 -	/*
   142 -	 * .. and then another 0x100 bytes for emergency kernel stack
   143 -	 */
   144 -	unsigned long stack[64];
   145 -} __attribute__((packed));
   146 -
   147 -#define ARCH_MIN_TASKALIGN	16
   148  
   149  struct thread_struct {
   150  /* cached TLS descriptors. */