X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-i386%2Fprocessor.h;h=e4165087e66e7c0a1c931cc13e65e8c733c9b208;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=6fcdb7d1d493d5adef2470365d54054388941473;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 6fcdb7d1d..e4165087e 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -19,6 +19,7 @@ #include #include #include +#include /* flag for disabling the tsc */ extern int tsc_disable; @@ -84,8 +85,8 @@ struct cpuinfo_x86 { extern struct cpuinfo_x86 boot_cpu_data; extern struct cpuinfo_x86 new_cpu_data; -extern struct tss_struct init_tss[NR_CPUS]; extern struct tss_struct doublefault_tss; +DECLARE_PER_CPU(struct tss_struct, init_tss); #ifdef CONFIG_SMP extern struct cpuinfo_x86 cpu_data[]; @@ -287,15 +288,18 @@ extern unsigned int BIOS_revision; extern unsigned int mca_pentium_flag; /* - * User space process size: 3GB (default). + * User space process size: (3GB default). */ -#define TASK_SIZE (PAGE_OFFSET) +#define __TASK_SIZE (__PAGE_OFFSET) +#define TASK_SIZE ((unsigned long)__TASK_SIZE) /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) +#define HAVE_ARCH_PICK_MMAP_LAYOUT + /* * Size of io_bitmap. */ @@ -304,6 +308,7 @@ extern unsigned int mca_pentium_flag; #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long)) #define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap) #define INVALID_IO_BITMAP_OFFSET 0x8000 +#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000 struct i387_fsave_struct { long cwd; @@ -357,6 +362,8 @@ typedef struct { unsigned long seg; } mm_segment_t; +struct thread_struct; + struct tss_struct { unsigned short back_link,__blh; unsigned long esp0; @@ -388,10 +395,15 @@ struct tss_struct { * be within the limit. */ unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; + /* + * Cache the current maximum and the last task that used the bitmap: + */ + unsigned long io_bitmap_max; + struct thread_struct *io_bitmap_owner; /* * pads the TSS to be cacheline-aligned (size is 0x100) */ - unsigned long __cacheline_filler[37]; + unsigned long __cacheline_filler[35]; /* * .. and then another 0x100 bytes for emergency kernel stack */ @@ -422,6 +434,8 @@ struct thread_struct { unsigned int saved_fs, saved_gs; /* IO permissions */ unsigned long *io_bitmap_ptr; +/* max allowed port in the bitmap, in bytes: */ + unsigned long io_bitmap_max; }; #define INIT_THREAD { \ @@ -439,7 +453,6 @@ struct thread_struct { #define INIT_TSS { \ .esp0 = sizeof(init_stack) + (long)&init_stack, \ .ss0 = __KERNEL_DS, \ - .esp1 = sizeof(init_tss[0]) + (long)&init_tss[0], \ .ss1 = __KERNEL_CS, \ .ldt = GDT_ENTRY_LDT, \ .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ @@ -645,9 +658,4 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); #define cache_line_size() (boot_cpu_data.x86_cache_alignment) -#ifdef CONFIG_SCHED_SMT -#define ARCH_HAS_SCHED_DOMAIN -#define ARCH_HAS_SCHED_WAKE_IDLE -#endif - #endif /* __ASM_I386_PROCESSOR_H */