resume-trace.h 540 Bytes
Newer Older
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) {					\
Jan Beulich's avatar
Jan Beulich committed
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)

21
#endif /* ASM_X86__RESUME_TRACE_H */