resume-trace.h 540 字节
Newer Older
H
H. Peter Anvin 已提交
1 2
#ifndef _ASM_X86_RESUME_TRACE_H
#define _ASM_X86_RESUME_TRACE_H
3 4 5

#include <asm/asm.h>

6 7
#define TRACE_RESUME(user)					\
do {								\
8
	if (pm_trace_enabled) {					\
J
Jan Beulich 已提交
9
		const void *tracedata;				\
10
		asm volatile(_ASM_MOV " $1f,%0\n"		\
11 12 13 14 15 16
			     ".section .tracedata,\"a\"\n"	\
			     "1:\t.word %c1\n\t"		\
			     _ASM_PTR " %c2\n"			\
			     ".previous"			\
			     :"=r" (tracedata)			\
			     : "i" (__LINE__), "i" (__FILE__));	\
17 18 19 20
		generate_resume_trace(tracedata, user);		\
	}							\
} while (0)

H
H. Peter Anvin 已提交
21
#endif /* _ASM_X86_RESUME_TRACE_H */