]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/x86/include/asm/trampoline.h
x86, trampoline: Use the unified trampoline setup for ACPI wakeup
[mirror_ubuntu-artful-kernel.git] / arch / x86 / include / asm / trampoline.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_TRAMPOLINE_H
2#define _ASM_X86_TRAMPOLINE_H
e44b7b75
PM
3
4#ifndef __ASSEMBLY__
5
d1ee4335
PA
6#include <linux/types.h>
7#include <asm/io.h>
8
e44b7b75 9/*
d1ee4335
PA
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.
e44b7b75 13 */
d1ee4335
PA
14extern const unsigned char x86_trampoline_start [];
15extern const unsigned char x86_trampoline_end [];
16extern unsigned char *x86_trampoline_base;
e44b7b75
PM
17
18extern unsigned long init_rsp;
19extern unsigned long initial_code;
f32ff538 20extern unsigned long initial_gs;
e44b7b75 21
d1ee4335
PA
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)))
3e1e9002 30
d1ee4335
PA
31/* Address of the SMP trampoline */
32static inline unsigned long trampoline_address(void)
33{
34 return virt_to_phys(TRAMPOLINE_SYM(trampoline_data));
35}
e44b7b75
PM
36
37#endif /* __ASSEMBLY__ */
38
1965aae3 39#endif /* _ASM_X86_TRAMPOLINE_H */