diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86_64/desc.h | 5 | ||||
-rw-r--r-- | include/asm-x86_64/page.h | 15 | ||||
-rw-r--r-- | include/asm-x86_64/pda.h | 8 | ||||
-rw-r--r-- | include/asm-x86_64/processor.h | 2 |
4 files changed, 19 insertions, 11 deletions
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index 33764869387b..5ce0e34f9a0c 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h | |||
@@ -114,6 +114,11 @@ static inline void set_system_gate(int nr, void *func) | |||
114 | _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, 0); | 114 | _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, 0); |
115 | } | 115 | } |
116 | 116 | ||
117 | static inline void set_system_gate_ist(int nr, void *func, unsigned ist) | ||
118 | { | ||
119 | _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, ist); | ||
120 | } | ||
121 | |||
117 | static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned type, | 122 | static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned type, |
118 | unsigned size) | 123 | unsigned size) |
119 | { | 124 | { |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 06e489f32472..dcbb4fcd9a18 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -14,13 +14,18 @@ | |||
14 | #define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & __PHYSICAL_MASK) | 14 | #define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & __PHYSICAL_MASK) |
15 | 15 | ||
16 | #define THREAD_ORDER 1 | 16 | #define THREAD_ORDER 1 |
17 | #ifdef __ASSEMBLY__ | 17 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) |
18 | #define THREAD_SIZE (1 << (PAGE_SHIFT + THREAD_ORDER)) | ||
19 | #else | ||
20 | #define THREAD_SIZE (1UL << (PAGE_SHIFT + THREAD_ORDER)) | ||
21 | #endif | ||
22 | #define CURRENT_MASK (~(THREAD_SIZE-1)) | 18 | #define CURRENT_MASK (~(THREAD_SIZE-1)) |
23 | 19 | ||
20 | #define EXCEPTION_STACK_ORDER 0 | ||
21 | #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) | ||
22 | |||
23 | #define DEBUG_STACK_ORDER EXCEPTION_STACK_ORDER | ||
24 | #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER) | ||
25 | |||
26 | #define IRQSTACK_ORDER 2 | ||
27 | #define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER) | ||
28 | |||
24 | #define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1)) | 29 | #define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1)) |
25 | #define LARGE_PAGE_SIZE (1UL << PMD_SHIFT) | 30 | #define LARGE_PAGE_SIZE (1UL << PMD_SHIFT) |
26 | 31 | ||
diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h index 8733ccfa442e..431a909fbec9 100644 --- a/include/asm-x86_64/pda.h +++ b/include/asm-x86_64/pda.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/stddef.h> | 5 | #include <linux/stddef.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/cache.h> | 7 | #include <linux/cache.h> |
8 | #include <asm/page.h> | ||
8 | 9 | ||
9 | /* Per processor datastructure. %gs points to it while the kernel runs */ | 10 | /* Per processor datastructure. %gs points to it while the kernel runs */ |
10 | struct x8664_pda { | 11 | struct x8664_pda { |
@@ -12,6 +13,9 @@ struct x8664_pda { | |||
12 | unsigned long data_offset; /* Per cpu data offset from linker address */ | 13 | unsigned long data_offset; /* Per cpu data offset from linker address */ |
13 | unsigned long kernelstack; /* top of kernel stack for current */ | 14 | unsigned long kernelstack; /* top of kernel stack for current */ |
14 | unsigned long oldrsp; /* user rsp for system call */ | 15 | unsigned long oldrsp; /* user rsp for system call */ |
16 | #if DEBUG_STKSZ > EXCEPTION_STKSZ | ||
17 | unsigned long debugstack; /* #DB/#BP stack. */ | ||
18 | #endif | ||
15 | int irqcount; /* Irq nesting counter. Starts with -1 */ | 19 | int irqcount; /* Irq nesting counter. Starts with -1 */ |
16 | int cpunumber; /* Logical CPU number */ | 20 | int cpunumber; /* Logical CPU number */ |
17 | char *irqstackptr; /* top of irqstack */ | 21 | char *irqstackptr; /* top of irqstack */ |
@@ -23,10 +27,6 @@ struct x8664_pda { | |||
23 | unsigned apic_timer_irqs; | 27 | unsigned apic_timer_irqs; |
24 | } ____cacheline_aligned_in_smp; | 28 | } ____cacheline_aligned_in_smp; |
25 | 29 | ||
26 | |||
27 | #define IRQSTACK_ORDER 2 | ||
28 | #define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER) | ||
29 | |||
30 | extern struct x8664_pda cpu_pda[]; | 30 | extern struct x8664_pda cpu_pda[]; |
31 | 31 | ||
32 | /* | 32 | /* |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 4861246548f7..5cb151538cd5 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -273,8 +273,6 @@ struct thread_struct { | |||
273 | #define DEBUG_STACK 4 | 273 | #define DEBUG_STACK 4 |
274 | #define MCE_STACK 5 | 274 | #define MCE_STACK 5 |
275 | #define N_EXCEPTION_STACKS 5 /* hw limit: 7 */ | 275 | #define N_EXCEPTION_STACKS 5 /* hw limit: 7 */ |
276 | #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) | ||
277 | #define EXCEPTION_STACK_ORDER 0 | ||
278 | 276 | ||
279 | #define start_thread(regs,new_rip,new_rsp) do { \ | 277 | #define start_thread(regs,new_rip,new_rsp) do { \ |
280 | asm volatile("movl %0,%%fs; movl %0,%%es; movl %0,%%ds": :"r" (0)); \ | 278 | asm volatile("movl %0,%%fs; movl %0,%%es; movl %0,%%ds": :"r" (0)); \ |