aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/trampoline.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/trampoline.h')
-rw-r--r--arch/x86/include/asm/trampoline.h36
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 */
10extern const unsigned char trampoline_data []; 14extern const unsigned char x86_trampoline_start [];
11extern const unsigned char trampoline_end []; 15extern const unsigned char x86_trampoline_end [];
12extern unsigned char *trampoline_base; 16extern unsigned char *x86_trampoline_base;
13 17
14extern unsigned long init_rsp; 18extern unsigned long init_rsp;
15extern unsigned long initial_code; 19extern unsigned long initial_code;
16extern unsigned long initial_page_table;
17extern unsigned long initial_gs; 20extern unsigned long initial_gs;
18 21
19#define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE) 22extern void __init setup_trampolines(void);
23
24extern const unsigned char trampoline_data[];
25extern 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
21extern unsigned long setup_trampoline(void); 31/* Address of the SMP trampoline */
22extern void __init setup_trampoline_page_table(void); 32static inline unsigned long trampoline_address(void)
23extern void __init reserve_trampoline_memory(void); 33{
24#else 34 return virt_to_phys(TRAMPOLINE_SYM(trampoline_data));
25static inline void setup_trampoline_page_table(void) {} 35}
26static inline void reserve_trampoline_memory(void) {}
27#endif /* CONFIG_X86_TRAMPOLINE */
28 36
29#endif /* __ASSEMBLY__ */ 37#endif /* __ASSEMBLY__ */
30 38