Commit 3578facf authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

x86: merge resume-trace.h variants

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3367e56f
...@@ -6,12 +6,14 @@ ...@@ -6,12 +6,14 @@
# define _ASM_PTR " .long " # define _ASM_PTR " .long "
# define _ASM_ALIGN " .balign 4 " # define _ASM_ALIGN " .balign 4 "
# define _ASM_MOV_UL " movl "
#else #else
/* 64 bits */ /* 64 bits */
# define _ASM_PTR " .quad " # define _ASM_PTR " .quad "
# define _ASM_ALIGN " .balign 8 " # define _ASM_ALIGN " .balign 8 "
# define _ASM_MOV_UL " movq "
#endif /* CONFIG_X86_32 */ #endif /* CONFIG_X86_32 */
......
#ifdef CONFIG_X86_32 #ifndef _ASM_X86_RESUME_TRACE_H
# include "resume-trace_32.h" #define _ASM_X86_RESUME_TRACE_H
#else
# include "resume-trace_64.h" #include <asm/asm.h>
#define TRACE_RESUME(user) do { \
if (pm_trace_enabled) { \
void *tracedata; \
asm volatile(_ASM_MOV_UL " $1f,%0\n" \
".section .tracedata,\"a\"\n" \
"1:\t.word %c1\n\t" \
_ASM_PTR " %c2\n" \
".previous" \
:"=r" (tracedata) \
: "i" (__LINE__), "i" (__FILE__)); \
generate_resume_trace(tracedata, user); \
} \
} while (0)
#endif #endif
#define TRACE_RESUME(user) do { \
if (pm_trace_enabled) { \
void *tracedata; \
asm volatile("movl $1f,%0\n" \
".section .tracedata,\"a\"\n" \
"1:\t.word %c1\n" \
"\t.long %c2\n" \
".previous" \
:"=r" (tracedata) \
: "i" (__LINE__), "i" (__FILE__)); \
generate_resume_trace(tracedata, user); \
} \
} while (0)
#define TRACE_RESUME(user) do { \
if (pm_trace_enabled) { \
void *tracedata; \
asm volatile("movq $1f,%0\n" \
".section .tracedata,\"a\"\n" \
"1:\t.word %c1\n" \
"\t.quad %c2\n" \
".previous" \
:"=r" (tracedata) \
: "i" (__LINE__), "i" (__FILE__)); \
generate_resume_trace(tracedata, user); \
} \
} while (0)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment