diff options
Diffstat (limited to 'arch/x86/include/asm/trampoline.h')
-rw-r--r-- | arch/x86/include/asm/trampoline.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/arch/x86/include/asm/trampoline.h b/arch/x86/include/asm/trampoline.h index 4dde797c0578..feca3118a73b 100644 --- a/arch/x86/include/asm/trampoline.h +++ b/arch/x86/include/asm/trampoline.h | |||
@@ -3,28 +3,36 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | #ifdef CONFIG_X86_TRAMPOLINE | 6 | #include <linux/types.h> |
7 | #include <asm/io.h> | ||
8 | |||
7 | /* | 9 | /* |
8 | * Trampoline 80x86 program as an array. | 10 | * Trampoline 80x86 program as an array. These are in the init rodata |
11 | * segment, but that's okay, because we only care about the relative | ||
12 | * addresses of the symbols. | ||
9 | */ | 13 | */ |
10 | extern const unsigned char trampoline_data []; | 14 | extern const unsigned char x86_trampoline_start []; |
11 | extern const unsigned char trampoline_end []; | 15 | extern const unsigned char x86_trampoline_end []; |
12 | extern unsigned char *trampoline_base; | 16 | extern unsigned char *x86_trampoline_base; |
13 | 17 | ||
14 | extern unsigned long init_rsp; | 18 | extern unsigned long init_rsp; |
15 | extern unsigned long initial_code; | 19 | extern unsigned long initial_code; |
16 | extern unsigned long initial_page_table; | ||
17 | extern unsigned long initial_gs; | 20 | extern unsigned long initial_gs; |
18 | 21 | ||
19 | #define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE) | 22 | extern void __init setup_trampolines(void); |
23 | |||
24 | extern const unsigned char trampoline_data[]; | ||
25 | extern const unsigned char trampoline_status[]; | ||
26 | |||
27 | #define TRAMPOLINE_SYM(x) \ | ||
28 | ((void *)(x86_trampoline_base + \ | ||
29 | ((const unsigned char *)(x) - x86_trampoline_start))) | ||
20 | 30 | ||
21 | extern unsigned long setup_trampoline(void); | 31 | /* Address of the SMP trampoline */ |
22 | extern void __init setup_trampoline_page_table(void); | 32 | static inline unsigned long trampoline_address(void) |
23 | extern void __init reserve_trampoline_memory(void); | 33 | { |
24 | #else | 34 | return virt_to_phys(TRAMPOLINE_SYM(trampoline_data)); |
25 | static inline void setup_trampoline_page_table(void) {} | 35 | } |
26 | static inline void reserve_trampoline_memory(void) {} | ||
27 | #endif /* CONFIG_X86_TRAMPOLINE */ | ||
28 | 36 | ||
29 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
30 | 38 | ||