Drivers: hv: vmbus: Move the crash notification function
[linux-2.6/btrfs-unstable.git] / arch / x86 / include / asm / frame.h
blob6e4d170726b758a75a46777f416d07bc7ada01e7
1 #ifndef _ASM_X86_FRAME_H
2 #define _ASM_X86_FRAME_H
4 #include <asm/asm.h>
6 /*
7 * These are stack frame creation macros. They should be used by every
8 * callable non-leaf asm function to make kernel stack traces more reliable.
9 */
11 #ifdef CONFIG_FRAME_POINTER
13 #ifdef __ASSEMBLY__
15 .macro FRAME_BEGIN
16 push %_ASM_BP
17 _ASM_MOV %_ASM_SP, %_ASM_BP
18 .endm
20 .macro FRAME_END
21 pop %_ASM_BP
22 .endm
24 #else /* !__ASSEMBLY__ */
26 #define FRAME_BEGIN \
27 "push %" _ASM_BP "\n" \
28 _ASM_MOV "%" _ASM_SP ", %" _ASM_BP "\n"
30 #define FRAME_END "pop %" _ASM_BP "\n"
32 #endif /* __ASSEMBLY__ */
34 #define FRAME_OFFSET __ASM_SEL(4, 8)
36 #else /* !CONFIG_FRAME_POINTER */
38 #define FRAME_BEGIN
39 #define FRAME_END
40 #define FRAME_OFFSET 0
42 #endif /* CONFIG_FRAME_POINTER */
44 #endif /* _ASM_X86_FRAME_H */