diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/processor.h | 23 | ||||
| -rw-r--r-- | include/asm-x86_64/processor.h | 17 |
2 files changed, 23 insertions, 17 deletions
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 2cf1e17bf92b..6310eb5c8a82 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -19,6 +19,7 @@ #include <linux/cache.h> #include <linux/config.h> #include <linux/threads.h> +#include <asm/percpu.h> /* 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[]; @@ -296,6 +297,8 @@ extern unsigned int mca_pentium_flag; */ #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) +#define HAVE_ARCH_PICK_MMAP_LAYOUT + /* * Size of io_bitmap. */ @@ -304,6 +307,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 +361,8 @@ typedef struct { unsigned long seg; } mm_segment_t; +struct thread_struct; + struct tss_struct { unsigned short back_link,__blh; unsigned long esp0; @@ -389,9 +395,14 @@ struct tss_struct { */ 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 +433,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 +452,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,11 +657,6 @@ 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 - extern unsigned long boot_option_idle_override; #endif /* __ASM_I386_PROCESSOR_H */ diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 92c18cf3395a..97125658358f 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -18,6 +18,7 @@ #include <asm/current.h> #include <asm/system.h> #include <asm/mmsegment.h> +#include <asm/percpu.h> #include <linux/personality.h> #define TF_MASK 0x00000100 @@ -60,6 +61,8 @@ struct cpuinfo_x86 { int x86_cache_alignment; int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ __u8 x86_virt_bits, x86_phys_bits; + __u8 x86_num_cores; + __u8 x86_apicid; __u32 x86_power; unsigned long loops_per_jiffy; } ____cacheline_aligned; @@ -75,14 +78,11 @@ struct cpuinfo_x86 { #define X86_VENDOR_NUM 8 #define X86_VENDOR_UNKNOWN 0xff -extern struct cpuinfo_x86 boot_cpu_data; -extern struct tss_struct init_tss[NR_CPUS]; - #ifdef CONFIG_SMP extern struct cpuinfo_x86 cpu_data[]; #define current_cpu_data cpu_data[smp_processor_id()] #else -#define cpu_data &boot_cpu_data +#define cpu_data (&boot_cpu_data) #define current_cpu_data boot_cpu_data #endif @@ -227,6 +227,9 @@ struct tss_struct { unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; } __attribute__((packed)) ____cacheline_aligned; +extern struct cpuinfo_x86 boot_cpu_data; +DECLARE_PER_CPU(struct tss_struct,init_tss); + #define ARCH_MIN_TASKALIGN 16 struct thread_struct { @@ -251,6 +254,7 @@ struct thread_struct { switch faster for a limited number of ioperm using tasks. -AK */ int ioperm; unsigned long *io_bitmap_ptr; + unsigned io_bitmap_max; /* cached TLS descriptors. */ u64 tls_array[GDT_ENTRY_TLS_ENTRIES]; } __attribute__((aligned(16))); @@ -456,11 +460,6 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) #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 - extern unsigned long boot_option_idle_override; #endif /* __ASM_X86_64_PROCESSOR_H */ |
